Expand a volume in VxVM from command line

1. Make sure solaris can see the disk.

# df -k
verify the current size of the filesystem /u11 you want to grow
# format
make sure the new disks are labeled by solaris ( use type “0″ = autodetect size , and label the disk !)

2. Make sure Veritas can see the new attached disk.

# vxdctl enable
(allow VxVM to discover newly added disks — DISKS NEED TO BE FORMATTED FIRST using the “format” COMMAND !!)

# vxdisk list
(will list disks detected, disks marked as “error” have not been initialized for use by VxVM)

3. Intitialise the disk in a specific diskgroup.

# vxdiskadm
1. option one to initialiase the disk in the oracledg diskgroup
make sure to use the list option so you can see that the disk is in error ( not yet initialised by veritas)

Or use the following commands:

( # /usr/lib/vxvm/bin/vxdisksetup -i c2t32d8 )
(# vxdg -g oracledg adddisk oracled01=c2t32d8 oracled02=c2t32d9)

4. Find out how much space is available on these new disks.

# vxassist -g oracledg maxgrow vol_u11 oracled01 oracled02
` Volume vol_u12 can be extended by 57675776 to 314105856 (153372Mb)
(gets maximum size available for resizing volume on specific disks)

# vxassist -g oracledg growby vol_u11 57675776 oracled01 oracled02
(extends the volume as a stripe on these 2 extra disks)

NOTE sometimes you get error
vxvm:vxassist: WARNING: dm:oracle16: No disk space matches specification
vxvm:vxassist: WARNING: dm:oracle17: No disk space matches specification

(I believe this to be some sort of rounding error, because afterward the volume is extended !)

# vxresize -g diskgroup volumename +2g

This will make the filesystem 2 g bigger

# vxprint -vt
Disk group: oracledg

V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE

v backupvol – ENABLED ACTIVE 135254016 SELECT – fsgen
v ftpvol – ENABLED ACTIVE 6291456 SELECT – fsgen
v swapvol – ENABLED ACTIVE 28444672 SELECT – fsgen
v vol_u01 – ENABLED ACTIVE 55078912 SELECT – fsgen
v vol_u11 – ENABLED ACTIVE 314109952 SELECT vol_u11-01 fsgen
v vol_u12 – ENABLED ACTIVE 314105856 SELECT vol_u12-01 fsgen
v vol_u13 – ENABLED ACTIVE 58720256 SELECT – fsgen

# /opt/VRTSvxfs/sbin/fsadm -b 314109952 /u11
File system will be increased.

# df -k
verify new filesystem size.

Tags: , ,

Leave a Reply