I’ve already use vxassist creating disk group, making file system, and mounting it to the OS and that partition is now in use. How can I grou/shrink the size of vxvm filesystem dynamically ?
1.Which disk group does the file system use?
In my scenario, I’ve /user which is the mount point of volume user_vol, and that volume belongs to andy_li disk group. As I created them, I’ve a clear mind about it. Then, how can I know which disk group does a file system/volume belongs to?
#df -h /user
/dev/vx/dsk/andy_li/user_vol 1.0G 18M 944M 2% /user
Now you can see, /user file system belongs to andy_li disk group.
2. Now let’s check how many space left in the disk group that we can use for growing /user:
#vxdg -g andy_li free
GROUP DISK DEVICE TAG OFFSET LENGTH FLAGS
andy_li andy_li01 sdb sdb 3121152 999168 -
999168 blocks, that’s about 500MB.
3. The last and most important thing is to grow the file system:
/etc/vx/bin/vxresize -b -g andy_li user_vol +999168 alloc=andy_li01
Ok, after this operation, let’s check the file system’s size again:
#df -h /user/
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/andy_li/user_vol 1.5G 18M 1.4G 2% /user
That’s all. And vice versa, You can use minus(-) instead of plus(+) to shrink the file system.