Operating System - HP-UX
1757717 Members
2515 Online
108863 Solutions
New Discussion юеВ

How to remove un unused volume group

 
SOLVED
Go to solution
Lars Bylander
Frequent Advisor

How to remove un unused volume group

A disk failedin a server, I replaced the bad disk with a new disk. The failed disk contained only one volume group, /dev/vg01.

I try to get rid of vg01:
# string /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/vg01
/dev/dsk/c2t2d0
# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -v
...
The Volume Group /dev/vg01 was not matched with any physical Volumes.
# string /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0

How should I now proceed to get rid of /dev/vg01 completly, and not only from lvmtab?

HP-UX 11i on L2000 servers.

Best regards
Lars Bylander
7 REPLIES 7
Pete Randall
Outstanding Contributor

Re: How to remove un unused volume group

Easiest is to vgexport it.


Pete

Pete
Lars Bylander
Frequent Advisor

Re: How to remove un unused volume group

This the answer of the vgexport preview:

# vgexport -p -v /dev/vg01
Beginning the export process on Volume Group "/dev/vg01".
vgexport: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "/dev/vg01".

Asif Sharif
Honored Contributor
Solution

Re: How to remove un unused volume group

Hi Lars,

#cp -p /etc/lvmtab.old /etc/lvmtab

then do vgexport.

Regards,
Asif Sharif
Regards,
Asif Sharif
Lars Bylander
Frequent Advisor

Re: How to remove un unused volume group

Thanks Sharif, that did work:
# cp -p lvmtab.old lvmtab
# vgexport -v /dev/vg01
Beginning the export process on Volume Group "/dev/vg01".
/dev/dsk/c2t2d0
Volume group "/dev/vg01" has been successfully removed.

But still the directory /etc/lvmconf contains vg01 related files, how should those be removed?
# ls lvmconf
lvm_lock vg00.conf.old vg01.conf vg01.mapfile
vg00.conf vg00.mapfile vg01.conf.old
Elmar P. Kolkman
Honored Contributor

Re: How to remove un unused volume group

You can remove them with the rm command. They are not used unless you want to do a vgcfgrestore or something like that.
Every problem has at least one solution. Only some solutions are harder to find.
Lars Bylander
Frequent Advisor

Re: How to remove un unused volume group

Thank you all for taking time to help me.

/Lars
Lars Bylander
Frequent Advisor

Re: How to remove un unused volume group

P.S. Closing thread. D.S.