From: Tomas Edwardsson <tommi@tommi.org>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Re: Problem with vgscan "only found 626 of 625 LEs for LV"
Date: Wed, 12 Sep 2001 09:40:47 +0000 [thread overview]
Message-ID: <20010912094047.A19059@hp.is> (raw)
In-Reply-To: <20010911104934.C29347@turbolinux.com>; from adilger@turbolabs.com on Tue, Sep 11, 2001 at 10:49:34AM -0600
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
next prev parent reply other threads:[~2001-09-12 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010912094047.A19059@hp.is \
--to=tommi@tommi.org \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.