1836623 Members
1956 Online
110102 Solutions
New Discussion

return disks to SAN

 
kgraff
Occasional Advisor

return disks to SAN

Hi, all

I'm a rather newbie on LVM, so I have this probably simple question.

I have a VG with some LV:s. Recently we needed some temporary space in the VG, so I added a LV for the purpose. Now I don't need it anymore, so I want to return the disks that belong to that particular LV to the SAN for use elsewhere.

The question is: How do I make sure that I remove the right disks from the VG?

TIA,
3 REPLIES 3
Murat SULUHAN
Honored Contributor

Re: return disks to SAN

Hi Blob

lvdisplay -v command will show you which disks used by your lv.

If you find your disk/LUN,
lvremove
vgreduce

Best Regards
Murat
Murat Suluhan
kgraff
Occasional Advisor

Re: return disks to SAN

Hi,

So basically, I have to do that long listing for all LV:s in tha VG, identify what disks are in use, and then compare with vgdisplay -v 'VG' toa find out what disk are NOT in use?

I hoped that there might be an easier way.

Thanks
Tim Nelson
Honored Contributor

Re: return disks to SAN

Do as mentioned above, basically the reverse of how they were added.

You can also use the pvdisplay command on each disk you are expecting to remove.

Once the pvdisplay shows no VGs or LVs then you are good to go. This assumes you are only configuring disks to be used with LVM. ( i.e. no raw disk usage ).

Other ways to confirm.
strings /etc/lvmtab|grep /dev/dsk/cxtxdx
vgdisplay -v |grep /dev/dsk/cxtxdx