1833589 Members
3887 Online
110061 Solutions
New Discussion

Ghost LVM

 
SOLVED
Go to solution
Ade Odimayo_1
Occasional Advisor

Ghost LVM

I have two mount points with phantom VG. Vgdisplay shows no entry in the /etc/lvmtab.
However, there are two VG existing in the /etc/lvmtab with no LV.

Any ideas how I realign the LV mount points to the VG in the /etc/lvmtab?

TIA
11 REPLIES 11
Jean-Louis Phelix
Honored Contributor

Re: Ghost LVM

Hello,

Do you mean that some lvols are currently mounted while they don't exist in the lvmtab ? If yes, you could try to recreate the lvmtab using vgscan. Are the special files still presents ?
If you can umount them, you could also try to export and reimport the VGs.

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
RAJESH GANGADHARAN
Regular Advisor

Re: Ghost LVM

Hi
lvmtab doesnot contains any lv naes. It got only VG and PV informations.
If you feel that lvmtab is corrupted you can move the existing lvmtab and do a vgscan whcih will recreate lvmtab.
lv mount point are in /etc/fstab, not in /etc/lvmtab.
you can edit /etc/fstab file and add the entry for the new file systems.

-Rajesh
Let the choices you make today be the choices you can live with tomorrow.
Xavier Gutierrez_1
Frequent Advisor

Re: Ghost LVM

Hi, Tim.

Try the following steps:

1.- mv /etc/lvmtab /etc/lvmtab.orig

2.- vgscan -a -v

Best regards.
Michael Tully
Honored Contributor

Re: Ghost LVM


If they are not part of a group you can try running 'vgscan'

Save your existing /etc/lvmtab file first

# vgscan -a
Anyone for a Mutiny ?
Ade Odimayo_1
Occasional Advisor

Re: Ghost LVM

I have run the vgscan several times, amended the /etc/fstab with the new LV with no luck.

Jean could you explain how the export and imports works?

Jean-Louis Phelix
Honored Contributor

Re: Ghost LVM

Hello,

When you export the vg, you delete lvmtab contents concerning this vg, but nothing is written to disks. When you reimport the vg specifyings disks, it reads the VGRA on the disks and finds out whichs lvols have to be created.

BUT ...
- if the vgscan has already been done it has already read the VGRA
- Rajesh was right, there is no lvol information in the lvmtab. The available lvols are defined in the vgra and by the existence of the special files (/dev/vgxx/[r]lvolyy)

Are these lvols really currently mounted ? Could you give us the output of bdf, ll /dev/vg* and strings /etc/lvmtab ?

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
Michael Tully
Honored Contributor

Re: Ghost LVM

Make sure that when using vgexport/vgimport that you *must* have the volume group off-line.
To do so you need to run 'vgchange -a n /dev/myvolgrp'
Anyone for a Mutiny ?
Ade Odimayo_1
Occasional Advisor

Re: Ghost LVM

Hi,

Here is the /etc/lvmtab, /etc/fstab and bdf output requested for the problem LVs.

TIA

Jean-Louis Phelix
Honored Contributor

Re: Ghost LVM

Hello,

What about a 'll /dev/vg70 /dev/vg32' ? In fact /etc/lvmtab is only used when activating, deactivating the vg or modifying the structures. After activation, LVM keeps a table in kernel. So you could have gone in this situation by using for example a vgscan while some disks where not present, or by restoring an old lvmtab. SO exporting these vg will fail and you will not be able to reactivate the vg after next reboot for example.

Did you see that current mount points are not those specified in the fstab ?

Please give us also a vgdisplay -v on both vgs.

Regards,

Jean-Louis
It works for me (© Bill McNAMARA ...)
Ade Odimayo_1
Occasional Advisor

Re: Ghost LVM

Jean,

I noticed the VG is not the same with the /etc/fstab. This is one of bizarreness.

Here is the ll /dev/vg** output for the VGs.

TIA
Jean-Louis Phelix
Honored Contributor
Solution

Re: Ghost LVM

Hello tim,

I think that the problem is here ... Your lvmtab has really been recreated with vgscan.

When you run vgscan AND a vg is activated it takes the first 'group' file with the corresponding minor number. This is a known problem when using vgscan on a system running MCSG (if /dev/slvmvg exists, it create a '/dev/' entry in lvmtab instead of '/dev/vg00').

In your case, vgscan found minor 0x030000 for /dev/vg05/group before /dev/vg070/group. Same for vg32 and vg21. So I think that you just have to DELETE (DON'T rename) directories /dev/vg05 and /dev/vg21 (I suppose that they are not used), then use vgscan again.

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)