Operating System - HP-UX
1755297 Members
3695 Online
108831 Solutions
New Discussion юеВ

getting rid of a volume group

 
khilari
Regular Advisor

getting rid of a volume group

Hi guys, i have a volume group that i have to decommission... What are the steps i need to take and i also have to forfeit the disk space so that they could be used some where else..
Let me know what u think about it.
Thanks
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: getting rid of a volume group

Hi,

Umount the filesystems, vgchange -a n the volume group and vgexport the volume group.


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

Robert-Jan
Todd McDaniel_1
Honored Contributor

Re: getting rid of a volume group

Before you vgexport the vg, I would document the volume group info so you know which disks are being reclaimed.

vgdisplay -v > .date.out

Also, just in case you ever wanted to rebuild that exact volume group again....

vgexport -p -s -m mapfile.date.out -v /dev/vgname

Unix, the other white meat.
Steven E. Protter
Exalted Contributor

Re: getting rid of a volume group

Shalom,

Back up the data
remove all logical volumes with lvremove
vgexport (If you might want it back)

vgremove the volume group.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Todd McDaniel_1
Honored Contributor

Re: getting rid of a volume group

Before you vgexport the vg, I would document the volume group info so you know which disks are being reclaimed.

vgdisplay -v vgname > vgname.date.out

Also, just in case you ever wanted to rebuild that exact volume group again....

vgexport -p -s -m mapfile.date.out -v /dev/vgname

Unix, the other white meat.
khilari
Regular Advisor

Re: getting rid of a volume group

so after doing lvreduce and vgexport will the disks be available for reuse then... Or do i have to do anything else to reuse them.
Mridul Shrivastava
Honored Contributor

Re: getting rid of a volume group

lvreduce is not required as vgexport will solve the purpose.

Once vgexport is executed those disk can be used for other purposes, u might have to execute pvcreate -f on the disks which are free now so you won't face any issue at the time of vg creation.
Time has a wonderful way of weeding out the trivial
Michael Steele_2
Honored Contributor

Re: getting rid of a volume group

To verify your 'vgexport' worked use 'pvdisplay /dev/dsk/c#t#d#'. Before reusing the disks use 'pvcreate -f /dev/dsk/c#t#d#', or, if a boot disk, then add in the -B option. :-)
Support Fatherhood - Stop Family Law