Operating System - HP-UX
1834017 Members
2544 Online
110063 Solutions
New Discussion

Re: Removing a Volume Group

 
SOLVED
Go to solution
Bruce Troutman
Advisor

Removing a Volume Group

I have a volume group that I am about to remove. It spans over 4 disks (2 primary, 2 mirrored). I need to remove the volume group /dev/vg02 so that I can later use these disks for extending my other volume groups.

Here is my plan, please let me know if i am using the correct logic/syntax to make this happen.

Thanks

UNmount filesystems on VG.
#umount /filesystem

Break the mirror (lvol1 expands over 2 disks)
#lvreduce -m 0 /dev/vg02/lvol1 /dev/rdsk/primary_dsk_1 /dev/rdsk/primary_dsk_2

deactivate VG
#vgchange -a n /dev/vg02

Remove LVM data
#vgexport -v /dev/vg02

6 REPLIES 6
Jeff Schussele
Honored Contributor
Solution

Re: Removing a Volume Group

Hi Bruce,

That's OK, but there's no need to break the mirror.
Just unmount, deactivate & vgexport.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: Removing a Volume Group

Don't bother breaking the mirror.
# umount /filesystem
# vgchange -a n /dev/vg02
# vgexport -v /dev/vg02

Later you need to "pvcreate -f" on those disks that you want to re-use.
Helen French
Honored Contributor

Re: Removing a Volume Group

As anyway you are going to remove this VG, I won't do anything with mirror (reduce, remove LVs etc). Just unmount file systems, deactivate VG and vgexport it. When you use these disks in any other VGs, you may need to use the '-f' (force) option with pvcreate.
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: Removing a Volume Group

Hi,

No need to do a lvreduce and break the mirror. Simply umount the filesystem, deactivate the vg and export it.

Piyush
MANOJ SRIVASTAVA
Honored Contributor

Re: Removing a Volume Group

Hi Bruce

Do like this

1. umoun the files sytems on that VG
2. vgcahnge -a n /dev/vg02
3. vgreduce /dev/vg02 /dev/dsk/cxtydz



Manoj Srivastava
Bruce Troutman
Advisor

Re: Removing a Volume Group

Thanks guys, I wasn't sure about the mirror part.