Linux RAID subsystem development
 help / color / mirror / Atom feed
* Metadata > 0.90 and auto-assemble
@ 2015-02-22 18:54 Joshua Kinard
  2015-02-22 21:29 ` Chris Murphy
  2015-02-22 22:19 ` Mark Knecht
  0 siblings, 2 replies; 5+ messages in thread
From: Joshua Kinard @ 2015-02-22 18:54 UTC (permalink / raw)
  To: linux-raid

Hi,

I tried a while back to use the newer metadata formats on my mdadm RAID5 on a
few machines, and discovered that the kernel auto-assembly will only work with
v0.90 metadata, not 1.0 or greater.  Is there a solid reason for this?  Based
one what I can find regarding the differences in the metadata formats, and
looking at the existing md code, it seems this is largely just because no one
has had the time or motivation to change the code to support auto-assembly on
the newer metdata formats.

I am told that the "correct" solution is to embed a small initramfs to bring
the RAID arrays online instead, before the real rootfs is loaded.  I'd like to
avoid this if possible, as I haven't had to use an initramfs for normal booting
in the past, as long as I stay on metadata 0.90.  So I thought I'd ask what the
official stance is on this.

Thanks!,

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And our
lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

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

* Re: Metadata > 0.90 and auto-assemble
  2015-02-22 18:54 Metadata > 0.90 and auto-assemble Joshua Kinard
@ 2015-02-22 21:29 ` Chris Murphy
  2015-02-22 21:54   ` Joshua Kinard
  2015-02-22 22:19 ` Mark Knecht
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Murphy @ 2015-02-22 21:29 UTC (permalink / raw)
  Cc: linux-raid

On Sun, Feb 22, 2015 at 11:54 AM, Joshua Kinard <kumba@gentoo.org> wrote:
> I'd like to
> avoid this if possible, as I haven't had to use an initramfs for normal booting
> in the past, as long as I stay on metadata 0.90.  So I thought I'd ask what the
> official stance is on this.

https://raid.wiki.kernel.org/index.php/Autodetect

Official stance is that it's deprecated, but people still use it.

-- 
Chris Murphy

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

* Re: Metadata > 0.90 and auto-assemble
  2015-02-22 21:29 ` Chris Murphy
@ 2015-02-22 21:54   ` Joshua Kinard
  2015-02-23  0:17     ` NeilBrown
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Kinard @ 2015-02-22 21:54 UTC (permalink / raw)
  To: Chris Murphy; +Cc: linux-raid

On 02/22/2015 16:29, Chris Murphy wrote:
> On Sun, Feb 22, 2015 at 11:54 AM, Joshua Kinard <kumba@gentoo.org> wrote:
>> I'd like to
>> avoid this if possible, as I haven't had to use an initramfs for normal booting
>> in the past, as long as I stay on metadata 0.90.  So I thought I'd ask what the
>> official stance is on this.
> 
> https://raid.wiki.kernel.org/index.php/Autodetect
> 
> Official stance is that it's deprecated, but people still use it.

Yeah, but it's a pretty useful feature.  I can't see why autodetect for simple
setups (several disks or partitions and building a basic array out of them) is
maintained, while userspace autodetect is required for the more complex setups.

But I suppose this has been discussed before in detail, though I cannot find
said discussion.  The RAID Boot page has this one example only:

"This approach can cause problems in several situations (imagine moving part of
an old array onto another machine before wiping and repurposing it: reboot and
watch in horror as the piece of dead array gets assembled as part of the
running RAID array, ruining it); kernel autodetect is correspondingly deprecated."

Which I find to be rather unconvincing.  The cited example is a fault of the
user not torching the superblock before moving the disks or trying to use
them...and I've done this to myself on several occasions.  mdadm --misc
--zero-superblock and 'dd' saved the day in less than ~30s.

Are there any other discussions that might be more convincing, or offer up
other points of view?  Perhaps there's a point I've yet to consider that might
be enlightening.

Thanks!,

-- 
Joshua Kinard
Gentoo/MIPS
kumba@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And our
lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

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

* Re: Metadata > 0.90 and auto-assemble
  2015-02-22 18:54 Metadata > 0.90 and auto-assemble Joshua Kinard
  2015-02-22 21:29 ` Chris Murphy
@ 2015-02-22 22:19 ` Mark Knecht
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Knecht @ 2015-02-22 22:19 UTC (permalink / raw)
  To: Joshua Kinard; +Cc: Linux-RAID

On Sun, Feb 22, 2015 at 10:54 AM, Joshua Kinard <kumba@gentoo.org> wrote:
> Hi,
>
> I tried a while back to use the newer metadata formats on my mdadm RAID5 on a
> few machines, and discovered that the kernel auto-assembly will only work with
> v0.90 metadata, not 1.0 or greater.  Is there a solid reason for this?  Based
> one what I can find regarding the differences in the metadata formats, and
> looking at the existing md code, it seems this is largely just because no one
> has had the time or motivation to change the code to support auto-assembly on
> the newer metdata formats.
>
> I am told that the "correct" solution is to embed a small initramfs to bring
> the RAID arrays online instead, before the real rootfs is loaded.  I'd like to
> avoid this if possible, as I haven't had to use an initramfs for normal booting
> in the past, as long as I stay on metadata 0.90.  So I thought I'd ask what the
> official stance is on this.
>
> Thanks!,
>
> --
> Joshua Kinard
> Gentoo/MIPS
> kumba@gentoo.org
> 4096R/D25D95E3 2011-03-28
>

I cannot speak to any of the reasons to support it or not but I'm a Gentoo
guy since late 2002 who avoided the initramfs for the longest time. I
finally bit the bullet and learned how to build it into my kernels so there are
no extra files and except for a recent problem with Gentoo devs making
changes to busybox defaults it's worked very well. The nice thing about
building it into the kernel is that old kernels continue to work perfectly as
best I can tell.

Anyway, from my perspective it was worth learning. I'm just a user type,
not a dev of any type.

Cheers,
Mark

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

* Re: Metadata > 0.90 and auto-assemble
  2015-02-22 21:54   ` Joshua Kinard
@ 2015-02-23  0:17     ` NeilBrown
  0 siblings, 0 replies; 5+ messages in thread
From: NeilBrown @ 2015-02-23  0:17 UTC (permalink / raw)
  To: Joshua Kinard; +Cc: Chris Murphy, linux-raid

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

On Sun, 22 Feb 2015 16:54:12 -0500 Joshua Kinard <kumba@gentoo.org> wrote:

> On 02/22/2015 16:29, Chris Murphy wrote:
> > On Sun, Feb 22, 2015 at 11:54 AM, Joshua Kinard <kumba@gentoo.org> wrote:
> >> I'd like to
> >> avoid this if possible, as I haven't had to use an initramfs for normal booting
> >> in the past, as long as I stay on metadata 0.90.  So I thought I'd ask what the
> >> official stance is on this.
> > 
> > https://raid.wiki.kernel.org/index.php/Autodetect
> > 
> > Official stance is that it's deprecated, but people still use it.
> 
> Yeah, but it's a pretty useful feature.  I can't see why autodetect for simple
> setups (several disks or partitions and building a basic array out of them) is
> maintained, while userspace autodetect is required for the more complex setups.

The in-kernel autodetect is only maintained because tearing it out and
throwing it away (my preferred option) would be a user-visible regression,
and those are not permitted.

The user-space version is more general and more flexible.  If the
kernel-space version works for you, you can keep using it.  But if you want
features added to it, you are out of luck.

As others have said, creating a simple initrd is really not that hard.  Once
you spend the time to make it work, you will find that it "just works" and
wonder why you ever cared before.

There is even a README.initramfs in the mdadm source.  It was written 10
years ago so I cannot promise it is 100% correct, but it is a reasonably good
and very simple starting point.

NeilBrown


> 
> But I suppose this has been discussed before in detail, though I cannot find
> said discussion.  The RAID Boot page has this one example only:
> 
> "This approach can cause problems in several situations (imagine moving part of
> an old array onto another machine before wiping and repurposing it: reboot and
> watch in horror as the piece of dead array gets assembled as part of the
> running RAID array, ruining it); kernel autodetect is correspondingly deprecated."
> 
> Which I find to be rather unconvincing.  The cited example is a fault of the
> user not torching the superblock before moving the disks or trying to use
> them...and I've done this to myself on several occasions.  mdadm --misc
> --zero-superblock and 'dd' saved the day in less than ~30s.
> 
> Are there any other discussions that might be more convincing, or offer up
> other points of view?  Perhaps there's a point I've yet to consider that might
> be enlightening.
> 
> Thanks!,
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

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

end of thread, other threads:[~2015-02-23  0:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-22 18:54 Metadata > 0.90 and auto-assemble Joshua Kinard
2015-02-22 21:29 ` Chris Murphy
2015-02-22 21:54   ` Joshua Kinard
2015-02-23  0:17     ` NeilBrown
2015-02-22 22:19 ` Mark Knecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox