Operating System - HP-UX
1748069 Members
5391 Online
108758 Solutions
New Discussion юеВ

Trying to vgexport old Volume Group

 
Tony Roberson
New Member

Trying to vgexport old Volume Group

Trying to cleanup old volume groups from the system. Performed the following:

vgchange -a n /dev/vgtest
vgchange: Volume group "/dev/vgengserv" does not exist in the "/etc/lvmtab" file.

vgexport -v /dev/vgtest
vgexport: Couldn't export volume group "/dev/vgengserv".

Can I simply remove the directory /dev/vgengserv now?

Thanks for any help.

9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: Trying to vgexport old Volume Group

Do a strings /etc/lvmtab and see if this bogus VG appears. Generally when you see bogus output like this, it is a result of non-unique minor device numbers in the /dev/vgXX/group files. Make sure that each of your group files has a unique minor device number.

If vgengserv shows up in your strings output and is not in use then vgexport it.

Also, it is possible that you have symbolic links between these two VG's but I'm betting on bad moinor device numbers.

If it ain't broke, I can fix that.
RAC_1
Honored Contributor

Re: Trying to vgexport old Volume Group

First we will try to get lvmtab checked.

Do a vgscan -pva and check if it gives any errors and do you get this vg in above command?

If yes rename old /etc/lvmtab to /etc/lvmtab.old and run vgscan -av

Once it is there, do vgchange -a y vgname and if OK then do vgexport.

Anil
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: Trying to vgexport old Volume Group

You should also note that while doing the export/import process mounted filesystems are not effected at all.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tony Roberson
New Member

Re: Trying to vgexport old Volume Group

performed the strings command and the vgscan command. neither returned information about vgengserv.
RAC_1
Honored Contributor

Re: Trying to vgexport old Volume Group

Also check if you have anything for that volume group in /etc/lvmconf directory. This is with assumption that it was used sometime on the system.

If not you just remove /dev/vgxx

Anil
There is no substitute to HARDWORK
Tony Roberson
New Member

Re: Trying to vgexport old Volume Group

Thanks for the advice guys. One more question. When performing the vgscan command I recieved messages such as the following:

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c38t15d2
/dev/dsk/c38t15d3
/dev/dsk/c38t15d4
/dev/dsk/c38t15d5
/dev/dsk/c38t15d6
/dev/dsk/c38t15d7
/dev/dsk/c39t15d2
/dev/dsk/c39t15d3
/dev/dsk/c39t15d4
/dev/dsk/c39t15d5
/dev/dsk/c39t15d6
/dev/dsk/c39t15d7

Does this mean I need more cleanup? In regards to the above text. This system has had a lot of creating and deleting of volume groups at one time on it.

Thanks in advance,

Tony Roberson
New Member

Re: Trying to vgexport old Volume Group

looked in /etc/lvmconf

There is a file vgengserv.conf

Do I simply remove this file and then rm /dev/vgengserv?

There are no file under /dev/vgengserv
Sanjay_6
Honored Contributor

Re: Trying to vgexport old Volume Group

Hi,

It is possible that you may be seeing the VG directory in the /dev directory, but the VG doesn't really exist on the system. If you do a strings /etc/lvmtab, is the VG listed over there. Is the VG listed if you do a vgdisplay -v. If not then it is more likely that the VG doesn't even exist on the system and you cannot vgexport it.

Hope this helps.

Regds
RAC_1
Honored Contributor

Re: Trying to vgexport old Volume Group

Do a strings on /etc/lvmconf/vgxx

Check what pvs it lists, then check if those pvs are being used in any of the vgs you have on system.(pvdisplay for each pv and then do vgdisplay for each vg and check for these pvs)
If pvs are used by some other vg, just remove /dev/vgxx, If not just remove /dev/vgxx.

Anil
There is no substitute to HARDWORK