cancel
Showing results for 
Search instead for 
Did you mean: 

LVM on Redhat Issue

Phil Daws_5
Occasional Advisor

LVM on Redhat Issue

Hi,

i have just had a issue where we have presented some new storage to a server and the disk ids for a existing VG have changed.

i am now unable to activate the VG, and if I perform a VGSCAN to try and pick up the changed disk ids I get the message :-

vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "skuat1_san_vg" from physical volume(s)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created

if I perform a strings on the disks I can see the LVM structure :-

[root@skuat1 root]# strings /dev/sdd1 | more
1xF0bx7eWvLrCwBld260IDNSffhHdn9Z
skuat1_san_vg
skuat11121425421
57TzP2YeZCSkiSzzSBsRxv0IckLTNOgD
1xF0bx7eWvLrCwBld260IDNSffhHdn9Z
GKoGbfD5ZH7jBaGXPaU2fJuJ1bYHqckd
4cUTYbhNf1hSmZGEVxwKrt02I0BCbXBi
6SdSl0KnAKUSrUl8K6z7vVE1ud5IHTQW
/dev/skuat1_san_vg/mhds1_lv
skuat1_san_vg

How can I force it to pick up the LVM information from the disks ?

TIA
7 REPLIES
Pedro Cirne
Esteemed Contributor

Re: LVM on Redhat Issue

Hi,

Try to move /etc/lvmtab to another file before doing vgscan.

Please post strings /etc/lvmtab before and after running vgscan

Enjoy :)

Pedro
Phil Daws_5
Occasional Advisor

Re: LVM on Redhat Issue

[root@skuat1 etc]# mv lvmtab lvmtab.old
[root@skuat1 etc]# vgscan -f
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- found active volume group "skuat1_loc_vg"
vgscan -- ERROR "vg_read_with_pv_and_lv(): current PV" can't get data of volume group "skuat1_san_vg" from physical volume(s)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume groups

[root@skuat1 etc]# strings /etc/lvmtab
[root@skuat1 etc]# strings /etc/lvmtab.old
skuat1_loc_vg
[root@skuat1 etc]# strings /etc/lvmtab
skuat1_loc_vg
Simon Hargrave
Honored Contributor

Re: LVM on Redhat Issue

Is it possible that the "new" disks you published were used previously with LVM and have LVM structures on too, and that the name of the volume group on these possibly clashes with your existing one?

I've seen it where eg a vg01 existed on server a and another vg01 on server b. When the LUNs from vg01 are subsequently published to server a vgscan only picks up the first vg01 it "sees". So perhaps your new luns have the same vg name on, but not all the required LUNs from that old vg are published to the new server therefore it can't find all required disks?

To start with I'd strings a dd from the "new" disks to see what they show.
Florian Heigl (new acc)
Honored Contributor

Re: LVM on Redhat Issue

I think the error message is trying to say that one of the disks currently bound to a volume group does not have the correct structures for lvm.
yesterday I stood at the edge. Today I'm one step ahead.
Ivan Ferreira
Honored Contributor

Re: LVM on Redhat Issue

Try restore the LVM configuration using the vgcfgrestore command. By default at installation vgcfgbackup saves the configuration in /etc/lvm/backup. See the man pages for more info.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: LVM on Redhat Issue

You said the PV's changed location. It looks like one is currently '/dev/sdd1'. What were they previously?
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: LVM on Redhat Issue

Oh!, the device naming changed, i didn't see that.

What you can do is before adding the new storage export the VG (vgexport), after adding the storage, import the VG again (vgimport).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?