Operating System - HP-UX
1832857 Members
3269 Online
110048 Solutions
New Discussion

deactivating a volume group

 
James Colby
Advisor

deactivating a volume group

Hi everyone -

I accidentally exported one of my volume groups on a test machine while it was still active. Now when I do a vgimport it fails because it says that the volume group is still active. When I try to deactivate the vg with vgchange -a n I get an error saying that the volume group doesn't exist in the lvmtab. How do I deactivate the volume group so I can import it. Thanks everyone.
4 REPLIES 4
Uday_S_Ankolekar
Honored Contributor

Re: deactivating a volume group

Hi,

Run vgscan to recreat /etc/lvmtab and the vgchange to deactivate the volumegroup.
Before running vgscan keep a copy of /etc/lvmtab

Goodluck,
-USA..
Good Luck..
G. Vrijhoeven
Honored Contributor

Re: deactivating a volume group

hi,

1. use the old config file to restore vg (/etc/lvmconf/vg_name.conf)
vgcfgrestore -f vg_conf_path /dev/rdsk/disk

if this does not work:

# cp /etc/lmtab /etc/lvmtab.prev
# vgscan -p ( preview) -a
# vgscan -a

recreates the lvmtab.

Gideon

Mark Mitchell
Trusted Contributor

Re: deactivating a volume group

One way is to go to the etc directory.
rename lvmtab to lvmtab.old
then type "vgscan" and let it go.

1 thing to remember, if you use pvlinks
vgscan doesn't always read them well so you
might have to recreate some, but not always
James Colby
Advisor

Re: deactivating a volume group

Thanks for all of your great suggestions. I actually made a really embarrasingly stupid mistake. The volume group that I was trying to import had the same minor number on the group file of another VG. I fixed that and the import worked fine.