Chinaunix

标题: 请问条带化的卷如何扩展到新加入的磁盘上? [打印本页]

作者: 滑翔的蜗牛    时间: 2010-01-14 11:40
标题: 请问条带化的卷如何扩展到新加入的磁盘上?
采用的是VxVM进行卷管理

建立了DG datadg
# vxdg init datadg datadg01=sdb
# vxdg -g datadg adddisk datadg02=sdc

#vxassist -g datadg make datavol 50g layout=stripe datadg01 datadg02

建立datavol,采用了软条带,建立在datadg01 datadg02

现在又新增加了一个磁盘,加入到datadg中
#vxdg -g datadg adddisk datadg03=sdd

请问是否能将datavol卷的条带化扩展到datadg03中? 怎么样操作?

[ 本帖最后由 滑翔的蜗牛 于 2010-1-14 12:00 编辑 ]
作者: 滑翔的蜗牛    时间: 2010-01-14 13:41
没有人知道吗?
作者: wolfheader    时间: 2010-01-14 13:51
原帖由 滑翔的蜗牛 于 2010-1-14 13:41 发表
没有人知道吗?


我确定肯定可以扩进去DG,自动条带

现在的lv如果想跨三个disk不知道行不行,手册上好像看到过,但是我也只会简单的那些,懒得查


等无牙,他肯定会~
作者: 滑翔的蜗牛    时间: 2010-01-14 14:00
标题: 回复 #3 wolfheader 的帖子
应该是可以的,我也正在查资料,如果这有TX会,就更方便了

现在的情况是这样的
vxprint datavol
Disk group: datadg

TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
v  datavol      fsgen        ENABLED  104857600 -       ACTIVE   -       -
pl datavol-01   datavol      ENABLED  104857600 -       ACTIVE   -       -
sd datadg01-02  datavol-01   ENABLED  52428800 0        -        -       -
sd datadg02-02  datavol-01   ENABLED  52428800 0        -        -       -

要达到的目的是,在不破坏原有数据的情况下,将datavol条带扩展到datadg03上
作者: 无牙    时间: 2010-01-14 14:01
vxassist -g datadg relayout datavol ncol=+1 alloc=datadg03
作者: 滑翔的蜗牛    时间: 2010-01-14 14:07
原帖由 无牙 于 2010-1-14 14:01 发表
vxassist -g datadg relayout datavol ncol=+1 alloc=datadg03


尝试执行了,等待结果……
作者: 滑翔的蜗牛    时间: 2010-01-14 14:21
找到资料了,贴上来一起分享
Performing online relayout
You can use the vxassist  relayout command to reconfigure the layout of a
volume without taking it offline. The general form of this command is:
#  vxassist  [-b]  [-g  diskgroup]  relayout  volume  [layout=layout]  \
[relayout_options]
If specified, the -b option makes relayout of the volume a background task.
The following destination layout configurations are supported.
concat-mirror   concatenated-mirror
concat            concatenated
nomirror          concatenated
nostripe          concatenated
raid5              RAID-5 (not supported for shared disk groups)
span              concatenated
stripe             striped
作者: 滑翔的蜗牛    时间: 2010-01-14 14:24
继续

Specifying a non-default layout
You can specify one or more relayout options to change the default layout
configuration. The following are examples of using these options:
ncol=number      Specifies the number of columns.
ncol=+number    Specifies the number of columns to add.
ncol=-number    Specifies the number of colums to remove.
stripeunit=size   Specifies the stripe width.

See the vxassist(1M) manual page.
The following are some examples of using vxassist to change the stripe width and
number of columns for a striped volume in the disk group dbaseg:
#  vxassist  -g  dbaseg  relayout  vol03  stripeunit=64k  ncol=6
#  vxassist  -g  dbaseg  relayout  vol03  ncol=+2
#  vxassist  -g  dbaseg  relayout  vol03  stripeunit=128k
The next example changes a concatenated volume to a RAID-5 volume with four
columns:
#  vxassist  -g  fsgrp  relayout  vol04  layout=raid5  ncol=4
作者: 滑翔的蜗牛    时间: 2010-01-14 14:30
标题: 完成50%了
#vxrelayout -g datadg status datavol
STRIPED,  columns=2,  stwidth=128 -->  STRIPED,  columns=3,  stwidth=128
Relayout running,  50.00% completed.
作者: 滑翔的蜗牛    时间: 2010-01-14 14:32
标题: Viewing the status of a relayout
继续学习

Online relayout operations take some time to perform. You can use the vxrelayout
command to obtain information about the status of a relayout operation. For
example, the command:
#  vxrelayout  -g  mydg  status  vol04
might display output similar to this:
STRIPED,  columns=5,  stwidth=128-->  STRIPED,  columns=6,
stwidth=128
Relayout  running,  68.58%  completed.
In this example, the reconfiguration of a striped volume from 5 to 6 columns is
in progress, and is just over two-thirds complete.
See the vxrelayout(1M) manual page.

If you specified a task tag to vxassist when you started the relayout, you can use
this tag with the vxtask command to monitor the progress of the relayout. For
example, to monitor the task tagged as myconv, enter:
#  vxtask  monitor  myconv
作者: 滑翔的蜗牛    时间: 2010-01-14 14:39
标题: Controlling the progress of a relayout
You can use the vxtask command to stop (pause) the relayout temporarily, or to
cancel it altogether (abort). If you specified a task tag to vxassist when you
started the relayout, you can use this tag to specify the task to vxtask. For example,
to pause the relayout operation tagged as myconv, enter:
#  vxtask  pause  myconv
To resume the operation, use the vxtask command:
#  vxtask  resume  myconv
For relayout operations that have not been stopped using the vxtask  pause
command (for example, the vxtask  abort command was used to stop the task,
the transformation process died, or there was an I/O failure), resume the relayout
by specifying the start keyword to vxrelayout, as shown here:
#  vxrelayout  -g  mydg  -o  bg  start  vol04
If you use the vxrelayout  start command to restart a relayout that you previously
suspended using the vxtask  pause command, a new untagged task is created to
complete the operation. You cannot then use the original task tag to control the
relayout.
The -o  bg option restarts the relayout in the background. You can also specify
the slow and iosize option modifiers to control the speed of the relayout and the
size of each region that is copied. For example, the following command inserts a
delay of 1000 milliseconds (1 second) between copying each 10-megabyte region:
#  vxrelayout  -g  mydg  -o  bg,slow=1000,iosize=10m  start  vol04
The default delay and region size values are 250 milliseconds and 1 megabyte
respectively.
To reverse the direction of relayout operation that is currently stopped, specify
the reverse keyword to vxrelayout as shown in this example:
#  vxrelayout  -g  mydg  -o  bg  reverse  vol04

This undoes changes made to the volume so far, and returns it to its original
layout.
If you cancel a relayout using vxtask  abort, the direction of the conversion is
also reversed, and the volume is returned to its original configuration.
See “Managing tasks with vxtask” on page 324.
See the vxrelayout(1M) manual page.
See the vxtask(1M) manual page.
作者: 滑翔的蜗牛    时间: 2010-01-15 09:36
扩展前后对比:

扩展前:
#vxprint -g datadg datavol
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
v  datavol      fsgen        ENABLED  104857600 -       ACTIVE   -       -
pl datavol-01   datavol      ENABLED  104857600 -       ACTIVE   -       -
sd datadg01-02  datavol-01   ENABLED  52428800 0        -        -       -
sd datadg02-02  datavol-01   ENABLED  52428800 0        -        -       -

# vxdg -g datadg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
datadg01     sdb          sdb          178257920 31358720  -
datadg02     sdc          sdc          178257920 31358720  -
datadg03     sdd          sdd          0         209616640 -

扩展后:
##vxprint -g datadg datavol
Disk group: datadg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
v  datavol      fsgen        ENABLED  104857600 -       ACTIVE   -       -
pl datavol-01   datavol      ENABLED  104857728 -       ACTIVE   -       -
sd datadg01-14  datavol-01   ENABLED  34952576 0        -        -       -
sd datadg02-13  datavol-01   ENABLED  34952576 0        -        -       -
sd datadg03-03  datavol-01   ENABLED  34952576 0        -        -       -

# vxdg -g datadg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
datadg01     sdb          sdb          55924096  17476224  -
datadg01     sdb          sdb          178257920 31358720  -
datadg02     sdc          sdc          55924096  17476224  -
datadg02     sdc          sdc          178257920 31358720  -
datadg03     sdd          sdd          34952576  174664064 -




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2