All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux mdadm superblock question.
@ 2010-02-11 23:00 Justin Piszcz
  2010-02-12  1:52 ` Michael Evans
                   ` (3 more replies)
  0 siblings, 4 replies; 43+ messages in thread
From: Justin Piszcz @ 2010-02-11 23:00 UTC (permalink / raw)
  To: linux-raid; +Cc: linux-kernel

Hi,

I may be converting a host to ext4 and was curious, is 0.90 still the only 
superblock version for mdadm/raid-1 that you can boot from without having 
to create an initrd/etc?

Are there any benefits to using a superblock > 0.90 for a raid-1 boot 
volume < 2TB?

Justin.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-11 23:00 Linux mdadm superblock question Justin Piszcz
@ 2010-02-12  1:52 ` Michael Evans
  2010-02-12  9:06   ` Robin Hill
                     ` (2 more replies)
  2010-02-13  6:42 ` martin f krafft
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 43+ messages in thread
From: Michael Evans @ 2010-02-12  1:52 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid, linux-kernel

On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> Hi,
>
> I may be converting a host to ext4 and was curious, is 0.90 still the only
> superblock version for mdadm/raid-1 that you can boot from without having to
> create an initrd/etc?
>
> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
> < 2TB?
>
> Justin.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

You need the superblock at the end of the partition:  If you read the
manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
NOT 1.2; those use the same superblock layout but different
locations).

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12  1:52 ` Michael Evans
@ 2010-02-12  9:06   ` Robin Hill
  2010-02-12 21:53     ` Mr. James W. Laferriere
  2010-02-13 19:58   ` H. Peter Anvin
  2010-02-16  3:40   ` CaT
  2 siblings, 1 reply; 43+ messages in thread
From: Robin Hill @ 2010-02-12  9:06 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

On Thu Feb 11, 2010 at 05:52:41PM -0800, Michael Evans wrote:

> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> > Hi,
> >
> > I may be converting a host to ext4 and was curious, is 0.90 still the only
> > superblock version for mdadm/raid-1 that you can boot from without having to
> > create an initrd/etc?
> >
> > Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
> > < 2TB?
> >
> > Justin.
> 
> You need the superblock at the end of the partition:  If you read the
> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
> NOT 1.2; those use the same superblock layout but different
> locations).
> 
You also need it to be auto-assembled by the kernel, which is only
version 0.90.

As for benefits, there's a number of benefits of 1.x over 0.90 - I don't
think any of them are terribly important for a small boot partition
though.  There's also benefits to having an initrd anyway.

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12  9:06   ` Robin Hill
@ 2010-02-12 21:53     ` Mr. James W. Laferriere
  2010-02-16  0:57       ` Neil Brown
  2010-02-16 16:42       ` Bill Davidsen
  0 siblings, 2 replies; 43+ messages in thread
From: Mr. James W. Laferriere @ 2010-02-12 21:53 UTC (permalink / raw)
  To: Robin Hill; +Cc: linux-raid

 	Hello Robin ,

On Fri, 12 Feb 2010, Robin Hill wrote:
> On Thu Feb 11, 2010 at 05:52:41PM -0800, Michael Evans wrote:
>
>> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>>> Hi,
>>>
>>> I may be converting a host to ext4 and was curious, is 0.90 still the only
>>> superblock version for mdadm/raid-1 that you can boot from without having to
>>> create an initrd/etc?
>>>
>>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
>>> < 2TB?
>>>
>>> Justin.
>>
>> You need the superblock at the end of the partition:  If you read the
>> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
>> NOT 1.2; those use the same superblock layout but different
>> locations).
>>
> You also need it to be auto-assembled by the kernel, which is only
> version 0.90.
>
> As for benefits, there's a number of benefits of 1.x over 0.90 - I don't
> think any of them are terribly important for a small boot partition
> though.  There's also benefits to having an initrd anyway.
>
> Cheers,
>    Robin

 	One can use the 'append=""' functionality of lilo & I am user that 
Grub2(and family) has some method of doing the same .
 	ie:
append=" md=1,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1 md=2,/dev/sda2,/dev/sdb2,/dev/sdc2,/dev/sdd2 md=3,/dev/sda3,/dev/sdb3 md=4,/dev/sda4,/dev/sdb4 vt.default_utf8=0 sysrq_always_enabled=1"

 	Not sure if this would be usable with a 1.1+ version of the MD headers .

 	I'd really like to see a REAL case that shows a good example of the use 
of initrd that absolutely can NOT be done only because of someones 
unwillingness to create it in the kernel or to allow others too .

 		Hth ,  JimL
-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network&System Engineer | 3237     Holden Road |  Give me Linux  |
| babydr@baby-dragons.com | Fairbanks, AK. 99709 |   only  on  AXP |
+------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-11 23:00 Linux mdadm superblock question Justin Piszcz
  2010-02-12  1:52 ` Michael Evans
@ 2010-02-13  6:42 ` martin f krafft
  2010-02-13  8:37 ` Giovanni Tessore
  2010-02-16  0:50 ` Neil Brown
  3 siblings, 0 replies; 43+ messages in thread
From: martin f krafft @ 2010-02-13  6:42 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

also sprach Justin Piszcz <jpiszcz@lucidpixels.com> [2010.02.12.1200 +1300]:
> I may be converting a host to ext4 and was curious, is 0.90 still the
> only superblock version for mdadm/raid-1 that you can boot from
> without having to create an initrd/etc?
> 
> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
> volume < 2TB?

FYI: http://bugs.debian.org/492897

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
it may look like i'm just sitting here doing nothing.
but i'm really actively waiting
for all my problems to go away.
 
spamtraps: madduck.bogus@madduck.net

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-11 23:00 Linux mdadm superblock question Justin Piszcz
  2010-02-12  1:52 ` Michael Evans
  2010-02-13  6:42 ` martin f krafft
@ 2010-02-13  8:37 ` Giovanni Tessore
  2010-02-13  9:26   ` Michael Evans
  2010-02-16  0:50 ` Neil Brown
  3 siblings, 1 reply; 43+ messages in thread
From: Giovanni Tessore @ 2010-02-13  8:37 UTC (permalink / raw)
  To: linux-raid


> I may be converting a host to ext4 and was curious, is 0.90 still the 
> only superblock version for mdadm/raid-1 that you can boot from 
> without having to create an initrd/etc?
>
> Are there any benefits to using a superblock > 0.90 for a raid-1 boot 
> volume < 2TB?

I recently reinstalled my systems, and I had to use superblock 0.9 to be 
able to boot ext4 from raid-1 (kernel 2.6.31 - grub2 1.97-beta4).
I didn't go deep with it as I was quite in hurry, so I'm not sure if it 
depends by grub2 or by kernel's md autodetection at boot.
I used superblock 1.1 for the others md devices.

The advantage of superblocks >= 1.0 that I prefere is that they persist 
the number of recovered read errors; this allow to monitor (at the 
moment manually via /sys/block/mdXX/devYY/errors) across system restarts 
the health of devices into the array, useful for raid-5 and 2-disks raid-1.

Regards

-- 
Cordiali saluti.
Yours faithfully.

Giovanni Tessore



^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13  8:37 ` Giovanni Tessore
@ 2010-02-13  9:26   ` Michael Evans
  2010-02-13  9:35     ` Giovanni Tessore
  0 siblings, 1 reply; 43+ messages in thread
From: Michael Evans @ 2010-02-13  9:26 UTC (permalink / raw)
  To: Giovanni Tessore; +Cc: linux-raid

On Sat, Feb 13, 2010 at 12:37 AM, Giovanni Tessore <giotex@texsoft.it> wrote:
>
>> I may be converting a host to ext4 and was curious, is 0.90 still the only
>> superblock version for mdadm/raid-1 that you can boot from without having to
>> create an initrd/etc?
>>
>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
>> volume < 2TB?
>
> I recently reinstalled my systems, and I had to use superblock 0.9 to be
> able to boot ext4 from raid-1 (kernel 2.6.31 - grub2 1.97-beta4).
> I didn't go deep with it as I was quite in hurry, so I'm not sure if it
> depends by grub2 or by kernel's md autodetection at boot.
> I used superblock 1.1 for the others md devices.
>
> The advantage of superblocks >= 1.0 that I prefere is that they persist the
> number of recovered read errors; this allow to monitor (at the moment
> manually via /sys/block/mdXX/devYY/errors) across system restarts the health
> of devices into the array, useful for raid-5 and 2-disks raid-1.
>
> Regards
>
> --
> Cordiali saluti.
> Yours faithfully.
>
> Giovanni Tessore
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

mdadm 1.0 block devices, since stored at the end, can still be used
/read only/ the same way that 0.90 devices were used before grub knew
how to talk to them.  By looking at the underlying block devices and
ignoring their tails.  This does however only hold for raid-1 layouts
with the 1.0 or 0.90 format labels.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13  9:26   ` Michael Evans
@ 2010-02-13  9:35     ` Giovanni Tessore
  2010-02-13  9:40       ` Michael Evans
  0 siblings, 1 reply; 43+ messages in thread
From: Giovanni Tessore @ 2010-02-13  9:35 UTC (permalink / raw)
  To: linux-raid


>> I recently reinstalled my systems, and I had to use superblock 0.9 to be
>> able to boot ext4 from raid-1 (kernel 2.6.31 - grub2 1.97-beta4).
>> I didn't go deep with it as I was quite in hurry, so I'm not sure if it
>> depends by grub2 or by kernel's md autodetection at boot.
>> I used superblock 1.1 for the others md devices.
>>
>> ...
> mdadm 1.0 block devices, since stored at the end, can still be used
> /read only/ the same way that 0.90 devices were used before grub knew
> how to talk to them.  By looking at the underlying block devices and
> ignoring their tails.  This does however only hold for raid-1 layouts
> with the 1.0 or 0.90 format labels.

I guessed so, infact I created superblock 1.0 for the raid-1 devices md0 
(root) and md1 (swap), while 1.1 for the others .. but it didn't work 
and I had to revert to 0.9 for root and swap ...

Regards

-- 
Cordiali saluti.
Yours faithfully.

Giovanni Tessore



^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13  9:35     ` Giovanni Tessore
@ 2010-02-13  9:40       ` Michael Evans
  2010-02-13 10:06         ` Giovanni Tessore
  0 siblings, 1 reply; 43+ messages in thread
From: Michael Evans @ 2010-02-13  9:40 UTC (permalink / raw)
  To: Giovanni Tessore; +Cc: linux-raid

On Sat, Feb 13, 2010 at 1:35 AM, Giovanni Tessore <giotex@texsoft.it> wrote:
>
>>> I recently reinstalled my systems, and I had to use superblock 0.9 to be
>>> able to boot ext4 from raid-1 (kernel 2.6.31 - grub2 1.97-beta4).
>>> I didn't go deep with it as I was quite in hurry, so I'm not sure if it
>>> depends by grub2 or by kernel's md autodetection at boot.
>>> I used superblock 1.1 for the others md devices.
>>>
>>> ...
>>
>> mdadm 1.0 block devices, since stored at the end, can still be used
>> /read only/ the same way that 0.90 devices were used before grub knew
>> how to talk to them.  By looking at the underlying block devices and
>> ignoring their tails.  This does however only hold for raid-1 layouts
>> with the 1.0 or 0.90 format labels.
>
> I guessed so, infact I created superblock 1.0 for the raid-1 devices md0
> (root) and md1 (swap), while 1.1 for the others .. but it didn't work and I
> had to revert to 0.9 for root and swap ...
>
> Regards
>
> --
> Cordiali saluti.
> Yours faithfully.
>
> Giovanni Tessore
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Just a guess, but did you tell grub root was /dev/md0 or did you say
root was /dev/sd(whatever backs md0) ?
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13  9:40       ` Michael Evans
@ 2010-02-13 10:06         ` Giovanni Tessore
  0 siblings, 0 replies; 43+ messages in thread
From: Giovanni Tessore @ 2010-02-13 10:06 UTC (permalink / raw)
  To: linux-raid


>>>> I recently reinstalled my systems, and I had to use superblock 0.9 to be
>>>> able to boot ext4 from raid-1 (kernel 2.6.31 - grub2 1.97-beta4).
>>>> I didn't go deep with it as I was quite in hurry, so I'm not sure if it
>>>> depends by grub2 or by kernel's md autodetection at boot.
>>>> I used superblock 1.1 for the others md devices.
>>>>         
>>> mdadm 1.0 block devices, since stored at the end, can still be used
>>> /read only/ the same way that 0.90 devices were used before grub knew
>>> how to talk to them.  By looking at the underlying block devices and
>>> ignoring their tails.  This does however only hold for raid-1 layouts
>>> with the 1.0 or 0.90 format labels.
>>>       
>> I guessed so, infact I created superblock 1.0 for the raid-1 devices md0
>> (root) and md1 (swap), while 1.1 for the others .. but it didn't work and I
>> had to revert to 0.9 for root and swap ...
>>
>>     
>
> Just a guess, but did you tell grub root was /dev/md0 or did you say
> root was /dev/sd(whatever backs md0) ?
>   

Root was set to (md0), I followed the installer of the distro (ubuntu 
9.10 srv) and also tried manually with update-grub and then grub-install 
/dev/sda, grub-install /dev/sdb, grub-install /dev/sdc (3 disk raid-1)
Both failed with superblock 1.0, giving a message like 'missing mapping 
of device /dev/md0', infact into /boot/grub/device.map it was missing 
(even for 0.9), but also adding it ( (md0) /dev/md0 )didn't help, giving 
other error messages.

Btw, even if I missed something, the point is:
- with 0.9 it worked painless
- with 1.0 it didn't work
donno if it dependes by distro, kernel of md, but some different 
behaviour relative to superblock 0.9 and 1.0 existed.
I didn't investigate further as I was in extreme hurry to setup the system.

Regards

-- 
Cordiali saluti.
Yours faithfully.

Giovanni Tessore



^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12  1:52 ` Michael Evans
  2010-02-12  9:06   ` Robin Hill
@ 2010-02-13 19:58   ` H. Peter Anvin
  2010-02-13 20:07     ` Justin Piszcz
  2010-02-16  0:27     ` Neil Brown
  2010-02-16  3:40   ` CaT
  2 siblings, 2 replies; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-13 19:58 UTC (permalink / raw)
  To: Michael Evans; +Cc: Justin Piszcz, linux-raid, linux-kernel

On 02/11/2010 05:52 PM, Michael Evans wrote:
> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>> Hi,
>>
>> I may be converting a host to ext4 and was curious, is 0.90 still the only
>> superblock version for mdadm/raid-1 that you can boot from without having to
>> create an initrd/etc?
>>
>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
>> < 2TB?
>>
>> Justin.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 
> You need the superblock at the end of the partition:  If you read the
> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
> NOT 1.2; those use the same superblock layout but different
> locations).

0.9 has the *serious* problem that it is hard to distinguish a whole-volume

However, apparently mdadm recently switched to a 1.1 default.  I
strongly urge Neil to change that to either 1.0 and 1.2, as I have
started to get complaints from users that they have made RAID volumes
with newer mdadm which apparently default to 1.1, and then want to boot
from them (without playing MBR games like Grub does.)  I have to tell
them that they have to regenerate their disks -- the superblock occupies
the boot sector and there is nothing I can do about it.  It's the same
pathology XFS has.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 19:58   ` H. Peter Anvin
@ 2010-02-13 20:07     ` Justin Piszcz
  2010-02-13 20:49       ` david
  2010-02-13 21:29       ` H. Peter Anvin
  2010-02-16  0:27     ` Neil Brown
  1 sibling, 2 replies; 43+ messages in thread
From: Justin Piszcz @ 2010-02-13 20:07 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Michael Evans, linux-raid, linux-kernel



On Sat, 13 Feb 2010, H. Peter Anvin wrote:

> On 02/11/2010 05:52 PM, Michael Evans wrote:
>> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>>> Hi,
>>>
>>> I may be converting a host to ext4 and was curious, is 0.90 still the only
>>> superblock version for mdadm/raid-1 that you can boot from without having to
>>> create an initrd/etc?
>>>
>>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
>>> < 2TB?
>>>
>>> Justin.
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>> You need the superblock at the end of the partition:  If you read the
>> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
>> NOT 1.2; those use the same superblock layout but different
>> locations).
>
> 0.9 has the *serious* problem that it is hard to distinguish a whole-volume
>
> However, apparently mdadm recently switched to a 1.1 default.  I
> strongly urge Neil to change that to either 1.0 and 1.2, as I have
> started to get complaints from users that they have made RAID volumes
> with newer mdadm which apparently default to 1.1, and then want to boot
> from them (without playing MBR games like Grub does.)  I have to tell
> them that they have to regenerate their disks -- the superblock occupies
> the boot sector and there is nothing I can do about it.  It's the same
> pathology XFS has.
>
> 	-hpa
>

My original question was does the newer superblock do anything special or 
offer new features *BESIDES* the quicker resync?

Justin.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 20:07     ` Justin Piszcz
@ 2010-02-13 20:49       ` david
  2010-02-13 21:07           ` Michael Evans
  2010-02-13 21:29       ` H. Peter Anvin
  1 sibling, 1 reply; 43+ messages in thread
From: david @ 2010-02-13 20:49 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: H. Peter Anvin, Michael Evans, linux-raid, linux-kernel

On Sat, 13 Feb 2010, Justin Piszcz wrote:

> On Sat, 13 Feb 2010, H. Peter Anvin wrote:
>
>> On 02/11/2010 05:52 PM, Michael Evans wrote:
>>> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> 
>>> wrote:
>>>> Hi,
>>>> 
>>>> I may be converting a host to ext4 and was curious, is 0.90 still the 
>>>> only
>>>> superblock version for mdadm/raid-1 that you can boot from without having 
>>>> to
>>>> create an initrd/etc?
>>>> 
>>>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot 
>>>> volume
>>>> < 2TB?
>>>> 
>>>> Justin.
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> 
>>> 
>>> You need the superblock at the end of the partition:  If you read the
>>> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
>>> NOT 1.2; those use the same superblock layout but different
>>> locations).
>> 
>> 0.9 has the *serious* problem that it is hard to distinguish a whole-volume
>> 
>> However, apparently mdadm recently switched to a 1.1 default.  I
>> strongly urge Neil to change that to either 1.0 and 1.2, as I have
>> started to get complaints from users that they have made RAID volumes
>> with newer mdadm which apparently default to 1.1, and then want to boot
>> from them (without playing MBR games like Grub does.)  I have to tell
>> them that they have to regenerate their disks -- the superblock occupies
>> the boot sector and there is nothing I can do about it.  It's the same
>> pathology XFS has.
>>
>> 	-hpa
>> 
>
> My original question was does the newer superblock do anything special or 
> offer new features *BESIDES* the quicker resync?

the older superblocks have limits on the number of devices that can be 
part of the raid set.

David Lang

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 20:49       ` david
@ 2010-02-13 21:07           ` Michael Evans
  0 siblings, 0 replies; 43+ messages in thread
From: Michael Evans @ 2010-02-13 21:07 UTC (permalink / raw)
  To: david; +Cc: Justin Piszcz, H. Peter Anvin, linux-raid, linux-kernel

On Sat, Feb 13, 2010 at 12:49 PM,  <david@lang.hm> wrote:
> On Sat, 13 Feb 2010, Justin Piszcz wrote:
>
>> On Sat, 13 Feb 2010, H. Peter Anvin wrote:
>>
>>> On 02/11/2010 05:52 PM, Michael Evans wrote:
>>>>
>>>> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I may be converting a host to ext4 and was curious, is 0.90 still the
>>>>> only
>>>>> superblock version for mdadm/raid-1 that you can boot from without
>>>>> having to
>>>>> create an initrd/etc?
>>>>>
>>>>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
>>>>> volume
>>>>> < 2TB?
>>>>>
>>>>> Justin.
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-raid"
>>>>> in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>
>>>>
>>>> You need the superblock at the end of the partition:  If you read the
>>>> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
>>>> NOT 1.2; those use the same superblock layout but different
>>>> locations).
>>>
>>> 0.9 has the *serious* problem that it is hard to distinguish a
>>> whole-volume
>>>
>>> However, apparently mdadm recently switched to a 1.1 default.  I
>>> strongly urge Neil to change that to either 1.0 and 1.2, as I have
>>> started to get complaints from users that they have made RAID volumes
>>> with newer mdadm which apparently default to 1.1, and then want to boot
>>> from them (without playing MBR games like Grub does.)  I have to tell
>>> them that they have to regenerate their disks -- the superblock occupies
>>> the boot sector and there is nothing I can do about it.  It's the same
>>> pathology XFS has.
>>>
>>>        -hpa
>>>
>>
>> My original question was does the newer superblock do anything special or
>> offer new features *BESIDES* the quicker resync?
>
> the older superblocks have limits on the number of devices that can be part
> of the raid set.
>
> David Lang
>

The 1.1 and 1.2 formats ALSO play more nicely with stacking partition
contents.  LVM, filesystems, and partition info all begin at the start
of a block device; putting the md labels there too makes it obvious
what order to unpack the structures in.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
@ 2010-02-13 21:07           ` Michael Evans
  0 siblings, 0 replies; 43+ messages in thread
From: Michael Evans @ 2010-02-13 21:07 UTC (permalink / raw)
  To: david; +Cc: Justin Piszcz, H. Peter Anvin, linux-raid, linux-kernel

On Sat, Feb 13, 2010 at 12:49 PM,  <david@lang.hm> wrote:
> On Sat, 13 Feb 2010, Justin Piszcz wrote:
>
>> On Sat, 13 Feb 2010, H. Peter Anvin wrote:
>>
>>> On 02/11/2010 05:52 PM, Michael Evans wrote:
>>>>
>>>> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I may be converting a host to ext4 and was curious, is 0.90 still the
>>>>> only
>>>>> superblock version for mdadm/raid-1 that you can boot from without
>>>>> having to
>>>>> create an initrd/etc?
>>>>>
>>>>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
>>>>> volume
>>>>> < 2TB?
>>>>>
>>>>> Justin.
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-raid"
>>>>> in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>>
>>>>
>>>> You need the superblock at the end of the partition:  If you read the
>>>> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
>>>> NOT 1.2; those use the same superblock layout but different
>>>> locations).
>>>
>>> 0.9 has the *serious* problem that it is hard to distinguish a
>>> whole-volume
>>>
>>> However, apparently mdadm recently switched to a 1.1 default.  I
>>> strongly urge Neil to change that to either 1.0 and 1.2, as I have
>>> started to get complaints from users that they have made RAID volumes
>>> with newer mdadm which apparently default to 1.1, and then want to boot
>>> from them (without playing MBR games like Grub does.)  I have to tell
>>> them that they have to regenerate their disks -- the superblock occupies
>>> the boot sector and there is nothing I can do about it.  It's the same
>>> pathology XFS has.
>>>
>>>        -hpa
>>>
>>
>> My original question was does the newer superblock do anything special or
>> offer new features *BESIDES* the quicker resync?
>
> the older superblocks have limits on the number of devices that can be part
> of the raid set.
>
> David Lang
>

The 1.1 and 1.2 formats ALSO play more nicely with stacking partition
contents.  LVM, filesystems, and partition info all begin at the start
of a block device; putting the md labels there too makes it obvious
what order to unpack the structures in.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 20:07     ` Justin Piszcz
  2010-02-13 20:49       ` david
@ 2010-02-13 21:29       ` H. Peter Anvin
  2010-02-14 20:25         ` Asdo
  1 sibling, 1 reply; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-13 21:29 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: Michael Evans, linux-raid, linux-kernel

On 02/13/2010 12:07 PM, Justin Piszcz wrote:
> 
> My original question was does the newer superblock do anything special
> or offer new features *BESIDES* the quicker resync?
> 

0.90 has a very bad problem, which is that it is hard to distinguish
between a RAID partition at the end of volume and a full RAID device.
This is because 0.90 doesn't actually tell you the start of the device.

Then, of course, there are a lot of limitations on size, number of
devices, and so on in 0.90.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 21:29       ` H. Peter Anvin
@ 2010-02-14 20:25         ` Asdo
  2010-02-14 21:18           ` H. Peter Anvin
  0 siblings, 1 reply; 43+ messages in thread
From: Asdo @ 2010-02-14 20:25 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Justin Piszcz, Michael Evans, linux-raid, linux-kernel

H. Peter Anvin wrote:
> On 02/13/2010 12:07 PM, Justin Piszcz wrote:
>   
> 0.90 has a very bad problem, which is that it is hard to distinguish
> between a RAID partition at the end of volume and a full RAID device.
> This is because 0.90 doesn't actually tell you the start of the device.
>
> Then, of course, there are a lot of limitations on size, number of
> devices, and so on in 0.90.
>
> 	-hpa
>   
I don't understand...
In a system we have, the root filesystem on a raid-6 which is on second 
(and last) partitions of many disks.
It always assembled correctly, it never tried to assemble the whole device.
(on the first partition there is a raid1 with boot)
So what's the problem exactly with not marking the beginning?

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-14 20:25         ` Asdo
@ 2010-02-14 21:18           ` H. Peter Anvin
  2010-02-14 21:34             ` Henrique de Moraes Holschuh
  2010-02-14 23:20             ` Rudy Zijlstra
  0 siblings, 2 replies; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-14 21:18 UTC (permalink / raw)
  To: Asdo; +Cc: Justin Piszcz, Michael Evans, linux-raid, linux-kernel

On 02/14/2010 12:25 PM, Asdo wrote:
> I don't understand...
> In a system we have, the root filesystem on a raid-6 which is on second
> (and last) partitions of many disks.
> It always assembled correctly, it never tried to assemble the whole device.
> (on the first partition there is a raid1 with boot)
> So what's the problem exactly with not marking the beginning?

In Fedora 12, for example, Dracut tries to make the distinction between
whole RAID device and a partition device, and utterly fails -- often
resulting in data loss.

With a pointer to the beginning this would have been a trivial thing to
detect.

IMO it would make sense to support autoassemble for 1.0 superblocks, and
making them the default.  The purpose would be to get everyone off 0.9.
 However, *any* default is better than 1.1.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-14 21:18           ` H. Peter Anvin
@ 2010-02-14 21:34             ` Henrique de Moraes Holschuh
  2010-02-14 23:20             ` Rudy Zijlstra
  1 sibling, 0 replies; 43+ messages in thread
From: Henrique de Moraes Holschuh @ 2010-02-14 21:34 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Asdo, Justin Piszcz, Michael Evans, linux-raid, linux-kernel

On Sun, 14 Feb 2010, H. Peter Anvin wrote:
> IMO it would make sense to support autoassemble for 1.0 superblocks, and
> making them the default.  The purpose would be to get everyone off 0.9.
>  However, *any* default is better than 1.1.

Well, FWIW, I would happily use (and recommend) 1.0 with auto-assemble
(after verifying all the emergency repair toolset in use where I work has
been upgraded to support it) in distros where the bootloader has enough of a
clue to not bork on md-1.0 devices.  Which should be most of the current
crop.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-14 21:18           ` H. Peter Anvin
  2010-02-14 21:34             ` Henrique de Moraes Holschuh
@ 2010-02-14 23:20             ` Rudy Zijlstra
  2010-02-15  3:40               ` Mr. James W. Laferriere
  1 sibling, 1 reply; 43+ messages in thread
From: Rudy Zijlstra @ 2010-02-14 23:20 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Asdo, Justin Piszcz, Michael Evans, linux-raid, linux-kernel

H. Peter Anvin wrote:
> In Fedora 12, for example, Dracut tries to make the distinction between
> whole RAID device and a partition device, and utterly fails -- often
> resulting in data loss.
>
>   
i do not use Fedora/redhat and do not intent to ever try them again... 
still, the point is valid
> With a pointer to the beginning this would have been a trivial thing to
> detect.
>
> IMO it would make sense to support autoassemble for 1.0 superblocks, and
> making them the default.  The purpose would be to get everyone off 0.9.
>  However, *any* default is better than 1.1.
>
> 	-hpa
>
>   
As long is autodetect is supported in the kernel, i am willing to 
upgrade to 1.0 superblocks. BUT i need the autodetect in the kernel, as 
i refuse to use initrd for production servers.

Cheers,


Rudy


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-14 23:20             ` Rudy Zijlstra
@ 2010-02-15  3:40               ` Mr. James W. Laferriere
  2010-02-15  7:12                 ` Luca Berra
  0 siblings, 1 reply; 43+ messages in thread
From: Mr. James W. Laferriere @ 2010-02-15  3:40 UTC (permalink / raw)
  To: Rudy Zijlstra
  Cc: H. Peter Anvin, Asdo, Justin Piszcz, Michael Evans, linux-raid,
	linux-kernel

 	Hello All ,

On Mon, 15 Feb 2010, Rudy Zijlstra wrote:
> H. Peter Anvin wrote:
>> In Fedora 12, for example, Dracut tries to make the distinction between
>> whole RAID device and a partition device, and utterly fails -- often
>> resulting in data loss.
>> 
> i do not use Fedora/redhat and do not intent to ever try them again... still, 
> the point is valid
>> With a pointer to the beginning this would have been a trivial thing to
>> detect.
>> 
>> IMO it would make sense to support autoassemble for 1.0 superblocks, and
>> making them the default.  The purpose would be to get everyone off 0.9.
>>  However, *any* default is better than 1.1.
>> 	-hpa
> As long is autodetect is supported in the kernel, i am willing to upgrade to 
> 1.0 superblocks. BUT i need the autodetect in the kernel, as i refuse to use 
> initrd for production servers.
> Cheers,
> Rudy
 	I also have to agree with Rudy in this matter .

 		Tia ,  JimL
-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network&System Engineer | 3237     Holden Road |  Give me Linux  |
| babydr@baby-dragons.com | Fairbanks, AK. 99709 |   only  on  AXP |
+------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-15  3:40               ` Mr. James W. Laferriere
@ 2010-02-15  7:12                 ` Luca Berra
  2010-02-16  0:38                   ` Neil Brown
  0 siblings, 1 reply; 43+ messages in thread
From: Luca Berra @ 2010-02-15  7:12 UTC (permalink / raw)
  To: linux-raid

On Sun, Feb 14, 2010 at 06:40:31PM -0900, Mr. James W. Laferriere wrote:
> On Mon, 15 Feb 2010, Rudy Zijlstra wrote:
>> H. Peter Anvin wrote:
>>> IMO it would make sense to support autoassemble for 1.0 superblocks, and
sorry kernel autodetect is borked

>>> making them the default.  The purpose would be to get everyone off 0.9.
>>>  However, *any* default is better than 1.1.

there has been a discussion on what format should be made as the
default, under the subject: "[ANNOUNCE] mdadm-3.1 has been withdrawn",
iirc 1.1 was chosen as the default, versus 1.2, because it puts the
superblock at the very same place as the partition table, thus
preventing any possible confusion between partitioned disk and whole
disk md. (yes someone managed to put both a whole disk 1.2 superblock
and a valid partition table on the same device....)

>> As long is autodetect is supported in the kernel, i am willing to upgrade 
>> to 1.0 superblocks. BUT i need the autodetect in the kernel, as i refuse 
it wont be implemented

>> to use initrd for production servers.
> 	I also have to agree with Rudy in this matter .
>
then use kernel command line

L.

-- 
Luca Berra -- bluca@comedia.it
           Communication Media & Services S.r.l.
    /"\
    \ /     ASCII RIBBON CAMPAIGN
     X        AGAINST HTML MAIL
    / \

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-13 19:58   ` H. Peter Anvin
  2010-02-13 20:07     ` Justin Piszcz
@ 2010-02-16  0:27     ` Neil Brown
  2010-02-16  1:24       ` H. Peter Anvin
  2010-02-16 10:12       ` Giovanni Tessore
  1 sibling, 2 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-16  0:27 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Michael Evans, Justin Piszcz, linux-raid, linux-kernel

On Sat, 13 Feb 2010 11:58:03 -0800
"H. Peter Anvin" <hpa@zytor.com> wrote:

> On 02/11/2010 05:52 PM, Michael Evans wrote:
> > On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> >> Hi,
> >>
> >> I may be converting a host to ext4 and was curious, is 0.90 still the only
> >> superblock version for mdadm/raid-1 that you can boot from without having to
> >> create an initrd/etc?
> >>
> >> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
> >> < 2TB?
> >>
> >> Justin.
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >>
> > 
> > You need the superblock at the end of the partition:  If you read the
> > manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
> > NOT 1.2; those use the same superblock layout but different
> > locations).
> 
> 0.9 has the *serious* problem that it is hard to distinguish a whole-volume
> 
> However, apparently mdadm recently switched to a 1.1 default.  I
> strongly urge Neil to change that to either 1.0 and 1.2, as I have
> started to get complaints from users that they have made RAID volumes
> with newer mdadm which apparently default to 1.1, and then want to boot
> from them (without playing MBR games like Grub does.)  I have to tell
> them that they have to regenerate their disks -- the superblock occupies
> the boot sector and there is nothing I can do about it.  It's the same
> pathology XFS has.

When mdadm defaults to 1.0 for a RAID1 it prints a warning to the effect that
the array might not be suitable to store '/boot', and requests confirmation.

So I assume that the people who are having this problem either do not read,
or are using some partitioning tool that runs mdadm under the hood using
"--run" to avoid the need for confirmation.  It would be nice to confirm if
that was the case, and find out what tool is being used.

If an array is not being used for /boot (or /) then I still think that 1.1 is
the better choice as it removes the possibility for confusion over partition
tables.

I guess I could try defaulting to 1.2 in a partition, and 1.1 on a
whole-device.  That might be a suitable compromise.

How do people cope with XFS??

NeilBrown

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-15  7:12                 ` Luca Berra
@ 2010-02-16  0:38                   ` Neil Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-16  0:38 UTC (permalink / raw)
  To: Luca Berra; +Cc: linux-raid

On Mon, 15 Feb 2010 08:12:43 +0100
Luca Berra <bluca@comedia.it> wrote:

> On Sun, Feb 14, 2010 at 06:40:31PM -0900, Mr. James W. Laferriere wrote:
> > On Mon, 15 Feb 2010, Rudy Zijlstra wrote:
> >> H. Peter Anvin wrote:
> >>> IMO it would make sense to support autoassemble for 1.0 superblocks, and
> sorry kernel autodetect is borked
> 
> >>> making them the default.  The purpose would be to get everyone off 0.9.
> >>>  However, *any* default is better than 1.1.
> 
> there has been a discussion on what format should be made as the
> default, under the subject: "[ANNOUNCE] mdadm-3.1 has been withdrawn",
> iirc 1.1 was chosen as the default, versus 1.2, because it puts the
> superblock at the very same place as the partition table, thus
> preventing any possible confusion between partitioned disk and whole
> disk md. (yes someone managed to put both a whole disk 1.2 superblock
> and a valid partition table on the same device....)
> 
> >> As long is autodetect is supported in the kernel, i am willing to upgrade 
> >> to 1.0 superblocks. BUT i need the autodetect in the kernel, as i refuse 
> it wont be implemented
> 
> >> to use initrd for production servers.
> > 	I also have to agree with Rudy in this matter .
> >
> then use kernel command line

I cannot agree with this recommendation.
Using a kernel command line like:

   md=0,/dev/sda1,/dev/sdb1

will assemble v1.x arrays without an initrd.  However it depends on the device
names (sda, sdb) being stable.  If you also have an 'sdc', and sda dies in
such a way that it cannot be seen at all, then on the next reboot, md will
try to assemble sdb1 and sdc1 (which have now been renamed to sda1 and sdb1)
and this will fail.  So it works when everything else is working, but can
then fail exactly when you need it the most.

There are other edge cases that can confuse autodetect as well.  I put a lot
of effort into getting the assembly algorithms in mdadm to be as robust as I
could make them, and I really recommend using mdadm to assemble all arrays,
through an initrd if / is an md array.

If you really don't want to trust a distro initrd, then the mdadm source code
contains instructions for building a minimal initramfs which just runs mdadm
to assemble the root device, then mounts and pivot_roots to that.

If people have problems with initramfs, then I recommend filing bug reports
rather than simply choosing not to use it.  It isn't going to go away.

NeilBrown


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-11 23:00 Linux mdadm superblock question Justin Piszcz
                   ` (2 preceding siblings ...)
  2010-02-13  8:37 ` Giovanni Tessore
@ 2010-02-16  0:50 ` Neil Brown
  2010-02-16 13:14   ` Justin Piszcz
  2010-02-16 17:24   ` Bill Davidsen
  3 siblings, 2 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-16  0:50 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid, linux-kernel

On Thu, 11 Feb 2010 18:00:23 -0500 (EST)
Justin Piszcz <jpiszcz@lucidpixels.com> wrote:

> Hi,
> 
> I may be converting a host to ext4 and was curious, is 0.90 still the only 
> superblock version for mdadm/raid-1 that you can boot from without having 
> to create an initrd/etc?
> 
> Are there any benefits to using a superblock > 0.90 for a raid-1 boot 
> volume < 2TB?

The only noticeable differences that I can think of are:
 1/ If you reboot during recovery of a spare, then 0.90 will restart the
    recovery at the start, while 1.x will restart from where it was up to.
 2/ The /sys/class/block/mdXX/md/dev-YYY/errors counter is reset on each
    re-assembly with 0.90, but is preserved across stop/start with 1.x
 3/ If your partition starts on a multiple of 64K from the start of the
    device and is the last partition and contains 0.90 metadata, then
    mdadm can get confused by it.
 4/ If you move the devices to a host with a different arch and different
    byte-ordering, then extra effort will be needed to see the array for
    0.90, but not for 1.x

I suspect none of these is a big issue.

It is likely that future extensions will only be supported on 1.x metadata.
For example I hope to add support for storing a bad-block list, so that a
read error during recovery will only be fatal for that block, not the whole
recovery process.  This is unlikely ever to be supported on 0.90.  However
it may not be possible to hot-enable it on 1.x either, depending on how much
space has been reserved for extra metadata, so there is no guarantee that
using 1.x now makes you future-proof.

And yes, 0.90 is still the only superblock version that supports in-kernel
autodetect, and I have no intention of adding in-kernel autodetect for any
other version.

NeilBrown

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12 21:53     ` Mr. James W. Laferriere
@ 2010-02-16  0:57       ` Neil Brown
  2010-02-16 16:42       ` Bill Davidsen
  1 sibling, 0 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-16  0:57 UTC (permalink / raw)
  To: Mr. James W. Laferriere; +Cc: Robin Hill, linux-raid

On Fri, 12 Feb 2010 12:53:53 -0900 (AKST)
"Mr. James W. Laferriere" <babydr@baby-dragons.com> wrote:

>  	Hello Robin ,
> 
> On Fri, 12 Feb 2010, Robin Hill wrote:
> > On Thu Feb 11, 2010 at 05:52:41PM -0800, Michael Evans wrote:
> >
> >> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> >>> Hi,
> >>>
> >>> I may be converting a host to ext4 and was curious, is 0.90 still the only
> >>> superblock version for mdadm/raid-1 that you can boot from without having to
> >>> create an initrd/etc?
> >>>
> >>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot volume
> >>> < 2TB?
> >>>
> >>> Justin.
> >>
> >> You need the superblock at the end of the partition:  If you read the
> >> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also
> >> NOT 1.2; those use the same superblock layout but different
> >> locations).
> >>
> > You also need it to be auto-assembled by the kernel, which is only
> > version 0.90.
> >
> > As for benefits, there's a number of benefits of 1.x over 0.90 - I don't
> > think any of them are terribly important for a small boot partition
> > though.  There's also benefits to having an initrd anyway.
> >
> > Cheers,
> >    Robin
> 
>  	One can use the 'append=""' functionality of lilo & I am user that 
> Grub2(and family) has some method of doing the same .
>  	ie:
> append=" md=1,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1 md=2,/dev/sda2,/dev/sdb2,/dev/sdc2,/dev/sdd2 md=3,/dev/sda3,/dev/sdb3 md=4,/dev/sda4,/dev/sdb4 vt.default_utf8=0 sysrq_always_enabled=1"
>

As I said in a previous Email, I do not recommend this.  If a device fails
and is removed, then on the next reboot all subsequent device names can
change.  So assembling arrays be name is not safe.
 
>  	Not sure if this would be usable with a 1.1+ version of the MD headers .

Though yes: it does work with v1.x metadata.

> 
>  	I'd really like to see a REAL case that shows a good example of the use 
> of initrd that absolutely can NOT be done only because of someones 
> unwillingness to create it in the kernel or to allow others too .

Sure, anything can be done in the kernel.  It doesn't follow that everything
should be done in the kernel.
There are number of corner cases that can make assembling md arrays messy.
Most of these cases never happen for most people, but I still want to handle
them as robustly as possible.
I would rather do that just in mdadm, not in the kernel.

NeilBrown

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  0:27     ` Neil Brown
@ 2010-02-16  1:24       ` H. Peter Anvin
  2010-02-16  3:18         ` david
  2010-02-16 17:05         ` Bill Davidsen
  2010-02-16 10:12       ` Giovanni Tessore
  1 sibling, 2 replies; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-16  1:24 UTC (permalink / raw)
  To: Neil Brown; +Cc: Michael Evans, Justin Piszcz, linux-raid, linux-kernel

On 02/15/2010 04:27 PM, Neil Brown wrote:
> 
> When mdadm defaults to 1.0 for a RAID1 it prints a warning to the effect that
> the array might not be suitable to store '/boot', and requests confirmation.
> 
> So I assume that the people who are having this problem either do not read,
> or are using some partitioning tool that runs mdadm under the hood using
> "--run" to avoid the need for confirmation.  It would be nice to confirm if
> that was the case, and find out what tool is being used.

My guess is that they are using the latter.  However, some of it is
probably also a matter of not planning ahead, or not understanding the
error message.  I'll forward one email privately (don't want to forward
a private email to a list.)

> If an array is not being used for /boot (or /) then I still think that 1.1 is
> the better choice as it removes the possibility for confusion over partition
> tables.
> 
> I guess I could try defaulting to 1.2 in a partition, and 1.1 on a
> whole-device.  That might be a suitable compromise.

In some ways, 1.1 is even more toxic on a whole-device, since that means
that it is physically impossible to boot off of it -- the hardware will
only ever read the first sector (MBR).

> How do people cope with XFS??

There are three options:

a) either don't boot from it (separate /boot);
b) use a bootloader which installs in the MBR and
hopefully-unpartitioned disk areas (e.g. Grub);
c) use a nonstandard custom MBR.

Neither (b) or (c), of course, allow for chainloading from another OS
install and thus are bad for interoperability.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  1:24       ` H. Peter Anvin
@ 2010-02-16  3:18         ` david
  2010-02-16  4:42             ` John Robinson
  2010-02-16  7:02           ` H. Peter Anvin
  2010-02-16 17:05         ` Bill Davidsen
  1 sibling, 2 replies; 43+ messages in thread
From: david @ 2010-02-16  3:18 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Neil Brown, Michael Evans, Justin Piszcz, linux-raid, linux-kernel

On Mon, 15 Feb 2010, H. Peter Anvin wrote:

> On 02/15/2010 04:27 PM, Neil Brown wrote:
>
> There are three options:
>
> a) either don't boot from it (separate /boot);
> b) use a bootloader which installs in the MBR and
> hopefully-unpartitioned disk areas (e.g. Grub);
> c) use a nonstandard custom MBR.
>
> Neither (b) or (c), of course, allow for chainloading from another OS
> install and thus are bad for interoperability.

I have had no problems with XFS partitions and lilo as the bootloader. 
I've been doing this for a couple of years now without realizing that 
there is supposed to be a problem.

David Lang

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12  1:52 ` Michael Evans
  2010-02-12  9:06   ` Robin Hill
  2010-02-13 19:58   ` H. Peter Anvin
@ 2010-02-16  3:40   ` CaT
  2 siblings, 0 replies; 43+ messages in thread
From: CaT @ 2010-02-16  3:40 UTC (permalink / raw)
  To: Michael Evans; +Cc: Justin Piszcz, linux-raid, linux-kernel

On Thu, Feb 11, 2010 at 05:52:41PM -0800, Michael Evans wrote:
> You need the superblock at the end of the partition:  If you read the
> manual that is clearly either version 0.90 OR 1.0 (NOT 1.1 and also

For lilo, at least, this is not so:

http://www.sfr-fresh.com/linux/misc/lilo-22.8.src.tar.gz:a/lilo-22.8/raid.c

Line 145:

if (ioctl(md_fd,RAID_VERSION,&md_version_info) < 0)

Line 155:

if (ioctl(md_fd,GET_ARRAY_INFO,&md_array_info) < 0)

Lines 160-168:

if ((md_array_info.major_version != md_version_info.major) &&
	(md_array_info.minor_version != md_version_info.minor)) {
    die("Inconsistent Raid version information on %s   (RV=%d.%d GAI=%d.%d)",
        boot,
              (int)md_version_info.major,
              (int)md_version_info.minor,
              (int)md_array_info.major_version,
              (int)md_array_info.minor_version);
    }

It's 0.90 or nothing as md_version_info gives 0.90 due to:

/linux/drivers/md/md.c:
Line 4599:

        ver.major = MD_MAJOR_VERSION;
        ver.minor = MD_MINOR_VERSION;

linux/include/linux/raid/md_u.h:
Line 23:

#define MD_MAJOR_VERSION                0
#define MD_MINOR_VERSION                90

I got bitten by this as I was testing different raid superblocks on a new
setup. Wound up hand-making my own initramfs, which was a pain (right pain
to debug). Would prefer not to have one tbh.

-- 
  "A search of his car uncovered pornography, a homemade sex aid, women's 
  stockings and a Jack Russell terrier."
    - http://www.news.com.au/story/0%2C27574%2C24675808-421%2C00.html

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  3:18         ` david
@ 2010-02-16  4:42             ` John Robinson
  2010-02-16  7:02           ` H. Peter Anvin
  1 sibling, 0 replies; 43+ messages in thread
From: John Robinson @ 2010-02-16  4:42 UTC (permalink / raw)
  Cc: Linux RAID, linux-kernel

On 16/02/2010 03:18, david@lang.hm wrote:
> On Mon, 15 Feb 2010, H. Peter Anvin wrote:
> 
>> On 02/15/2010 04:27 PM, Neil Brown wrote:
>>
>> There are three options:
>>
>> a) either don't boot from it (separate /boot);
>> b) use a bootloader which installs in the MBR and
>> hopefully-unpartitioned disk areas (e.g. Grub);
>> c) use a nonstandard custom MBR.
>>
>> Neither (b) or (c), of course, allow for chainloading from another OS
>> install and thus are bad for interoperability.
> 
> I have had no problems with XFS partitions and lilo as the bootloader. 
> I've been doing this for a couple of years now without realizing that 
> there is supposed to be a problem.

There isn't, if you use partitions. It could (would) go wrong if you 
tried to put an XFS filesystem, or md RAID with a v1.1 superblock, on a 
whole disc without a partition table *and* you tried to put a bootloader 
on. I can't say it's ever occurred to me to do that, because I always 
assumed that whatever I put in a partition used all of it, and I 
couldn't expect to double-book the beginning of it and have it work.

Cheers,

John.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
@ 2010-02-16  4:42             ` John Robinson
  0 siblings, 0 replies; 43+ messages in thread
From: John Robinson @ 2010-02-16  4:42 UTC (permalink / raw)
  Cc: Linux RAID, linux-kernel

On 16/02/2010 03:18, david@lang.hm wrote:
> On Mon, 15 Feb 2010, H. Peter Anvin wrote:
> 
>> On 02/15/2010 04:27 PM, Neil Brown wrote:
>>
>> There are three options:
>>
>> a) either don't boot from it (separate /boot);
>> b) use a bootloader which installs in the MBR and
>> hopefully-unpartitioned disk areas (e.g. Grub);
>> c) use a nonstandard custom MBR.
>>
>> Neither (b) or (c), of course, allow for chainloading from another OS
>> install and thus are bad for interoperability.
> 
> I have had no problems with XFS partitions and lilo as the bootloader. 
> I've been doing this for a couple of years now without realizing that 
> there is supposed to be a problem.

There isn't, if you use partitions. It could (would) go wrong if you 
tried to put an XFS filesystem, or md RAID with a v1.1 superblock, on a 
whole disc without a partition table *and* you tried to put a bootloader 
on. I can't say it's ever occurred to me to do that, because I always 
assumed that whatever I put in a partition used all of it, and I 
couldn't expect to double-book the beginning of it and have it work.

Cheers,

John.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  3:18         ` david
  2010-02-16  4:42             ` John Robinson
@ 2010-02-16  7:02           ` H. Peter Anvin
  2010-02-16  8:46             ` Rudy Zijlstra
  1 sibling, 1 reply; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-16  7:02 UTC (permalink / raw)
  To: david; +Cc: Neil Brown, Michael Evans, Justin Piszcz, linux-raid, linux-kernel

On 02/15/2010 07:18 PM, david@lang.hm wrote:
> On Mon, 15 Feb 2010, H. Peter Anvin wrote:
>
>> On 02/15/2010 04:27 PM, Neil Brown wrote:
>>
>> There are three options:
>>
>> a) either don't boot from it (separate /boot);
>> b) use a bootloader which installs in the MBR and
>> hopefully-unpartitioned disk areas (e.g. Grub);
>> c) use a nonstandard custom MBR.
>>
>> Neither (b) or (c), of course, allow for chainloading from another OS
>> install and thus are bad for interoperability.
>
> I have had no problems with XFS partitions and lilo as the bootloader.
> I've been doing this for a couple of years now without realizing that
> there is supposed to be a problem.
>

LILO also can be stuffed in the MBR (and then uses block-pointers from 
there).  There is one more option that I didn't mention, which is to put 
the bootloader of a separate partition, OS/2 style.  Again, breaks the 
standard chainloading model.

	-hpa

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  7:02           ` H. Peter Anvin
@ 2010-02-16  8:46             ` Rudy Zijlstra
  0 siblings, 0 replies; 43+ messages in thread
From: Rudy Zijlstra @ 2010-02-16  8:46 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: david, Neil Brown, Michael Evans, Justin Piszcz, linux-raid,
	linux-kernel

H. Peter Anvin wrote:
> On 02/15/2010 07:18 PM, david@lang.hm wrote:
>> On Mon, 15 Feb 2010, H. Peter Anvin wrote:
>>
>>> On 02/15/2010 04:27 PM, Neil Brown wrote:
>>>
>>> There are three options:
>>>
>>> a) either don't boot from it (separate /boot);
>>> b) use a bootloader which installs in the MBR and
>>> hopefully-unpartitioned disk areas (e.g. Grub);
>>> c) use a nonstandard custom MBR.
>>>
>>> Neither (b) or (c), of course, allow for chainloading from another OS
>>> install and thus are bad for interoperability.
>>
>> I have had no problems with XFS partitions and lilo as the bootloader.
>> I've been doing this for a couple of years now without realizing that
>> there is supposed to be a problem.
>>
>
> LILO also can be stuffed in the MBR (and then uses block-pointers from 
> there).  There is one more option that I didn't mention, which is to 
> put the bootloader of a separate partition, OS/2 style.  Again, breaks 
> the standard chainloading model.
There is another configuration that fails. Use partitioned md. I do not 
think it matters whether over whole device or with a partition table. 
Neither grub nor lilo will boot off from it. I've tested that exensively 
with a partition on the disks.  I am using PXE boot to boot 2 servers 
with that configuration. That adds a dependency on the pxe boot server, 
but considering the function of those servers they are moot if that pxe 
server is dead anyways....

Cheers,


Rudy


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  0:27     ` Neil Brown
  2010-02-16  1:24       ` H. Peter Anvin
@ 2010-02-16 10:12       ` Giovanni Tessore
  2010-02-17 23:10         ` Neil Brown
  1 sibling, 1 reply; 43+ messages in thread
From: Giovanni Tessore @ 2010-02-16 10:12 UTC (permalink / raw)
  To: linux-raid

Neil Brown wrote:
> When mdadm defaults to 1.0 for a RAID1 it prints a warning to the effect that
> the array might not be suitable to store '/boot', and requests confirmation.
>
> So I assume that the people who are having this problem either do not read,
> or are using some partitioning tool that runs mdadm under the hood using
> "--run" to avoid the need for confirmation.  It would be nice to confirm if
> that was the case, and find out what tool is being used.
>   

I created it manually with
mdadm --create /dev/md0 --metadata=1.0 --level=1 --raid-devices=3 
/dev/sd[abc]1
but got no warning or confirmation request (mdadm - v2.6.7.1 - 15th 
October 2008), I guess due to old version.

Regards

-- 
Cordiali saluti.
Yours faithfully.

Giovanni Tessore



^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  0:50 ` Neil Brown
@ 2010-02-16 13:14   ` Justin Piszcz
  2010-02-16 20:09     ` mdadm FAQ (was: Linux mdadm superblock question.) martin f krafft
  2010-02-17 23:11     ` Linux mdadm superblock question Neil Brown
  2010-02-16 17:24   ` Bill Davidsen
  1 sibling, 2 replies; 43+ messages in thread
From: Justin Piszcz @ 2010-02-16 13:14 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, linux-kernel



On Tue, 16 Feb 2010, Neil Brown wrote:

> On Thu, 11 Feb 2010 18:00:23 -0500 (EST)
> Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>
>> Hi,
>>
>> I may be converting a host to ext4 and was curious, is 0.90 still the only
>> superblock version for mdadm/raid-1 that you can boot from without having
>> to create an initrd/etc?
>>
>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
>> volume < 2TB?
>
> The only noticeable differences that I can think of are:
> 1/ If you reboot during recovery of a spare, then 0.90 will restart the
>    recovery at the start, while 1.x will restart from where it was up to.
> 2/ The /sys/class/block/mdXX/md/dev-YYY/errors counter is reset on each
>    re-assembly with 0.90, but is preserved across stop/start with 1.x
> 3/ If your partition starts on a multiple of 64K from the start of the
>    device and is the last partition and contains 0.90 metadata, then
>    mdadm can get confused by it.
> 4/ If you move the devices to a host with a different arch and different
>    byte-ordering, then extra effort will be needed to see the array for
>    0.90, but not for 1.x
>
> I suspect none of these is a big issue.
>
> It is likely that future extensions will only be supported on 1.x metadata.
> For example I hope to add support for storing a bad-block list, so that a
> read error during recovery will only be fatal for that block, not the whole
> recovery process.  This is unlikely ever to be supported on 0.90.  However
> it may not be possible to hot-enable it on 1.x either, depending on how much
> space has been reserved for extra metadata, so there is no guarantee that
> using 1.x now makes you future-proof.
>
> And yes, 0.90 is still the only superblock version that supports in-kernel
> autodetect, and I have no intention of adding in-kernel autodetect for any
> other version.
>
> NeilBrown
>

Hi Neil,

Thanks for the response, this is exactly what I was looking for and 
probably should be put in a FAQ.

Justin.

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-12 21:53     ` Mr. James W. Laferriere
  2010-02-16  0:57       ` Neil Brown
@ 2010-02-16 16:42       ` Bill Davidsen
  1 sibling, 0 replies; 43+ messages in thread
From: Bill Davidsen @ 2010-02-16 16:42 UTC (permalink / raw)
  To: Mr. James W. Laferriere; +Cc: Robin Hill, linux-raid

Mr. James W. Laferriere wrote:
>  Hello Robin ,
>
>  On Fri, 12 Feb 2010, Robin Hill wrote:
> > On Thu Feb 11, 2010 at 05:52:41PM -0800, Michael Evans wrote:
> >
> >> On Thu, Feb 11, 2010 at 3:00 PM, Justin Piszcz
> >> <jpiszcz@lucidpixels.com> wrote:
> >>> Hi,
> >>>
> >>> I may be converting a host to ext4 and was curious, is 0.90
> >>> still the only superblock version for mdadm/raid-1 that you can
> >>> boot from without having to create an initrd/etc?
> >>>
> >>> Are there any benefits to using a superblock > 0.90 for a
> >>> raid-1 boot volume < 2TB?
> >>>
> >>> Justin.
> >>
> >> You need the superblock at the end of the partition:  If you read
> >> the manual that is clearly either version 0.90 OR 1.0 (NOT 1.1
> >> and also NOT 1.2; those use the same superblock layout but
> >> different locations).
> >>
> > You also need it to be auto-assembled by the kernel, which is only
> > version 0.90.
> >
> > As for benefits, there's a number of benefits of 1.x over 0.90 - I
> > don't think any of them are terribly important for a small boot
> > partition though.  There's also benefits to having an initrd
> > anyway.
> >
> > Cheers, Robin
>
>  One can use the 'append=""' functionality of lilo & I am user that
>  Grub2(and family) has some method of doing the same . ie: append="
>  md=1,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1
>  md=2,/dev/sda2,/dev/sdb2,/dev/sdc2,/dev/sdd2 md=3,/dev/sda3,/dev/sdb3
>  md=4,/dev/sda4,/dev/sdb4 vt.default_utf8=0 sysrq_always_enabled=1"
>
You *really* don't want to do that, you want to let mdadm find the 
arrays and use UUID to associate array with mount point. Any minor issue 
with the hardware will cause this whole structure to fail.

>  Not sure if this would be usable with a 1.1+ version of the MD
>  headers .

I'm not sure it's usable at all. Not that it doesn't work in a perfect 
world, we just don't live there. This method is fragile.

-- 
Bill Davidsen <davidsen@tmr.com>
  "We can't solve today's problems by using the same thinking we
   used in creating them." - Einstein


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  1:24       ` H. Peter Anvin
  2010-02-16  3:18         ` david
@ 2010-02-16 17:05         ` Bill Davidsen
  2010-02-16 23:30           ` H. Peter Anvin
  1 sibling, 1 reply; 43+ messages in thread
From: Bill Davidsen @ 2010-02-16 17:05 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Neil Brown, Michael Evans, Justin Piszcz, linux-raid, linux-kernel

H. Peter Anvin wrote:
> On 02/15/2010 04:27 PM, Neil Brown wrote:
>   
>> When mdadm defaults to 1.0 for a RAID1 it prints a warning to the effect that
>> the array might not be suitable to store '/boot', and requests confirmation.
>>
>> So I assume that the people who are having this problem either do not read,
>> or are using some partitioning tool that runs mdadm under the hood using
>> "--run" to avoid the need for confirmation.  It would be nice to confirm if
>> that was the case, and find out what tool is being used.
>>     
>
> My guess is that they are using the latter.  However, some of it is
> probably also a matter of not planning ahead, or not understanding the
> error message.  I'll forward one email privately (don't want to forward
> a private email to a list.)
>
>   
>> If an array is not being used for /boot (or /) then I still think that 1.1 is
>> the better choice as it removes the possibility for confusion over partition
>> tables.
>>
>> I guess I could try defaulting to 1.2 in a partition, and 1.1 on a
>> whole-device.  That might be a suitable compromise.
>>     
>
> In some ways, 1.1 is even more toxic on a whole-device, since that means
> that it is physically impossible to boot off of it -- the hardware will
> only ever read the first sector (MBR).
>
>   
That is either a problem or a solution, depending which bad behavior you 
are trying hardest to avoid.
>> How do people cope with XFS??
>>     
>
> There are three options:
>
> a) either don't boot from it (separate /boot);
>   
And certainly there are other reasons to do that...
> b) use a bootloader which installs in the MBR and
> hopefully-unpartitioned disk areas (e.g. Grub);
> c) use a nonstandard custom MBR.
>
> Neither (b) or (c), of course, allow for chainloading from another OS
> install and thus are bad for interoperability.
>   

I'm not really sure what you're getting at here, I use grub in MBR and 
then add chain loader stanzas to grub.conf for many things, usually an 
alternate Linux release, or to have 32/64 of the same release handy for 
testing, and always memtest from the boot menu. Even Win98SP2 on one 
machine, since that works very poorly under KVM. (ask Avi if you care 
why, something about what it does in real mode). In any case, I don't 
see the chain loader issue, unless you mean to reboot out of some other 
OS into Linux.

-- 
Bill Davidsen <davidsen@tmr.com>
  "We can't solve today's problems by using the same thinking we
   used in creating them." - Einstein


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16  0:50 ` Neil Brown
  2010-02-16 13:14   ` Justin Piszcz
@ 2010-02-16 17:24   ` Bill Davidsen
  1 sibling, 0 replies; 43+ messages in thread
From: Bill Davidsen @ 2010-02-16 17:24 UTC (permalink / raw)
  To: Neil Brown; +Cc: Justin Piszcz, linux-raid, linux-kernel

Neil Brown wrote:
> On Thu, 11 Feb 2010 18:00:23 -0500 (EST)
> Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>
>   
>> Hi,
>>
>> I may be converting a host to ext4 and was curious, is 0.90 still the only 
>> superblock version for mdadm/raid-1 that you can boot from without having 
>> to create an initrd/etc?
>>
>> Are there any benefits to using a superblock > 0.90 for a raid-1 boot 
>> volume < 2TB?
>>     
>
> The only noticeable differences that I can think of are:
>  1/ If you reboot during recovery of a spare, then 0.90 will restart the
>     recovery at the start, while 1.x will restart from where it was up to.
>  2/ The /sys/class/block/mdXX/md/dev-YYY/errors counter is reset on each
>     re-assembly with 0.90, but is preserved across stop/start with 1.x
>  3/ If your partition starts on a multiple of 64K from the start of the
>     device and is the last partition and contains 0.90 metadata, then
>     mdadm can get confused by it.
>   

Given that 4k sector drives make that a lot more likely that it used to 
be, I suspect some effort will be needed to address this sooner or later.

>  4/ If you move the devices to a host with a different arch and different
>     byte-ordering, then extra effort will be needed to see the array for
>     0.90, but not for 1.x
>
> I suspect none of these is a big issue.
>
> It is likely that future extensions will only be supported on 1.x metadata.
> For example I hope to add support for storing a bad-block list, so that a
> read error during recovery will only be fatal for that block, not the whole
> recovery process.  This is unlikely ever to be supported on 0.90.  However
> it may not be possible to hot-enable it on 1.x either, depending on how much
> space has been reserved for extra metadata, so there is no guarantee that
> using 1.x now makes you future-proof.
>
> And yes, 0.90 is still the only superblock version that supports in-kernel
> autodetect, and I have no intention of adding in-kernel autodetect for any
> other version.
>   


-- 
Bill Davidsen <davidsen@tmr.com>
  "We can't solve today's problems by using the same thinking we
   used in creating them." - Einstein


^ permalink raw reply	[flat|nested] 43+ messages in thread

* mdadm FAQ (was: Linux mdadm superblock question.)
  2010-02-16 13:14   ` Justin Piszcz
@ 2010-02-16 20:09     ` martin f krafft
  2010-03-06 11:38       ` mdadm FAQ - see http://raid.wiki.kernel.org/ David Greaves
  2010-02-17 23:11     ` Linux mdadm superblock question Neil Brown
  1 sibling, 1 reply; 43+ messages in thread
From: martin f krafft @ 2010-02-16 20:09 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: Neil Brown, linux-raid, linux-kernel

also sprach Justin Piszcz <jpiszcz@lucidpixels.com> [2010.02.17.0214 +1300]:
> Thanks for the response, this is exactly what I was looking for
> and probably should be put in a FAQ.

I'd be more than happy to push my FAQ[0], possibly fused with my
"recipes", upstream and would welcome anyone who wanted to help out.

0. http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/FAQ;hb=HEAD
1. http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/README.recipes;hb=HEAD

-- 
 .''`.   martin f. krafft <madduck@d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
 
"literature always anticipates life.
 it does not copy it, but moulds it to its purpose.
 the nineteenth century, as we know it,
 is largely an invention of balzac."
                                                        -- oscar wilde

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16 17:05         ` Bill Davidsen
@ 2010-02-16 23:30           ` H. Peter Anvin
  0 siblings, 0 replies; 43+ messages in thread
From: H. Peter Anvin @ 2010-02-16 23:30 UTC (permalink / raw)
  To: Bill Davidsen
  Cc: Neil Brown, Michael Evans, Justin Piszcz, linux-raid, linux-kernel

On 02/16/2010 09:05 AM, Bill Davidsen wrote:
> 
> I'm not really sure what you're getting at here, I use grub in MBR and 
> then add chain loader stanzas to grub.conf for many things, usually an 
> alternate Linux release, or to have 32/64 of the same release handy for 
> testing, and always memtest from the boot menu. Even Win98SP2 on one 
> machine, since that works very poorly under KVM. (ask Avi if you care 
> why, something about what it does in real mode). In any case, I don't 
> see the chain loader issue, unless you mean to reboot out of some other 
> OS into Linux.
> 

That's one of many uses, yes

Presumably the reason you don't have problems is because the partitions
you chainload aren't RAID partitions with 1.1 superblocks, or you're
specifying an explicit offset for your chainloads (Grub syntax allows that.)

Either which way, it's a good example of the usage model.  Chainloading
is important for a lot of people.

	-hpa

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16 10:12       ` Giovanni Tessore
@ 2010-02-17 23:10         ` Neil Brown
  0 siblings, 0 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-17 23:10 UTC (permalink / raw)
  To: Giovanni Tessore; +Cc: linux-raid

On Tue, 16 Feb 2010 11:12:51 +0100
Giovanni Tessore <giotex@texsoft.it> wrote:

> Neil Brown wrote:
> > When mdadm defaults to 1.0 for a RAID1 it prints a warning to the effect that
> > the array might not be suitable to store '/boot', and requests confirmation.
> >
> > So I assume that the people who are having this problem either do not read,
> > or are using some partitioning tool that runs mdadm under the hood using
> > "--run" to avoid the need for confirmation.  It would be nice to confirm if
> > that was the case, and find out what tool is being used.
> >   
> 
> I created it manually with
> mdadm --create /dev/md0 --metadata=1.0 --level=1 --raid-devices=3 
> /dev/sd[abc]1
> but got no warning or confirmation request (mdadm - v2.6.7.1 - 15th 
> October 2008), I guess due to old version.
> 

No - due to your actions not matching my description.

I said "when mdadm defaults to 1.0", though I should have said 
"...defaults to 1.1".  Sorry about that.
In any case, you didn't let it default to anything, so you presumably know
what you are doing.
And no v2.6.7.1 will never default to 1.1 so it will never give the message.
But v3.1.1 will default to 1.1 and when it does, it will print the message.

NeilBrown


> Regards
> 


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: Linux mdadm superblock question.
  2010-02-16 13:14   ` Justin Piszcz
  2010-02-16 20:09     ` mdadm FAQ (was: Linux mdadm superblock question.) martin f krafft
@ 2010-02-17 23:11     ` Neil Brown
  1 sibling, 0 replies; 43+ messages in thread
From: Neil Brown @ 2010-02-17 23:11 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-raid, linux-kernel

On Tue, 16 Feb 2010 08:14:21 -0500 (EST)
Justin Piszcz <jpiszcz@lucidpixels.com> wrote:

> 
> 
> On Tue, 16 Feb 2010, Neil Brown wrote:
> 
> > On Thu, 11 Feb 2010 18:00:23 -0500 (EST)
> > Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> >
> >> Hi,
> >>
> >> I may be converting a host to ext4 and was curious, is 0.90 still the only
> >> superblock version for mdadm/raid-1 that you can boot from without having
> >> to create an initrd/etc?
> >>
> >> Are there any benefits to using a superblock > 0.90 for a raid-1 boot
> >> volume < 2TB?
> >
> > The only noticeable differences that I can think of are:
> > 1/ If you reboot during recovery of a spare, then 0.90 will restart the
> >    recovery at the start, while 1.x will restart from where it was up to.
> > 2/ The /sys/class/block/mdXX/md/dev-YYY/errors counter is reset on each
> >    re-assembly with 0.90, but is preserved across stop/start with 1.x
> > 3/ If your partition starts on a multiple of 64K from the start of the
> >    device and is the last partition and contains 0.90 metadata, then
> >    mdadm can get confused by it.
> > 4/ If you move the devices to a host with a different arch and different
> >    byte-ordering, then extra effort will be needed to see the array for
> >    0.90, but not for 1.x
> >
> > I suspect none of these is a big issue.
> >
> > It is likely that future extensions will only be supported on 1.x metadata.
> > For example I hope to add support for storing a bad-block list, so that a
> > read error during recovery will only be fatal for that block, not the whole
> > recovery process.  This is unlikely ever to be supported on 0.90.  However
> > it may not be possible to hot-enable it on 1.x either, depending on how much
> > space has been reserved for extra metadata, so there is no guarantee that
> > using 1.x now makes you future-proof.
> >
> > And yes, 0.90 is still the only superblock version that supports in-kernel
> > autodetect, and I have no intention of adding in-kernel autodetect for any
> > other version.
> >
> > NeilBrown
> >
> 
> Hi Neil,
> 
> Thanks for the response, this is exactly what I was looking for and 
> probably should be put in a FAQ.
>
I believe the linux-raid wiki is open for anyone to update.  Feel free :-)

NeilBrown

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: mdadm FAQ - see http://raid.wiki.kernel.org/
  2010-02-16 20:09     ` mdadm FAQ (was: Linux mdadm superblock question.) martin f krafft
@ 2010-03-06 11:38       ` David Greaves
  0 siblings, 0 replies; 43+ messages in thread
From: David Greaves @ 2010-03-06 11:38 UTC (permalink / raw)
  To: Justin Piszcz, Neil Brown, linux-raid, linux-kernel

Hi all

I've not been active here for a long time - sorry :)

The linux raid wiki at OSDL (http://linux-raid.osdl.org/) was 'migrated' to a
drupal system during some Linux Foundation changes - clearly not suitable for
these kind of docs.

I spoke to maddog at kernel.org some months ago and we are now part of the
managed kernel wiki farm (which the osdl wiki pre-dated in case anyone wonders
why we didn't start out there).

I've asked osdl to redirect the current url to the kernel.org wiki but I think
this home should last us a while ;)

so:

hi martin..

martin f krafft wrote:
> also sprach Justin Piszcz <jpiszcz@lucidpixels.com> [2010.02.17.0214 +1300]:
>> Thanks for the response, this is exactly what I was looking for
>> and probably should be put in a FAQ.
> 
> I'd be more than happy to push my FAQ[0], possibly fused with my
> "recipes", upstream and would welcome anyone who wanted to help out.
> 
> 0. http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/FAQ;hb=HEAD
> 1. http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=blob;f=debian/README.recipes;hb=HEAD

See:
  http://raid.wiki.kernel.org/

David

-- 
"Don't worry, you'll be fine; I saw it work in a cartoon once..."

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2010-03-06 12:11 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 23:00 Linux mdadm superblock question Justin Piszcz
2010-02-12  1:52 ` Michael Evans
2010-02-12  9:06   ` Robin Hill
2010-02-12 21:53     ` Mr. James W. Laferriere
2010-02-16  0:57       ` Neil Brown
2010-02-16 16:42       ` Bill Davidsen
2010-02-13 19:58   ` H. Peter Anvin
2010-02-13 20:07     ` Justin Piszcz
2010-02-13 20:49       ` david
2010-02-13 21:07         ` Michael Evans
2010-02-13 21:07           ` Michael Evans
2010-02-13 21:29       ` H. Peter Anvin
2010-02-14 20:25         ` Asdo
2010-02-14 21:18           ` H. Peter Anvin
2010-02-14 21:34             ` Henrique de Moraes Holschuh
2010-02-14 23:20             ` Rudy Zijlstra
2010-02-15  3:40               ` Mr. James W. Laferriere
2010-02-15  7:12                 ` Luca Berra
2010-02-16  0:38                   ` Neil Brown
2010-02-16  0:27     ` Neil Brown
2010-02-16  1:24       ` H. Peter Anvin
2010-02-16  3:18         ` david
2010-02-16  4:42           ` John Robinson
2010-02-16  4:42             ` John Robinson
2010-02-16  7:02           ` H. Peter Anvin
2010-02-16  8:46             ` Rudy Zijlstra
2010-02-16 17:05         ` Bill Davidsen
2010-02-16 23:30           ` H. Peter Anvin
2010-02-16 10:12       ` Giovanni Tessore
2010-02-17 23:10         ` Neil Brown
2010-02-16  3:40   ` CaT
2010-02-13  6:42 ` martin f krafft
2010-02-13  8:37 ` Giovanni Tessore
2010-02-13  9:26   ` Michael Evans
2010-02-13  9:35     ` Giovanni Tessore
2010-02-13  9:40       ` Michael Evans
2010-02-13 10:06         ` Giovanni Tessore
2010-02-16  0:50 ` Neil Brown
2010-02-16 13:14   ` Justin Piszcz
2010-02-16 20:09     ` mdadm FAQ (was: Linux mdadm superblock question.) martin f krafft
2010-03-06 11:38       ` mdadm FAQ - see http://raid.wiki.kernel.org/ David Greaves
2010-02-17 23:11     ` Linux mdadm superblock question Neil Brown
2010-02-16 17:24   ` Bill Davidsen

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.