[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mdadm /boot mirror and sun disklabel corruption



06.09.2017 20:46, Frank Scheiner пишет:
On 09/06/2017 05:21 PM, Fedor Konstantinov wrote:
I'm creating mirrored system disk.
For example I make partitions on two disks like the following:
1. 500MB for /boot - boot partition
2. 2GB for swap - swap
3. Whole disk - sun's whole disk
4. 31,6GB for / - rest for the root fs

Then I create metadevices (mirrors) for partitions 1,2 and 4.

We know, that sun disk label (partition table) resides at the beginning of the disk. In our case partition 1 (for the /boot filesystem) is also at the beginning of the disk. When debian installer creates mdadm metadata v1.2 for partition 1 it overwrites sun disklabel. As a result after installation OBP can't read disk label and boot the system. Version 0.90 metadata resides at the end of partition, so it is safe to use it for partitions at the beginning of disks with sun disklabel.

Unfortunately, in the debian installer we don't have possibility to select metadata version during install. :(

I'm not familiar with all the details of mdadm, but the way you describe it, it sounds like mdadm metadata is per partition and not per disk.

Then couldn't this issue be worked around by creating a small unused partition at the beginning of the disk in question which hence offsets the partition for `/boot`? So that mdadm v1.2 metadata for the `/boot` partition does not end in the Sun disk label?
Yes. It's possible to create unused partition at track 0 of the disk. But we will lose some amount of disk space in such case.


Reply to: