Re: Linux mdadm superblock question.

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

 



On Mon, 15 Feb 2010 08:12:43 +0100
Luca Berra <bluca@xxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux