Resize (grow) a multi-column striped volume using a single LUN/disk

book

Article ID: 100002524

calendar_today

Updated On:

Description

Error Message

 vxresize -g testdg testvol +20m d2
VxVM vxassist ERROR V-5-1-436   Cannot allocate space to grow volume to 1105920 blocks
VxVM vxresize ERROR V-5-1-4703 Problem running vxassist command for volume testvol in diskgroup testdg

Cause

Growing a striped  volume requires a new disk per column to succeed and thus the existing volume needs to be relayout to add a new column for successfully resize.

Resolution

The syntax to resize a striped volume with one new lun/disk are as follows:
 
A. Relayout the volume to add a new column
# vxassist -g relayout ncol=+1

B.  Determine the maximum size volume can be grown
vxassist -g maxgrow   <specify the disk(s) that already exist in the volume + >

C. Grow the volume and underlying filesystem to match
vxresize -g

Example: Using a 2 column stripe wthe new lun=d3 added to the disk group  ( can have vxfs or ufs filesystem)
 
1. Create volume, add a filesytem and mount 
# vxassist -g testdg make vol01 10m layout=stripe ncol=2 d1 d2
# vxprint -g testdg -htq                        
<<<<   the volume size is spread across 2 subdisk (d1 & d2)
dg testdg        default      default  15000    1251234892.28.testsys  
dm c3t2d12s2    d1    auto     6536    44896  -
dm c3t2d21s2    d2    auto     6536    44896  -
dm c3t2d22s2    d3    auto     6536    44896  -

 
v  vol01        -                   ENABLED  ACTIVE   20480    SELECT    vol01-01 fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   20480    STRIPE    2/128    RW
sd c3t2d12s2-01 vol01-01     d1      0       10240    0/0       c3t2d12  ENA
sd c3t2d21s2-01 vol01-01     d2      0       10240    1/0       c3t2d21  ENA 
 
# newfs /dev/vx/rdsk/testdg/vol01
newfs: construct a new file system /dev/vx/rdsk/testdg/vol01: (y/n)? y
/dev/vx/rdsk/testdg/vol01:       20480 sectors in 10 cylinders of 32 tracks, 64 sectors
       10.0MB in 1 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at: 32,


# mount -F ufs /dev/vx/dsk/testdg/vol01 /mnt

2.  Add some data
# cd /mnt ; mkfile 5m don\'t_lose_this
# cd /mnt ; echo "don't_lose_this">another_file
# ls /mnt
another_file     don't_lose_this  lost+found

3.  Add 1 column to the stripe specifying the LUN to be used as the new column
# vxassist -g testdg relayout vol01 ncol=+1 d3
 
4. Check status                                  
# vxprint -g testdg -htq                   <<<< the volume size is spread across 3 subdisk (d1,d2 & d3)
dg testdg        default      default  15000    1251234892.28.testsys 
dm c3t2d12s2    d1   auto     6536    44896  -
dm c3t2d21s2    d2   auto     6536    44896  -
dm c3t2d22s2    d3   auto     6536    44896  -

 
v  vol01        -                   ENABLED  ACTIVE   20480    SELECT    vol01-01 fsgen
pl vol01-01     vol01        ENABLED  ACTIVE   20736    STRIPE    3/128    RW
sd c3t2d12s2-03 vol01-01     d1  0       6912     0/0       c3t2d12  ENA
sd c3t2d21s2-03 vol01-01     d2  0       6912     1/0       c3t2d21  ENA
sd c3t2d23s2-03 vol01-01     d3  0       6912     2/0       c3t2d23  ENA                      <<< new column


# df -k /mnt
Filesystem                       kbytes    used   avail capacity  Mounted on
/dev/vx/dsk/testdg/vol01  9247    6170    2153    75%    /mnt


5. Now the required disk are in the volume we can resize the volume/filesystem to include the extra space created by the new lun

# vxasssit -g testdg maxgrow vol01 d1 d2 d3
Volume vol01 can be extended by 114208 to: 134688 (65Mb)

# vxresize -g testdg vol01 65m                  <<  this is the final size

# df -k /mnt
Filesystem                         kbytes    used     avail capacity  Mounted on
/dev/vx/dsk/testdg/vol01   66560    6170   60393    12%    /mnt

6. Check the data has not been effected

# ls  /mnt
another_file don't_lose_this lost+found

Issue/Introduction

Growing a striped volume requires a new disk per column to succeed and thus the existing volume needs to be relayout to add a new column for successfully resize. So adding a single disk to an existing striped volume (minimum number of column =2) the vxresize command will fail with an error.