Monday, July 11, 2011

How to extend or shrink Volumes and Filesystems in VXVM / VXFS ?

You can use the below commands to extend / shrink the volume and filesystem.

vxresize - This command will extend or shrink volume and the filesystem.
vxassist - This command can extend or shrink only a volume. You need to use fsadm to extend / shrink a filesystem when you use vxassist.

Few Examples,

1. To grow a volume alone to 1GB :
# vxassist -g testdg growto testvol 1g

2. To extend a filesystem (after extending a volume).
# fsadm -b 1024m /test

3. To grow a volume by 500m,
# vxassist -g testdf growby testvol 500m

4. To shrink a volume to 1GB,
# vxassist -g testdg shrinkto testvol 1g

5. To shrink a volume by 1GB,
# vxassist -g testdg shrinkby testvol 1g

6. To extend a volume and its filesystem by 1GB
# vxresize -g datadg datavol +1g

7. To extend a volume and its filesystem to 2GB
# vxresize -g datadg datavol 2g

1 comment:

  1. Thanks for sharing this important information. You may also refer http://www.s4techno.com/blog/2016/06/17/extend-vxvm-filesystem/

    ReplyDelete