From: "Bryn M. Reeves" <bmr@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] brainfart: lilo'd a PV
Date: Fri, 18 Dec 2009 12:09:46 +0000 [thread overview]
Message-ID: <1261138186.11367.48.camel@localhost> (raw)
In-Reply-To: <4B2AD174.40402@redhat.com>
On Thu, 2009-12-17 at 19:48 -0500, Takahiro Yasui wrote:
> On 12/17/09 18:41, Brian J. Murrell wrote:
> > I managed to write a lilo block (lilo) to the start of a PV which I have
> > on /dev/sda (note, /dev/sda is a whole disk PV, unpartitioned).
> >
> > However, looking at a number of different PVs here, it appears that the
> > LVM data starts at 0x200 with: "LABELONE". i.e.:
> >
> > # hexdump -C /dev/sdc3
> > 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> > *
> > 00000200 4c 41 42 45 4c 4f 4e 45 01 00 00 00 00 00 00 00 |LABELONE........|
> > ...
> > # hexdump -C /dev/sdb
> > 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> > *
> > 000001b0 00 00 00 00 00 00 00 00 dc 59 0f 10 cf c9 00 00 |.........Y......|
> > 000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> > *
> > 00000200 4c 41 42 45 4c 4f 4e 45 01 00 00 00 00 00 00 00 |LABELONE........|
> > ...
> > # hexdump -C /dev/sda
> > 00000000 fa eb 31 12 00 00 4c 49 4c 4f 16 08 10 00 01 00 |..1...LILO......|
> > ...
> > 00000180 30 e4 cd 13 eb 91 e8 93 fe 44 69 73 6b 20 72 65 |0........Disk re|
> > 00000190 61 64 20 65 72 72 6f 72 0d 0a 00 00 00 00 00 00 |ad error........|
> > 000001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> > 000001b0 00 00 00 00 00 00 00 00 c6 08 1a 45 cf c9 00 00 |...........E....|
> > 000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> > *
> > 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
> > 00000200 4c 41 42 45 4c 4f 4e 45 01 00 00 00 00 00 00 00 |LABELONE........|
> >
> > Is that correct?
>
> Yes. The area begin with "LABELONE" is PV label, which is recorded in
> the first sector by default. This is the description from the pvcreate
> man page.
>
> --labelsector sector
> By default the PV is labelled with an LVM2 identifier in its
> second sector (sector 1). This lets you use a different sector
> near the start of the disk (between 0 and 3 inclusive - see
> LABEL_SCAN_SECTORS in the source). Use with care.
>
> > Is there anything I should do to repair this or is my brainfart benign
> > to this PV?
>
> You don't have any problem on the PV, do you?
> I don't think you need something to repair the PV.
Yeah, you should be fine here since LVM2 does not use the 1st sector of
the device and the MBR (and hence lilo) does all its work in that 1st
sector. The LVM2 PV label begins in the 2nd sector (as you've noticed)
and has been left intact by these changes.
You could always zero out sector 0 to avoid confusion:
dd if=/dev/zero of=/path/to/pv bs=512 count=1
Regards,
Bryn.
prev parent reply other threads:[~2009-12-18 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 23:41 [linux-lvm] brainfart: lilo'd a PV Brian J. Murrell
2009-12-18 0:48 ` Takahiro Yasui
2009-12-18 2:03 ` [linux-lvm] " Brian J. Murrell
2009-12-18 2:16 ` malahal
2009-12-18 3:12 ` Takahiro Yasui
2009-12-18 3:31 ` Ray Morris
2009-12-18 12:09 ` Bryn M. Reeves [this message]
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=1261138186.11367.48.camel@localhost \
--to=bmr@redhat.com \
--cc=linux-lvm@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).