Re: mdadm /boot mirror and sun disklabel corruption

2017-09-08 Thread blmink

Hi, Adrian
On a sidenote: Would you mind enabling popcon for your sparc64 
installations,

so we get more counts of people running Debian on sparc64 hardware?

I've  installed and enabled popcon on 4 my sparc64 machines.

Fedor



Re: mdadm /boot mirror and sun disklabel corruption

2017-09-08 Thread blmink

07.09.2017 11:30, Tom Turelinckx пишет:
Hi, Tom

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. 
I'm using a similar layout for boot disks. I leave the first cylinder 
on the disk unused, except for partition 3 (whole disk); I limit 
partition 1 (boot partition) so the end of the partition falls within 
512MB from the start of the disk; I use v0.90 metadata for md1 
(/boot), and format it as ext2.
You can try to use v1.2 metadata for /boot. It won't overwrite sun disk 
label.

I'm format /boot fs like ext3. Unfortunately SILO doesn't support ext4.
Not all of those may be necessary anymore, but I've been doing it like 
that since squeeze and up to the current sid on dozens of machines, 
and it works reliably: when the first disk fails, I am able to boot 
from the second disk. Tom




Re: mdadm /boot mirror and sun disklabel corruption

2017-09-07 Thread blmink

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.




Re: mdadm /boot mirror and sun disklabel corruption

2017-09-07 Thread John Paul Adrian Glaubitz

Hi Tom!

On 09/07/2017 10:30 AM, Tom Turelinckx wrote:

Not all of those may be necessary anymore, but I've been doing it like
that since squeeze and up to the current sid on dozens of machines, and
it works reliably: when the first disk fails, I am able to boot from the
second disk.


On a sidenote: Would you mind enabling popcon for your sparc64 installations,
so we get more counts of people running Debian on sparc64 hardware?

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: Re: mdadm /boot mirror and sun disklabel corruption

2017-09-07 Thread Tom Turelinckx
Hi Fedor,

> 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.

I'm using a similar layout for boot disks.

I leave the first cylinder on the disk unused, except for partition 3 (whole 
disk); I limit partition 1 (boot partition) so the end of the partition falls 
within 512MB from the start of the disk; I use v0.90 metadata for md1 (/boot), 
and format it as ext2.

Not all of those may be necessary anymore, but I've been doing it like that 
since squeeze and up to the current sid on dozens of machines, and it works 
reliably: when the first disk fails, I am able to boot from the second disk.

Tom




Re: mdadm /boot mirror and sun disklabel corruption

2017-09-06 Thread 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?




Re: Re: mdadm /boot mirror and sun disklabel corruption

2017-09-06 Thread Hermann Lauer
Hey Adrian,
from the old, golden sparc days:
On Wed, Sep 06, 2017 at 04:59:44PM +0200, John Paul Adrian Glaubitz wrote:
> On 09/06/2017 04:40 PM, Fedor Konstantinov wrote:
> > I would greatly appreciate if it could be possible to add to the installer 
> > ability to
> > select mdadm metadata version when creating RAID arrays. Now, when creating 
> > mirror for
> > /boot partition (at sun disk slice 0) installer uses v1.2 metadata and so 
> > it corrupts
> > sun disklabel. To avoid disklabel corruption, now I have to manually create 
> > such partition
> > with v0.90 metadata, and ext3 fs in it.

I used v1.0 metadata for the same reason: slice 0 contains at the beginning
partitioning information, which will be overwritten by >1.0 versions. Up
to there raid bitmaps where at the end. Setup worked with breaking out to a
shell, creating raid1 and the continue in the installer.

> So, you want to use an old metadata format? Wouldn't it make more sense to 
> fix the bug
> in question?
> 
> Also, you want to create a mirrored boot directory, is that correct?

Did that - caveeat was, that the partition table is mirrored, so only
the layout of the smaller disk could be used.

Greetings
  Hermann

-- 
Netzwerkadministration/Zentrale Dienste, Interdiziplinaeres 
Zentrum fuer wissenschaftliches Rechnen der Universitaet Heidelberg
IWR; INF 205; 69120 Heidelberg; Tel: (06221)54-14405 Fax: -14427
Email: hermann.la...@iwr.uni-heidelberg.de



Re: mdadm /boot mirror and sun disklabel corruption

2017-09-06 Thread Fedor Konstantinov

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. :(


06.09.2017 17:59, John Paul Adrian Glaubitz пишет:

On 09/06/2017 04:40 PM, Fedor Konstantinov wrote:
I would greatly appreciate if it could be possible to add to the 
installer ability to
select mdadm metadata version when creating RAID arrays. Now, when 
creating mirror for
/boot partition (at sun disk slice 0) installer uses v1.2 metadata 
and so it corrupts
sun disklabel. To avoid disklabel corruption, now I have to manually 
create such partition

with v0.90 metadata, and ext3 fs in it.


So, you want to use an old metadata format? Wouldn't it make more 
sense to fix the bug

in question?

Also, you want to create a mirrored boot directory, is that correct?

Adrian





Re: mdadm /boot mirror and sun disklabel corruption

2017-09-06 Thread John Paul Adrian Glaubitz

On 09/06/2017 04:40 PM, Fedor Konstantinov wrote:

I would greatly appreciate if it could be possible to add to the installer 
ability to
select mdadm metadata version when creating RAID arrays. Now, when creating 
mirror for
/boot partition (at sun disk slice 0) installer uses v1.2 metadata and so it 
corrupts
sun disklabel. To avoid disklabel corruption, now I have to manually create 
such partition
with v0.90 metadata, and ext3 fs in it.


So, you want to use an old metadata format? Wouldn't it make more sense to fix 
the bug
in question?

Also, you want to create a mirrored boot directory, is that correct?

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913