* [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
2001-09-06 12:32 [linux-lvm] " Tomas Edwardsson
@ 2001-09-07 10:35 ` Tomas Edwardsson
2001-09-07 16:59 ` Andreas Dilger
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Edwardsson @ 2001-09-07 10:35 UTC (permalink / raw)
To: linux-lvm
Hmm, anyone able to help with this? All my data is currently offline and
I really need it back so if anyone could help please!
- Tommi
On Thu, Sep 06, 2001 at 12:32:45PM +0000, Tomas Edwardsson wrote:
> Here is what vgscan shows:
>
> vgscan -- reading all physical volumes (this may take a while...)
> vgscan -- found inactive volume group "vg00"
> vgscan -- only found 626 of 625 LEs for LV /dev/vg00/lvol1 (0)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "vg00" from physical volume(s)
> vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
>
> I also tried pvscna, but I don't know if that's relevant:
>
> pvscan -- reading all physical volumes (this may take a while...)
> pvscan -- inactive PV "/dev/hdb2" is associated to an unknown VG (run vgscan)
> pvscan -- inactive PV "/dev/hdc2" is associated to an unknown VG (run vgscan)
> pvscan -- inactive PV "/dev/hdd1" is associated to an unknown VG (run vgscan)
> pvscan -- total: 3 [16.00 GB] / in use: 3 [16.00 GB] / in no VG: 0 [0]
>
> - Tomas Edwardsson
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
2001-09-07 10:35 ` [linux-lvm] " Tomas Edwardsson
@ 2001-09-07 16:59 ` Andreas Dilger
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Dilger @ 2001-09-07 16:59 UTC (permalink / raw)
To: linux-lvm
On Sep 07, 2001 10:35 +0000, Tomas Edwardsson wrote:
> Hmm, anyone able to help with this? All my data is currently offline and
> I really need it back so if anyone could help please!
>
> - Tommi
>
> On Thu, Sep 06, 2001 at 12:32:45PM +0000, Tomas Edwardsson wrote:
> > Here is what vgscan shows:
> >
> > vgscan -- reading all physical volumes (this may take a while...)
> > vgscan -- found inactive volume group "vg00"
> > vgscan -- only found 626 of 625 LEs for LV /dev/vg00/lvol1 (0)
> > vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "vg00" from physical volume(s)
> > vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
It looks like the PE table does not match what is in the LV table for
that LV (i.e. the PE table has 626 PEs that claim to be part of the LV,
but the LV says it has only 625 LEs allocated).
Two possibilities: you recently added an LE to the LV and you had a crash
(or an LVM bug), or somehow you had an error writing to disk. You can try
restoring a copy of the metadata with vgcfgrestore to see if it helps.
Failing that, check pvdata -avP <disk> to see what is wrong.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
[not found] <20010911112241.A16588@hp.is>
@ 2001-09-11 11:30 ` Tomas Edwardsson
2001-09-11 16:49 ` Andreas Dilger
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Edwardsson @ 2001-09-11 11:30 UTC (permalink / raw)
To: linux-lvm
I had already tried the vgcfgrestore, it didn't seem to help but I discovered
that the UUID for one of my PVs was missing so I ran the uuid-fixer and now
they all have UUIDs again (don't know if that is relevant).
I have run the pvdata on all my PVs although I think the right one is the
following file run with pvdata -avP /dev/hdd1:
http://vefur.hp.is/lvm/pvdata-hdd1.txt
I also documented a few more commands:
pvdata -avP /dev/hdb2, http://vefur.hp.is/lvm/pvdata-hdb2.txt
pvdata -avP /dev/hdc2, http://vefur.hp.is/lvm/pvdata-hdc2.txt
pvscan, http://vefur.hp.is/lvm/pvscan.txt
vgscan, http://vefur.hp.is/lvm/vgscan.txt
On Tue, Sep 11, 2001 at 11:22:41AM +0000, Tomas Edwardsson wrote:
> On Sep 07, 2001 10:35 +0000, Tomas Edwardsson wrote:
> > Hmm, anyone able to help with this? All my data is currently offline and
> > I really need it back so if anyone could help please!
> >
> > - Tommi
> >
> > On Thu, Sep 06, 2001 at 12:32:45PM +0000, Tomas Edwardsson wrote:
> > > Here is what vgscan shows:
> > >
> > > vgscan -- reading all physical volumes (this may take a while...)
> > > vgscan -- found inactive volume group "vg00"
> > > vgscan -- only found 626 of 625 LEs for LV /dev/vg00/lvol1 (0)
> > > vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" can't get data of volume group "vg00" from physical volume(s)
> > > vgscan -- ERROR "vg_read_with_pv_and_lv(): allocated LE of LV" creating "/etc/lvmtab" and "/etc/lvmtab.d"
>
> It looks like the PE table does not match what is in the LV table for
> that LV (i.e. the PE table has 626 PEs that claim to be part of the LV,
> but the LV says it has only 625 LEs allocated). Two possibilities: you recently added an LE to the LV and you had a crash
> (or an LVM bug), or somehow you had an error writing to disk. You can try
> restoring a copy of the metadata with vgcfgrestore to see if it helps. Failing that, check pvdata -avP <disk> to see what is wrong. Cheers, Andreas
> --
> Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
> \ would they cancel out, leaving him still hungry?"
> http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
2001-09-11 11:30 ` [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV" Tomas Edwardsson
@ 2001-09-11 16:49 ` Andreas Dilger
2001-09-12 9:40 ` Tomas Edwardsson
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2001-09-11 16:49 UTC (permalink / raw)
To: linux-lvm
On Sep 11, 2001 11:30 +0000, Tomas Edwardsson wrote:
> I had already tried the vgcfgrestore, it didn't seem to help but I discovered
> that the UUID for one of my PVs was missing so I ran the uuid-fixer and now
> they all have UUIDs again (don't know if that is relevant).
>
> I have run the pvdata on all my PVs although I think the right one is the
> following file run with pvdata -avP /dev/hdd1:
> http://vefur.hp.is/lvm/pvdata-hdd1.txt
Yes, this clearly shows that lvol1 has 625 LEs (in the LV data), but it
has PE 0-625 from that PV assigned to it (total of 626 PEs). I don't
know which one is correct, nor how it got that way. If you have a
filesystem on that LV, you could find out how big the fs is to figure
out which value needs fixing. For ext2, you can do:
dumpe2fs -h /dev/vg00/lvol1
and figure out if it is 2500MB (625 LE) or 2504MB (626LE). Then (the fun
part) you need to go and edit either the LV table or the PE table to have
the right numbers in it. I'm guessing the LV table is wrong (and even if
not, it is safer to add the PE to the end than to truncate your filesystem).
dd if=/dev/hdd1 of=/hdd.sav bs=1024 count=188 # backup LVM metadata
dd if=/dev/hdd1 of=/lv1.dat bs=1 skip=43008 count=328 # get lvol1 metadata
od -Ad -tx1 /lv1.dat # show lvol1 metadata
# 625 = 0x271 which you should see at offset 300, 301 of the LV struct
# 626 = 0x272 = 0x02 0x72, 0x72 = "r" in ASCII, so we write this into LV
echo "r" | dd of=/lv1.dat count=1 seek=300 # write 0x72 to LE count
od -Ad -tx1 /lv1.dat # show lvol1 metadata
# we should now see 0x72 0x02 0x00 0x00 at offset 300 of the LV metadata
dd if=/lv1.dat of=/dev/hdd1 bs=1 seek=43008 # write LV meta to disk
pvdata -avP /dev/hdd1 # verify all is well
vgscan # should be OK now
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
2001-09-11 16:49 ` Andreas Dilger
@ 2001-09-12 9:40 ` Tomas Edwardsson
0 siblings, 0 replies; 5+ messages in thread
From: Tomas Edwardsson @ 2001-09-12 9:40 UTC (permalink / raw)
To: linux-lvm
Well, problem number 1. vgscan fails and therefore vgchange does also.
]# ll -d /dev/vg00
ls: /dev/vg00: No such file or directory
I ran the rest of the commands just the same since we have a backup.
After I did that it seems all LV and LE info has evaporated.
Current pvdata is http://vefur.hp.is/lvm/pvdata-hdd1-new.txt
Thanks, Tommi
On Tue, Sep 11, 2001 at 10:49:34AM -0600, Andreas Dilger wrote:
> On Sep 11, 2001 11:30 +0000, Tomas Edwardsson wrote:
> > I had already tried the vgcfgrestore, it didn't seem to help but I discovered
> > that the UUID for one of my PVs was missing so I ran the uuid-fixer and now
> > they all have UUIDs again (don't know if that is relevant).
> >
> > I have run the pvdata on all my PVs although I think the right one is the
> > following file run with pvdata -avP /dev/hdd1:
> > http://vefur.hp.is/lvm/pvdata-hdd1.txt
>
> Yes, this clearly shows that lvol1 has 625 LEs (in the LV data), but it
> has PE 0-625 from that PV assigned to it (total of 626 PEs). I don't
> know which one is correct, nor how it got that way. If you have a
> filesystem on that LV, you could find out how big the fs is to figure
> out which value needs fixing. For ext2, you can do:
>
> dumpe2fs -h /dev/vg00/lvol1
>
> and figure out if it is 2500MB (625 LE) or 2504MB (626LE). Then (the fun
> part) you need to go and edit either the LV table or the PE table to have
> the right numbers in it. I'm guessing the LV table is wrong (and even if
> not, it is safer to add the PE to the end than to truncate your filesystem).
>
> dd if=/dev/hdd1 of=/hdd.sav bs=1024 count=188 # backup LVM metadata
> dd if=/dev/hdd1 of=/lv1.dat bs=1 skip=43008 count=328 # get lvol1 metadata
> od -Ad -tx1 /lv1.dat # show lvol1 metadata
>
> # 625 = 0x271 which you should see at offset 300, 301 of the LV struct
> # 626 = 0x272 = 0x02 0x72, 0x72 = "r" in ASCII, so we write this into LV
> echo "r" | dd of=/lv1.dat count=1 seek=300 # write 0x72 to LE count
>
> od -Ad -tx1 /lv1.dat # show lvol1 metadata
> # we should now see 0x72 0x02 0x00 0x00 at offset 300 of the LV metadata
>
> dd if=/lv1.dat of=/dev/hdd1 bs=1 seek=43008 # write LV meta to disk
> pvdata -avP /dev/hdd1 # verify all is well
> vgscan # should be OK now
>
> Cheers, Andreas
> --
> Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
> \ would they cancel out, leaving him still hungry?"
> http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-09-12 9:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20010911112241.A16588@hp.is>
2001-09-11 11:30 ` [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV" Tomas Edwardsson
2001-09-11 16:49 ` Andreas Dilger
2001-09-12 9:40 ` Tomas Edwardsson
2001-09-06 12:32 [linux-lvm] " Tomas Edwardsson
2001-09-07 10:35 ` [linux-lvm] " Tomas Edwardsson
2001-09-07 16:59 ` Andreas Dilger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.