Professional Documents
Culture Documents
without unmounting it. we can re-size the volumes using vxassist and resize filesystem using fsadm.vxresize command will perform both volume and filesystem re-size operation simultaneously. Here we are going to see how to re-size the volume smvol in two different ways without un-mounting it .
# df -h /smvol Filesystem size /dev/vx/dsk/UXDG/smvol 50M used 3.1M avail capacity 44M 7% Mounted on /smvol
Method :1 Increasing the volume size-Using vxassist Step:1 Determining how much space we can increase the volume.
# vxassist -g UXDG maxsize layout=mirror Maximum volume size: 92160 (45Mb)
Method:2 Increasing the volume and filesystem using vxresize (Recommended one ) Step:1 Determining how much space we can increase the volume.
# vxassist -g UXDG maxsize layout=mirror Maximum volume size: 71680(35Mb)
Step:2 Resize the volume & filesystem: You can see the changes
# /etc/vx/bin/vxresize -g UXDG smvol +10M # df -h /smvol Filesystem size used avail capacity /dev/vx/dsk/UXDG/smvol 70M 3.1M 63M 5% Mounted on /smvol
Method :1 Decreasing the volume size-Using vxassist Step:1 Reduce the filesystem using fsadm
# /usr/lib/fs/vxfs/fsadm -b 50M /smvol UX:vxfs fsadm:INFO:V-3-23586:/dev/vx/rdsk/UXDG/smvol is currently 122880 sectors - size will be reduced # df -h /smvol/ Filesystem size used avail capacity Mounted on /dev/vx/dsk/UXDG/smvol 50M 3.1M 44M 7% /smvol
Step:2 Reduce the volume using vxassist.You will lose data if you resize the volume less than filesystem size. So better to shrink the volume with some extra space.Here instead of shrink to 50M , i am shrinking to 51MB.
# vxassist -g UXDG shrinkto smvol 51M VxVM vxassist ERROR V-5-1-7236 Shrinking a FSGEN or RAID5 usage type volume can result in loss of data. It is recommended to use the "vxresize"command or specify "-f" option to force the operation.
Note:You will above warning messages if you used without -f option.Handle with care.
# vxassist -g UXDG or # vxassist -g UXDG -f shrinkby smvol 10M -f shrinkto smvol 51M
Method:2 Decreasing the volume and filesystem using vxresize (Recommended one )
# /etc/vx/bin/vxresize -g UXDG smvol -10M # df -h /smvol/ Filesystem size used avail capacity Mounted on /dev/vx/dsk/UXDG/smvol 40M 3.1M 35M 9% /smvol