Re: What's the usage of md-autodetect.c

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

 



Hello,

MD Autodetect allows for the assembly of raid-1 mirror filesystems
in-kernel before userspace starts, without requiring the complexity and
fragility of using an initrd and switch-root.
It is still in widespread use and given that it has a wide use case in
any system that wants fully resilient boot/root devices (which can be
done even on EFI) is likely to remain essential.  While the various
high-profile general purpose Linux distributions such as Red Hat and
Ubuntu may use initrd by default, there are innumerable scenarios,
particularly in embedded space, where initrd is never used but RAID may
be and hence auto-detect is used to assemble the actual root file system.

Removing it would be a major regression in 'md' functionality.

Yes, it requires CONFIG_MD and the appropriate RAID personality
(typically CONFIG_MD_RAID1) to be set to 'y' in Kconfig.  It doesn't
(IIRC) get built if CONFIG_MD is set to M.  Changing the default for
CONFIG_MD should not have any impact on this so long as the ability to
set CONFIG_MD=y does not get disabled (which would also be a regression).

If auto-detect were to be considered for removal then IMO it needs to go
through the full kernel feature deprecation/removal life cycle - i.e.
first it gets marked as deprecated in KConfig, then after a decent time
interval (years?) the default for the option is changed, and only after
that has all happened without causing problems, the code gets considered
for removal.

Regards,

Geoff.

Geoff Back
What if we're all just characters in someone's nightmares?

On 07/03/2023 03:04, Xiao Ni wrote:
> From the code of md-autodetect.c, it looks like it's used to create
> the raid device
> during boot. Now we use udev rules to assemble the raid. Do we still need it?
> What's the usage of md-autodetect?
>
> And in Kconfig, it depends on md-raid as Y when building a kernel. If we change
> the default to M, md-autodetect will not work anymore, right?
>
> Best Regards
> Xiao
>




[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