[Yaird-devel] Bug#351183: use "mdadm -Ac partitions --uuid FOO" to assemble root raid

Jason Lunz lunz at falooley.org
Tue May 2 19:47:35 UTC 2006


On Thu, Feb 02, 2006 at 06:59:42PM -0800, dean gaudet wrote:
> it's generally preferable to tell mdadm to scan the partitions list to 
> find raid component devices by UUID rather than specify the device list 
> explicitly...
> 
> for example with an explicit device list you can end up with boot failures 
> if one of the devices is missing... or if the devices are renamed for 
> whatever reason.
> 
> i suggest the following patch...
> 
> thanks
> -dean
> 
> --- /etc/yaird/Templates.cfg	2006/02/03 02:44:49	1.1
> +++ /etc/yaird/Templates.cfg	2006/02/03 02:46:15
> @@ -299,8 +299,7 @@
>  		SCRIPT "/init"
>  		BEGIN
>  			!mknod <TMPL_VAR NAME=target> b <TMPL_VAR NAME=major> <TMPL_VAR NAME=minor>
> -			!mdadm --assemble <TMPL_VAR NAME=target> --uuid <TMPL_VAR NAME=uuid> \
> -			!	<TMPL_LOOP NAME=components> <TMPL_VAR NAME=dev></TMPL_LOOP>
> +			!mdadm -Ac partitions <TMPL_VAR NAME=target> --uuid <TMPL_VAR NAME=uuid>
>  		END SCRIPT
>  	END TEMPLATE

I agree. Unfortunately, telling mdadm to scan other devices/partitions
is only useful if there will be device nodes for them. And by default,
yaird only adds the dev nodes that are listed in the above command.

So it's useful to add --run, so that the --assemble command will start
an array that's missing a disk. But telling it to scan partitions with
--config only has the effect of segfaulting sarge's mdadm, or making
sid's mdadm behave more or less as it would with --run.

Jason




More information about the Yaird-devel mailing list