/etc/lvmtab is out of date

 
SOLVED
Go to solution
Sylvia Welch
Frequent Advisor

/etc/lvmtab is out of date

I run vgcfgrestore -n on /dev/vgusr and
see 18 disk devices. 1 device should not
be there (used by another VG) and 2 are assigned to volume groups
and not to any lv's.

On the other hand, vgdisplay shows 15
disks. 1 of them is not in the the listing
in the above vgcfgrestore listing.

I looked at the tech article
on this problem and think I have a
different scenario here. The vgusr
group is part of a MC/SG cluster.

Any suggestions?

Thanks
Syl
12 REPLIES 12
harry d brown jr
Honored Contributor

Re: /etc/lvmtab is out of date

Usually you would do the following:

cd /etc
mv lvmtab old_lvmtab
vgscan -av

but I'm not sure what is done if it is part of an MC/SG cluster. Hopefully someone with a lot of experience in MC/SG can help!

live free or die
harry
Live Free or Die
Bharat Katkar
Honored Contributor

Re: /etc/lvmtab is out of date

Hi,
In Addition to harry, if it is a part of the cluster ... halt the package running on /dev/vgusr.
This will deactivate the VG.
# vgchange -c n /dev/vgusr

Follow Harry method...

then
# vgchnage -c y /dev/vgusr

Start the package.

Hope that helps.
Regards,


You need to know a lot to actually know how little you know
Sylvia Welch
Frequent Advisor

Re: /etc/lvmtab is out of date

Thanks, we'll try it this evening during a maint window.

syl
Sundar_7
Honored Contributor

Re: /etc/lvmtab is out of date

How did you come to the conclusion that your /etc/lvmtab is the issue ?

Was there any "/etc/lvmtab out of sync with the kernel" error messages ?

In MC/SG, SAs usually create the VG in one node and export it to the other node. But in the other node, they dont usually execute the vgcfgbackup command. The volume group should be active for the vgcfgbackup to run. So the LVM configuration backup file in /etc/lvmconf is usually out of sync with the actual volume group configuration.

Now, if you rename /etc/lvmtab and try to build the new /etc/lvmtab then you would probably loose all the volume groups that are not currently active in the node.

I believe the problem here is with LVM CFG backup and not with /etc/lvmtab.

Here is what I would do

1) # vgcfgbackup /dev/vgusr
# vgcfgrestore -n /dev/vgusr -l

Now the vgdisplay and vgcfgrestore output should match.

Whenever you are exporting/importing the volume groups with in the cluster, it is a good practise to activate the volume in read-only mode, execute vgcfgbackup and deactivate the volume group.
Learn What to do ,How to do and more importantly When to do ?
Tom Danzig
Honored Contributor
Solution

Re: /etc/lvmtab is out of date

Run "vgreduce -f " to fix. FYI, this can be done without issue on a running system.
Sylvia Welch
Frequent Advisor

Re: /etc/lvmtab is out of date

Sundar,

Yes, while I was changing paths for devices for a va7400, I ran into the error message that the kernel and lvmtab were out of sync.
This was on the active node of the cluster.
Sundar_7
Honored Contributor

Re: /etc/lvmtab is out of date

Then you got a serious problem to deal with here.

Probably, device files of some of the physical volumes that are part of the volume group has changed and thus you are getting the error message.

1) Halt the package using the VG
2) # vgexport -s -v -m /tmp/vgusr.map /dev/vgusr
# mkdir /dev/vgusr
# mknod /dev/vgusr/group c 64 0x??0000
# vgimport -s -v -m /tmp/vgusr.map /dev/vgusr
3) Start the package


Learn What to do ,How to do and more importantly When to do ?
Sylvia Welch
Frequent Advisor

Re: /etc/lvmtab is out of date

Sundar,

Nope didnt work. Did the export/import.
Same error.
Dietmar Konermann
Honored Contributor

Re: /etc/lvmtab is out of date

Syl,

up to now we dont't know any hard facts about the problem you're seeing.

Please post the results of:

# strings /etc/lvmtab

# vgdisplay -v

# vgchnange -a y -or-
# vgchnange -a e

I also attached a script, called cmpdisks. Please post the result of:

# ./cmpdisks

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)