cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove LUN after house keeping

YC
Level 4

Hi,

There are 3 LUNs (450GB each) for a file system (1.3TB). Now the file system used only 25GB, is it possible to remove some LUN on line?

OS: Solaris 10

Veritas Foundation Suite: 5.0

Fstyp: Vxfs

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

mikebounds
Level 6
Partner Accredited

Yes this can be done online:

Example:

vxresize -g diskgroup resize vol_name 50g

Above commands shrinks volume AND filesystem to 50g 

vxdg -g diskgroup rmdisk disk2
vxdg -g diskgroup rmdisk disk3

Above command removes disks from diskgroup (use vxprint or "vxdg free" to see which disks are now free), and now disk2 and disk3 can be removed from the system or allocated to other diskgroups.

The caveat on this is that your volume must be CONCAT (use vxprint -th to check) - if it is striped, then you will need to relayout the volume first.  Also if you want to reclaim space on the one remaining LUN, then if your array supported resizing LUN, then you can use "vxdisk resize" to shrink disk and then shrink LUN on the array (see https://www-secure.symantec.com/connect/forums/grow-lun-live-linux-sf-51-possible)

Mike

View solution in original post

3 REPLIES 3

mikebounds
Level 6
Partner Accredited

Yes this can be done online:

Example:

vxresize -g diskgroup resize vol_name 50g

Above commands shrinks volume AND filesystem to 50g 

vxdg -g diskgroup rmdisk disk2
vxdg -g diskgroup rmdisk disk3

Above command removes disks from diskgroup (use vxprint or "vxdg free" to see which disks are now free), and now disk2 and disk3 can be removed from the system or allocated to other diskgroups.

The caveat on this is that your volume must be CONCAT (use vxprint -th to check) - if it is striped, then you will need to relayout the volume first.  Also if you want to reclaim space on the one remaining LUN, then if your array supported resizing LUN, then you can use "vxdisk resize" to shrink disk and then shrink LUN on the array (see https://www-secure.symantec.com/connect/forums/grow-lun-live-linux-sf-51-possible)

Mike

YC
Level 4

Hi,

Correct me that the 25GB data will automatically re-org?

mikebounds
Level 6
Partner Accredited

I am fairly certain that vxresize use fsadm to resize filesystem and vxassist to resize volume and the manual for fsadm for resizing filesystem says:

If there are file system resources in use in the sectors being removed, fsadm relocates those resources to sectors staying within the resized file system. The time needed for relocation depends on the number of blocks being moved.

Mike