Bug#737951: mdadm: udev rules files ignores raid=noautodetect kernel parameter
A message that is not in the archive (sent off-list or not yet received): [email protected]
Control: tag -1 + moreinfo
Control: severity -1 wishlist
Quoted 17 lines · Michael Prokop
Package: mdadm
Version: 3.3-2
Severity: normalQuoting from kernel's
Documentation/md.txt:,---- [ https://www.kernel.org/doc/Documentation/md.txt ]
| Boot time autodetection of RAID arrays | -------------------------------------- | | When md is compiled into the kernel (not as module), partitions of | type 0xfd are scanned and automatically assembled into RAID arrays. | This autodetection may be suppressed with the kernel parameter | "raid=noautodetect". As of kernel 2.6.9, only drives with a type 0 | superblock can be autodetected and run at boot time.`----
Quoted 7 lines
The udev rules file
/lib/udev/rules.d/64-md-raid-assembly.rulesshipped by mdadm ignores that kernel parameter and tries to assemble mdadm RAIDs without honoring the raid=noautodetect setting.It would be nice if there would be some way (maybe just checking for raid=noautodetect in
/proc/cmdline?) to disable auto assembly without having to manually delete/override the udev file.
I don't think that using raid=noautodetect is a good way of doing this. It is for the really obsolete in-kernel array assembly, and it is described as such in the documentation you quoted above.
In debian we have another parameter in initrd, --
mdassemble=all|none|list
which is copied from a debconf question. Maybe this one is better suited for this need, at least it is more flexible. It is sort of trivial to get this parameter from kernel command line in the initrd script.
But.
It is all about early-boot environment.
None of these parameters, at my point of view, should be considered after pre-boot is done and we're in the main system. If you're talking about main udev rules of mdadm, I disagree, there should be entirely separate option, if at all.
What is your usage case? What are you trying to achieve?
Note that we're moving (very slow) towards assembling everything using those rules, including your boot arrays, so if you disable those, your system wont boot anymore.
Adding linux-raid list to Cc. Please describe your situation in more detail, and maybe together we will be able to come to some solution.
Marking your bugreport as a wishlist for now in debian.
Thanks,
/mjt
Hi,
thanks for the fast reply, Michael
Quoted 9 lines · Michael Tokarev
Quoted 3 lines · Michael Prokop
It would be nice if there would be some way (maybe just checking for raid=noautodetect in
/proc/cmdline?) to disable auto assembly without having to manually delete/override the udev file.I don't think that using raid=noautodetect is a good way of doing this. It is for the really obsolete in-kernel array assembly, and it is described as such in the documentation you quoted above.
Right
[...]
Quoted 6 lines
None of these parameters, at my point of view, should be considered after pre-boot is done and we're in the main system. If you're talking about main udev rules of mdadm, I disagree, there should be entirely separate option, if at all.
What is your usage case? What are you trying to achieve?
[...]
My goal is to support booting a live system (like http://grml.org/)
in a way which *prevents* auto assembling under all circumstances. This is relevant e.g. for data rescue and forensics tasks.
regards,
-mika-