From: Diederick van Dijk <diedvdyk@jedi.van-dijk.net>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] Problem with UUID, vgscan, vgcfgrestore
Date: Tue, 3 Apr 2001 09:51:35 +0200 [thread overview]
Message-ID: <01040309513501.00915@darkvader> (raw)
In-Reply-To: <200104030623.f336NGn31932@webber.adilger.int>
On Tuesday 03 April 2001 08:23, you wrote:
> Diederick van Dijk writes:
> > On Monday 02 April 2001 23:00, you wrote:
> > > Diederick van Dijk writes:
> > > > I've a LVM of 8 physical volumes that I've created with LVM 0.9.1
> > > > beta 2. I've the know problem that vgscan reports that it can't find
> > > > my VG. So I upgraded to LVM 0.9.1 beta 6 (tools and kernel) and
> > > > runned on each physical disk a vgcfgrestore. Unfortunately I didn't
> > > > solve the problem. Attached is the output of the commands vgdisplay
> > > > -v and a pvdata -U for each physical disk. Debug logs a very huge so
> > > > I won't attach them.
> > >
> > > You can try the following (experimental) procedure to fix the UUIDs:
> > >
> > > Check each PV with "pvdata -PP /dev/hdX" to ensure it has a valid
> > > UUID assigned. Also get the PV numbers (starting with 1) for each of
> > > the PVs. Finally, check the pv_uuidlist_on_disk.base for each PV.
> > > It will normally be 6144, but it does not have to be.
> > >
> > > for each PV (in PV# order)
> > > dd if=/dev/hdX bs=1 skip=44 count=128 >> /tmp/uuids
> > >
> > > This should create a file /tmp/uuids which has all of the PV UUIDs in
> > > it. Make sure there are as many UUIDs in the file ("od -a /tmp/uuids"
> > > is good) as you have PVs (8 in your case).
> > >
> > > Now, we want to write the UUID list back to the PVs so vgscan is happy:
> > >
> > > for each PV (in any order)
> > > dd if=/tmp/uuids of=/dev/hdX bs=1 seek=<pv_uuidlist_on_disk.base for
> > > hdX>
> >
> > Unfortunately this doesn't work. I get on of=/dev/hda2 an invalid
> > argument. Can you write to a partition with dd ? Or has it to be a disk
> > such as /dev/hda ?
>
> Should work fine writing to /dev/hda2. The only thing that _may_ be an
> issue is that we are not writing aligned sectors to the disk, but under
> Linux even the "raw" disk devices are buffered I/O. I just tested the
> above commands under 2.2.18 and it worked fine and my VG is still alive.
>
> Can you send the exact command-line you are using? Also useful would be
> pvdata -PP for each disk in the VG. If you are sure you are using the
> correct command-line for dd, you could try running it under "strace" to
> see where it is getting -EINVAL from.
>
> Cheers, Andreas
Ok Andreas,
My current system is on kernel 2.4.2 with LVM support build into the kernel.
So I booted with a 2.2.18 kernel with no LVM support what so ever and
the dd commands worked fine. Then I booted with the 2.4.2 kernel again and
did a vgscan and this worked too ! I checked the UUID's on the PV's
with pvdata -U /dev/hdxx and the UUID lists are now as they have to be.
If guess that LVM support in the kernel and dd were in conflict. To check
that I will boot with a 2.4.2 kernel without LVM support and try the dd
dd commands later on.
Thanks from a happy Diederick
next prev parent reply other threads:[~2001-04-03 7:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-02 5:43 [linux-lvm] Problem with UUID, vgscan, vgcfgrestore Diederick van Dijk
2001-04-02 21:00 ` Andreas Dilger
2001-04-03 5:34 ` Diederick van Dijk
2001-04-03 6:23 ` Andreas Dilger
2001-04-03 7:51 ` Diederick van Dijk [this message]
2001-04-03 20:43 ` Diederick van Dijk
2001-04-03 21:36 ` Andreas Dilger
2001-04-03 22:15 ` Diederick van Dijk
2001-04-03 22:30 ` Andreas Dilger
2001-04-25 11:51 ` David Vidal Rodriguez
2001-04-25 15:49 ` Heinz J. Mauelshagen
2001-04-25 14:03 ` David Vidal Rodriguez
2001-04-25 16:26 ` Andreas Dilger
2001-04-27 10:47 ` Heinz J. Mauelshagen
2001-04-30 18:16 ` Andreas Dilger
2001-05-02 12:45 ` Heinz J. Mauelshagen
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=01040309513501.00915@darkvader \
--to=diedvdyk@jedi.van-dijk.net \
--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.