vxresize to shrink FS and to free a disk
Hello,
I have to shrink this file system so that disk ndg01 is out of this volume. I tried vxresize different combinations, never got the expected result.
# df -h /nmnt Filesystem size used avail capacity Mounted on /dev/vx/dsk/ndg/nvol 6.0G 3.0G 2.8G 53% /nmnt # vxprint -htqQ nvol v nvol - ENABLED ACTIVE 12517376 SELECT - fsgen pl nvol-01 nvol ENABLED ACTIVE 12517376 CONCAT - RW sd ndg01-01 nvol-01 ndg01 0 4169728 0 c2t0d0 ENA sd ndg02-01 nvol-01 ndg02 0 4173824 4169728 c2t1d0 ENA sd ndg03-01 nvol-01 ndg03 0 4173824 8343552 c2t2d0 ENA #
Please share your thoughts.
Thanks in Advance
Nagesh.
Please provide the platform and filesystem type in order to investigate further.
For filesystem type, provide the output of:
# fstyp -v /dev/vx/rdsk/ndg/nvol
eg: if this is a Solaris machine, and the filesystem is ufs (not vxfs), the filesystem cannot be shrunk, as this is a limitation of ufs filesystems.
If the filesystem is a type (eg: vxfs) that can be shrunk, please provide the exact commands you ran to try to shrink the filesystem, to determine if it was a problem with the syntax/inputs provided to the command.
EDIT: Apologies, I missed the requirement to shrink the volume off the disk ndg01.
Presumably when you attempted to shrink the volume earlier, it shrank off ndg03 instead?
ndg01 is the first subdisk in the volume, so shrinking it won't remove that disk / will shrink off the other/subsequent subdisks first.
If you have a spare disk, you could evacuate the ndg01 to that disk to free up the space on ndg01. Presumably this is not the case since you're looking to shrink the volume to free up the space.
A horrible, convoluted way of doing it is:
1. shrink the volume to 4G (so it will be on ndg01, ndg02)
2. create a new subdisk on ndg03 (where the extra 2G used to be)
3. move the subdisk on ndg01 to the new subdisk ndg03Note: if you do wish to proceed with this approach, would recommend performing during a downtime window, or at the very least during a quiet period / when the system is not fully loaded
Commands:
--------------------
1. # vxresize -F <fstype> -g ndg nvol 8343552 ## absolute size in sectors, minus space on ndg032. # vxdg -g ndg free
#### there should be 4173824 sectors free on ndg03 since this has been freed up nowMake the new subdisk on ndg03 (see vxmake man page for further options/details)
# vxmake -g ndg sd ndg03-<XX> medianame,<offset>,4169728where <XX> is subdisk number, <offset> is offset from vxdg free output, 4169728 is the length of the subdisk being replaced on ndg01
3. Move the subdisk on ndg01 to ndg03 (see vxsd man page for further options/details)
# vxsd -g ndg mv ndg01-01 ndg03-<XX>
--------------------If this still does not work, or you are unsure of the offsets/values to use, please provide the platform and SF version being used and the output of the following to determine what values/course of action should be used:
# vxdg -g ndg free
# vxprint -qhtrg ndg