1. In order to run the relayout you will need to have 10% of the current volume size as spare for VXVM to use during a relayout.
2. Customers request: Customer has 14 new LUNS and wants to grow the volume by the size of the new LUNs, which is a 24 stripe volume. Used the relayout command to increase the number of stripes from 24 to 36. Then after the relayout was completed the volume grown using the vxassist command this request was for a volume used by Sybase as raw.
3. Lab Test: The test below was run on a lab system to demonstrate the procedure using a three stripe volume and relaying it to a 4 stripe.
This will take a long time to complete depending on the configuration and size of the volume, and also how busy the system is will also cause some delays, the test took 2 hours 50 minutes.
Note:
In some cases when the stripe size is very large, the 10% rule will not apply, this procedure has been run with a 24 striped volume. The lab test was done with only 3 stripes and relayout to 4 stripes.
The 10% free space must not be spread across the SubDisks in the current stripe or free space used in any existing volumes.
1. Created a DG with four disks:
root@lisa # vxdg init fidg c1t18d0=c1t18d0s2
root@lisa # vxdg -g fidg adddisk c1t19d0=c1t19d0s2
root@lisa # vxdg -g fidg adddisk c1t21d0=c1t21d0s2
root@lisa # vxdg -g fidg adddisk c1t22d0=c1t22d0s2
2. Created a stripe volume with 3 stripes using the full disk.
root@lisa # vxassist -g fidg make vol1 24g layout=stripe nstripe=3
root@lisa # vxprint -g fidg
dg fidg fidg - - - - - -
dm c1t18d0 c1t18d0s2 - 17679776 - - - -
dm c1t19d0 c1t19d0s2 - 17679776 - - - -
dm c1t21d0 c1t21d0s2 - 17616288 - - - -
dm c1t22d0 c1t22d0s2 - 17616288 - - - -
v vol1 fsgen ENABLED 50331648 - ACTIVE - -
pl vol1-01 vol1 ENABLED 50331648 - ACTIVE - -
sd c1t18d0-01 vol1-01 ENABLED 16777216 0 - - -
sd c1t19d0-01 vol1-01 ENABLED 16777216 0 - - -
sd c1t21d0-01 vol1-01 ENABLED 16777216 0 - - -
3. Tried to grow the volume but because we need 3 stripes to grow this volume it failed.
root@lisa # vxassist -g fidg maxgrow
Volume vol1 can be extended by 2707456 to: 53039104 (25898Mb)
4. Tried to relayout the vol1 from a 3 stripe to a 4 stripe which would fail because we need 10% space to use during the relayout.
root@lisa # vxassist -g fidg relayout vol1 ncol=4 c1t18d0 c1t19d0 c1t21d0 c1t22d0
VxVM vxassist ERROR V-5-1-6349 Cannot allocate 5031936 blocks of disk space required for the relayout operation for temp space.
VxVM vxassist ERROR V-5-1-4037 Relayout operation aborted. (7)
5. Added another disk into the DG which VXVM will use as temp space.
root@lisa # vxdg -g fidg adddisk c1t2d0=c1t2d0s2
root@lisa # vxassist -g fidg relayout vol1 ncol=4 c1t18d0 c1t19d0 c1t21d0 c1t22d0
6. Relayout is in progress and we can see in the vxprint what is happening.
root@lisa # vxprint -htg fidg
dg fidg default default 12000 1243408731.23.lisa
dm c1t2d0 c1t2d0s2 auto 65536 17616288 -
dm c1t18d0 c1t18d0s2 auto 2048 17679776 -
dm c1t19d0 c1t19d0s2 auto 2048 17679776 -
dm c1t21d0 c1t21d0s2 auto 65536 17616288 -
dm c1t22d0 c1t22d0s2 auto 65536 17616288 -
v vol1 - ENABLED ACTIVE 50331648 SELECT -
pl vol1-tp01 vol1 ENABLED ACTIVE 50331648 CONCAT -
sv vol1-ts01 vol1-tp01 vol1-I01 2 50331648 0 2/5
v vol1-D01 - ENABLED ACTIVE 0 SELECT -
pl vol1-Dp01 vol1-D01 ENABLED ACTIVE 0 STRIPE 4/128
v vol1-I01 - ENABLED ACTIVE 50331648 ROUND - out
pl vol1-Ip01 vol1-I01 ENABLED SRC 50331648 CONCAT -
sv vol1-Is01 vol1-Ip01 vol1-S01 1 50331648 0 1/1
pl vol1-Ip02 vol1-I01 ENABLED(SPARSE) TMP 5031936 CONCAT -
sv vol1-Is02 vol1-Ip02 vol1-T01 1 5031936 0 2/2
pl vol1-Ip03 vol1-I01 DISABLED UNUSED 50331648 CONCAT -
sv vol1-Is03 vol1-Ip03 vol1-U01 1 50331648 0 0/1
pl vol1-Ip04 vol1-I01 DISABLED(SPARSE) WOD 0 CONCAT -
sv vol1-Is04 vol1-Ip04 vol1-W01 0 0 0 1/1
pl vol1-Ip05 vol1-I01 DISABLED(SPARSE) DST 0 CONCAT -
sv vol1-Is05 vol1-Ip05 vol1-D01 0 0 0 1/1
v vol1-S01 - ENABLED ACTIVE 50331648 SELECT vol1-01
pl vol1-01 vol1-S01 ENABLED ACTIVE 50331648 STRIPE 3/128
sd c1t18d0-01 vol1-01 c1t18d0 0 16777216 0/0 c1t18d0
sd c1t19d0-01 vol1-01 c1t19d0 0 16777216 1/0 c1t19d0
sd c1t21d0-01 vol1-01 c1t21d0 0 16777216 2/0 c1t21d0
v vol1-T01 - ENABLED ACTIVE 5031936 SELECT -
pl vol1-T01-01 vol1-T01 ENABLED ACTIVE 5031936 CONCAT -
sd c1t2d0-01 vol1-T01-01 c1t2d0 0 5031936 0 c1t2d0
pl vol1-T01-02 vol1-T01 ENABLED ACTIVE 5031936 CONCAT -
sd c1t22d0-02 vol1-T01-02 c1t22d0 12582912 5031936 0 c1t22d0
v vol1-U01 - DISABLED EMPTY 50331648 SELECT -
pl vol1-Up01 vol1-U01 DISABLED(SPARSE) ACTIVE 50331648 STRIPE 4/128
sd c1t22d0-01 vol1-Up01 c1t22d0 0 12582912 3/0 c1t22d0
v vol1-W01 - ENABLED ACTIVE 0 SELECT -
pl vol1-Wp01 vol1-W01 ENABLED ACTIVE 0 STRIPE 4/128
7. The vxtask command will give you an idea of how long the relayout will take.
root@lisa # vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
160 RELAYOUT/R 00.75% 0/100663296/757760 RELAYOUT vol1 fidg
root@lisa # vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
160 RELAYOUT/R 01.58% 0/100663296/1593344 RELAYOUT vol1 fidg
Task: 160 RUNNING
Type: RELAYOUT
Operation: RELAYOUT Vol vol1 Dg fidg
Started: Wed May 27 09:27:33 2009
Throttle: 0
Progress: 95.61% 96247808 of 100663296 Blocks
Work time: 2 hours, 50 minutes, 48 seconds (07:50 remaining)
root@lisa # vxtask -hl monitor
root@lisa # vxprint
Disk group: fidg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg fidg fidg - - - - - -
dm c1t2d0 c1t2d0s2 - 17616288 - - - -
dm c1t18d0 c1t18d0s2 - 17679776 - - - -
dm c1t19d0 c1t19d0s2 - 17679776 - - - -
dm c1t21d0 c1t21d0s2 - 17616288 - - - -
dm c1t22d0 c1t22d0s2 - 17616288 - - - -
v vol1 fsgen ENABLED 50331648 - ACTIVE - -
pl vol1-01 vol1 ENABLED 50331648 - ACTIVE - -
sd c1t18d0-03 vol1-01 ENABLED 12582912 0 - - -
sd c1t19d0-03 vol1-01 ENABLED 12582912 0 - - -
sd c1t21d0-03 vol1-01 ENABLED 12582912 0 - - -
sd c1t22d0-03 vol1-01 ENABLED 12582912 0 - - -
8. Now determine what size you can grow the volume and use the growto with vxassist.
root@lisa # vxassist -g fidg maxgrow vol1
Volume vol1 can be extended by 20131840 to: 70463488 (34406Mb)
root@lisa # vxassist -g fidg growto vol1 70463488