Operating System - HP-UX
1838407 Members
3343 Online
110125 Solutions
New Discussion

problem removing volume group

 
SOLVED
Go to solution
Olga_1
Regular Advisor

problem removing volume group

There is more problems with volume group:
Now I cannot remove volume group vg05
vgremove /dev/vg05
output: vg05 is not activated
trying to activate it with
vgchange ???a y /dev/vg05
output: could not activate /dev/vg05 I/O error while reading VGDA
Please help. Thank you.
5 REPLIES 5
S.K. Chan
Honored Contributor

Re: problem removing volume group

Try..

# vgexport /dev/vg05

which will permenantly remove it and all it's device files associated with vg05.
Olga_1
Regular Advisor

Re: problem removing volume group

It did remove it from lvmtab, but now when I try to do:
pvremove /dev/rdsk/c9t0d0

output: pvremove: The physical volume "/dev/rdsk/c9t0d0" belongs to an exported volume group.
pvremove: Couldn't remove physical volume "/dev/rdsk/c9t0d0".
What to do next? Thank you for your help.
Patrick Wallek
Honored Contributor

Re: problem removing volume group

What exactly are you trying to do?

Once you do a vgexport of a volume group, you can no longer do an lvremove or a pvremove on that VG. When the vgexport is done, the volume group is gone from the system. The /dev/vg?? directory is removed.

We really need more information on what you are trying to accomplish.
Christopher McCray_1
Honored Contributor

Re: problem removing volume group

Hello,

If I may ask, what are you trying to do with the volume you are trying to pvremove?

If you are trying to create another vg, just recreate the pv with pvcreate -f, but be sure this is what you want.

Then you can create an new vg or extend an old one.

Hope this helps

Chris
It wasn't me!!!!
S.K. Chan
Honored Contributor
Solution

Re: problem removing volume group

You are trying to clear the LVM data structure from the PV but this can only be done if the VG is first removed. You mentioned you cannot vgremove it, so I think you then vgexport it which works fine but pvremove will ONLY work if the VG is succesfully removed. At this point you can ignore the pvremove command. If you want to re-use that disk (PV) in another VG make sure you do ..

# pvcreate -f /dev/rdsk/cXdXtX

first ..