Re: autodetection

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

 



On Thu, Sep 13, 2018 at 11:16:15AM -0600, Chris Murphy wrote:
> CONFIG_MD_AUTODETECT=y
> 
> All of the md drivers are modules, not built-in. I'm not sure if that
> makes a difference. Should CONFIG_MD_AUTODETECT be y? Or is it a no
> op?

Autodetect is an obscure feature. It's deprecated in any case, 
and even under best conditions, only works for legacy raid (0.90) 
on partitions declared to be of raid type. Hopefully no one is 
using that anymore, it's limited to 2TB members among other things.

It only makes sense if your rootfs is on RAID, and you're somehow 
unable or simply unwilling to use any kind of initramfs.

The kernel needs to be able to mount the rootfs. With rootfs on 
RAID and all drivers built-in (storage, raid, filesystems, ...) 
the kernel can auto-detect raid, mount rootfs, and start init. 
It won't work with modules because there's no way to load them. 
So your configuration is not made for that use case.

If you DO have an initramfs - the initramfs can assemble manually.
You only need autodetect if the initramfs is lazy and all it does 
is run 'mdadm --auto-detect':

       --auto-detect
              Request  that  the kernel starts any auto-detected arrays.  This
              can only work if md is compiled into the kernel — not if it is a
              module.   Arrays  can  be auto-detected by the kernel if all the
              components are in primary MS-DOS partitions with partition  type
              FD,  and  all  use  v0.90 metadata.  In-kernel autodetect is not
              recommended for new installations.  Using mdadm  to  detect  and
              assemble  arrays — possibly in an initrd — is substantially more
              flexible and should be preferred.

But in that case you just have to fix the initramfs. 
Because that's not the proper way to handle raid assembly.
As it still won't support any reasonable RAID mode.

If the rootfs is NOT on RAID - the kernel can just mount directly, 
(still needs built-in storage, filesystem drivers, but not raid)
run the init system, and then mdadm stuff can be handled as a 
regular service.

Regards
Andreas Klauer



[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