Showing results for 
Search instead for 
Did you mean: 

vg in lvmtab

Go to solution
Trusted Contributor

vg in lvmtab


i have hpux 11.00. i created a test vg named vgtest on server to check some disks. Then, we have been told to remove that vg and pvremove the disk. As i was on leave, so my colleague did that job. what he did,

1. he unmounted the LVs.
2. remove the VG directory from /dev
3. and pvremove the two disk that were in VG.

Now, i can see that vgtest is still in lvmtab file. and when i try to vgexport or vgremove it, it give me an error:-

# vgexport vgtest
vgexport: "/dev/vgtest/group": not a character device.
vgexport: Couldn't export volume group "vgtest".

as it is unable to find its group file, as its directory does not exist. plz help on this.
James R. Ferguson
Acclaimed Contributor

Re: vg in lvmtab

Hi Vishu:

You colleague failed to follow correct LVM procedures.


# mv /etc/lvmtab /etc/lvmtab.old
# vgscan -av
# vgchange -a y
# lvlnboot -R

Now, if you have alternate links to any volume groups, you may need to reorder them by doing 'vgreduce' and 'vgextend' to demote primary links to secondary ones and promote secondary links to primary ones, respectively.


Mel Burslan
Honored Contributor

Re: vg in lvmtab

mv /etc/lvmtab /etc/

this should rebuild your lvmtab
in case of a problem you still have a saved copy of lvmtab file.

Hope this helps
UNIX because I majored in cryptology...

Re: vg in lvmtab

Hi Vishnu,

As the above posts say, you need to use vgscan to rescan the volume groups in the server and to update the lvmtab.

Using vgexport to remove the vg from the server will be a good practice.This is the safest way.This will remove the corresponding entries from lvmtab also.

/usr/sbin/vgexport [-m mapfile] [-p] [-v] [-f outfile] vg_name

/usr/sbin/vgexport -m mapfile -s -p -v vg_name

Sajjad Sahir
Honored Contributor

Re: vg in lvmtab

Dear friend

Please do vgscan as mentioned above
vgscan will Recovering and recreating the /etc/lvmtab file when the file has been deleted or does not match the current physical volumes.
and reporting device special file lists for unconfigured volume groups.

thanks and regards

Sajjad Sahir

Acclaimed Contributor

Re: vg in lvmtab

>> 2. remove the VG directory from /dev

Deleting device files will not remove the VG entries!

Use "vgremove" next time!

Hope this helps!

There are only 10 types of people in the world -
those who understand binary, and those who don't.

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
sujit kumar singh
Honored Contributor

Re: vg in lvmtab


as pvremove has been done vgscan as run with option -av should recreate the /etc/lvmtab afresh without that VG entry.