[linux-lvm] brainfart: lilo'd a PV
Takahiro Yasui
tyasui at redhat.com
Fri Dec 18 00:48:52 UTC 2009
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.
Thanks,
Taka
More information about the linux-lvm
mailing list