Skip to contentSkip to conversation

Autostarting arrays with V1 metadata

DISCUSSION Ben Winslow 4 participants 4 messages May 7, 2008 – May 8, 2008 MD RAID

lore
Share & tools
lore
#0 lore raw

I've noticed that (as of 2.6.25, at least) the kernel doesn't autostart arrays with V1 metadata. In autostart_arrays(), md_import_device() is called for 0.90 arrays only, and there's currently no sort of autodetection of the superblock position for V1 metadata.

Is this simply a matter of the code being unwritten, or are there other reasons that V1 arrays aren't autostarted (such as the SB format being unfinished)? My only real motivation to use V1 metadata is the unhashed homehost field, which I'll give up if the SB format hasn't stabilized yet.

Thanks,

Signature · 1 line
Ben Winslow <[email protected]>
#1 lore raw
Quoted 9 lines · On Wednesday May 7, [email protected] wrote:

I've noticed that (as of 2.6.25, at least) the kernel doesn't autostart arrays with V1 metadata. In autostart_arrays(), md_import_device() is called for 0.90 arrays only, and there's currently no sort of autodetection of the superblock position for V1 metadata.

Is this simply a matter of the code being unwritten, or are there other reasons that V1 arrays aren't autostarted (such as the SB format being unfinished)? My only real motivation to use V1 metadata is the unhashed homehost field, which I'll give up if the SB format hasn't stabilized yet.

V1.x metadata (deliberately) doesn't contain sufficient information to allow in-kernel autodetect. In particular it doesn't store the 'minor number' information so the kernel wouldn't know which md device to use.

However it is quite possible to assemble V1.x arrays using mdadm in an initrd. This is the preferred method.

Ofcourse, if the array doesn't hold the root filesystem, you can just assemble it as part of the regular boot scripts.

NeilBrown

#3 lore raw
In reply to Ben Winslow
Quoted 11 lines · Ben Winslow

I've noticed that (as of 2.6.25, at least) the kernel doesn't autostart arrays with V1 metadata. In autostart_arrays(), md_import_device() is called for 0.90 arrays only, and there's currently no sort of autodetection of the superblock position for V1 metadata.

Is this simply a matter of the code being unwritten, or are there other reasons that V1 arrays aren't autostarted (such as the SB format being unfinished)? My only real motivation to use V1 metadata is the unhashed homehost field, which I'll give up if the SB format hasn't stabilized yet.

Thanks,

Also, FYI:
http://linux-raid.osdl.org/index.php/Autodetect

and
http://linux-raid.osdl.org/index.php/RAID_Boot

#2 lore raw
In reply to Neil Brown

On Thu, May 08, 2008 at 01:05:44PM +1000, Neil Brown wrote:

[snip...]

Quoted 2 lines

However it is quite possible to assemble V1.x arrays using mdadm in an initrd. This is the preferred method.

I wasn't aware there's a "preferred method" to assembling an array at boot time. Could you please elaborate as to why assembling in user space would be better? (besides having the ability to assemble non 0.9 metadata)

Just curious :-)

Bryan