Operating System - HP-UX
1836786 Members
2604 Online
110110 Solutions
New Discussion

Re: Removing a drive from root volume group

 
SOLVED
Go to solution
Ed Hon
Regular Advisor

Removing a drive from root volume group

I have a test system in which the root volume group consists of two mirrored drives. I want to reclaim one of the drives, letting the root drive run unmirrored. I've already lvreduced the logical volumes off the other drive. How do I remove it from the root volume group itself?
6 REPLIES 6
George A Bodnar
Trusted Contributor

Re: Removing a drive from root volume group


vgreduce vg00 /dev/dsk/cX
A. Clay Stephenson
Acclaimed Contributor

Re: Removing a drive from root volume group

After you have run the lvreduce command on each LVOL, you then run the vgreduce command and specify the desired drive. Man vgreduce for details.
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: Removing a drive from root volume group

Hi Ed,

Use vgreduce to reduce the disk from the vg. Do "man vgreduce" for more help with the command.

Hope this helps.

Regds
Martin Johnson
Honored Contributor

Re: Removing a drive from root volume group

vgreduce pv_path

See man vgreduce. You may want to do a vgdisplay -v first to insure the drive is not still in use (this is especially important if you are going to use the "-f" option of vgreduce).

HTH
Marty
S.K. Chan
Honored Contributor
Solution

Re: Removing a drive from root volume group

After you have "lvreduce -m 0" pn all the LVs, run ..
# lvlnboot -v
to make sure the boot LVs are no longer mirrored. Then you would just run ..
# vgreduce vg00 /dev/dsk/cXtYdZ
Wayne Yu_1
Frequent Advisor

Re: Removing a drive from root volume group

If you have already remove the drive by vgreduce and the drive is still in the lvmtab, you could
mv /etc/lvmtab /etc/lvmtab.old
vgscan

that will generate a new /etc/lvmtab that has no information about the other drive. Please make sure the drive you removed is not the first boot drive, If you removed the first boot drive, you will need to modify the
/stand/bootconf to have the new primary boot drive path. Otehrwise it will have problem bulding kernel. In addition, check boot path by
setboot
command. if you want to change any of the boot path, you could do
setboot -p x.x/x.x
or setboot -a x.x/x.x

where x.x/x.x is the hardware path you find from ioscan.