cancel
Showing results for 
Search instead for 
Did you mean: 

decomissioning a vg

 
khilari
Regular Advisor

decomissioning a vg

Hi there, just wondering what would eb the steps to decomission a vg.
clean up all related to vg instance like fs-s, lvols, release disks, remove vg related UID-s ,... but we have have to capture disks assigned and remove device files...

Now this is what i got... I can get rid of lvols by lvremove but what about UIDS associated with the VG. How do i go about getting rid of that...
5 REPLIES
Robert-Jan Goossens
Honored Contributor

Re: decomissioning a vg

Hi,

# vgchange -a n /dev/vgxx
# vgexport /dev/vgxx

Regards,
Robert-Jan
James R. Ferguson
Acclaimed Contributor

Re: decomissioning a vg

Hi:

> but what about UIDS associated with the VG

Do you mean the LVM VGID and PVID on the disk? If so, you can do:

# pvremove /dev/rdsk/cXtYdZ

...for 11.23 or later; or:

# dd if=/dev/zero of=dev/rdsk/cXtYdZ bs=1024k count=100

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: decomissioning a vg

Hi (again):

...and I mean do the 'pvremove' or 'dd' AFTER you have 'vgexport'ed the volume group and have decided to destroy all LVM headers on the physical volume...

Regards!

...JRF...
khilari
Regular Advisor

Re: decomissioning a vg

ok so the way i look at it. I have to do the following:
1)umount all fs's
2) lvremove all lvols.
3)vgreduce all pvs
4) vgexport the volume group.
5) now what about the uid's related to this volume group am i missing something...
James R. Ferguson
Acclaimed Contributor

Re: decomissioning a vg

Hi (again):

1. Unmount the filesystems and edit '/etc/fstab' so they aren't there the next time you reboot.

2. vgchange -a n vgNN

3. vgexport vgNN

4. pvremove /dev/rdsk/cXtYdZ

Step-4 is optional, assuming my original comments; viz. that you never want to 'vgimport' this volume group again. Again, I am assuming the by "UID" you mean the LVM header information, not "user-IDs".

Regards!

...JRF...