Operating System - HP-UX
1833840 Members
2559 Online
110063 Solutions
New Discussion

Cannot export volume group without entry in /etc/lvmtab

 
SOLVED
Go to solution
Damien Lass
Advisor

Cannot export volume group without entry in /etc/lvmtab

Hello all,
I am attempting to destroy a volume group using vgexport. The volume group does not have an entry in /etc/lvmtab. When I attempt to vgexport the volume group I receive the following error:
vgexport: Volume group "/dev/vgNN" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "/dev/vgNN".

I need to export this volume group before I can re-import a new mapfile (with additional LVs) in its place. It Does anyone have any suggestions on how to get past this?

I have read a couple notes about re-building the /etc/lvmtab with a vgscan -v. Would this add back the volume group entry that is missing?

Any help would be greatly appreciated. Thanks in advance!
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Cannot export volume group without entry in /etc/lvmtab

Yes, first mv /etc/lvmtab /etc/lvmtab.sav and then do a vgscan.
If it ain't broke, I can fix that.
George Petrides_1
Honored Contributor

Re: Cannot export volume group without entry in /etc/lvmtab

Vgexport removes the volume group entry from the /etc/lvmtab file and deletes the /dev/vgXX directory. If you need to use the vgexport command to create the mapfile, then maybe you are better off creating it manually. I think the format is
1 lvol1
2 lvol2

George
Fragon
Trusted Contributor

Re: Cannot export volume group without entry in /etc/lvmtab

1. Using vgscan -v to rebuild your /etc/lvmtab file;
2. How about using "vgreduce and vgremove" to achieve your task?

-Gerald-
Damien Lass
Advisor

Re: Cannot export volume group without entry in /etc/lvmtab

All,
I ran a 'vgscan -a -v' and created a new /etc/lvmtab. This didn't fix my problem. The volume group (and associated disks) I want to replace does not show up in the /etc/lvmtab. Is there any way I can manually remove my /dev/vgNN from /dev with the following steps:
1) # cd /dev/vgNN
2) # rm -R * (to remove the 'group')
3) # cd ../
4) # rmdir vgNN
5) # vgimport -m vgNN.mapfile -v /dev/vgNN /dev/dsk/ctd
(where vgNN.mapfile is the mapfile I want to move in)

Is this a valid option to export a volume group? If so, is there anything else I need to do or watch out for?

Any other suggestions are welcome!

Thanks!
Damien Lass
Advisor

Re: Cannot export volume group without entry in /etc/lvmtab

To add to the message above... After reviewing my potential steps, I realized I am missing a couple steps. To add:

4)
5) mkdir /dev/vgNN
6) mknod /dev/vgNN/group c 64 0xNN00
THEN
7) vgimport -m vgNN.mapfile -v /dev/vgNN /dev/dsk/ctd

Sorry for the confusion!


A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Cannot export volume group without entry in /etc/lvmtab

When you make the group node for this vg, make absolute certain then the minor device number is unique. Look at the value in all the /dev/vgXX/groups and make sure that there is no conflict or absolute chaos will will.

e.g. mknod /dev/vg05/group c 64 0x050000 - 0x050000 should not be used anywhere else. By convention, vg05 uses 0x050000, vg02 uses 0x020000, etc. but that is not required (or may not be possible if already in use).
If it ain't broke, I can fix that.
Damien Lass
Advisor

Re: Cannot export volume group without entry in /etc/lvmtab

I ended up following the steps outline in my message(s) above. It worked out fine. A reference to the volume group was added back to the original /etc/lvmtab once I re-imported and activated the new volume group.

Thanks everyone for your input.