(original article)

Re: Auto-assembly mode for mdadm

05 September 2006, 15:18 UTC

Each device does contain an 'array specific signature' - the uuid in the superblock.

We do ensure that if drives are moved from one host to another the drives from one don't get confused with the drives from the other. However that isn't the main issue.

One of the main issues is that each array records its 'name'. So the array with '0' recorded becomes /dev/md0. The array with '1' recorded becomes /dev/md1. If you find 2 arrays that both claim to be '0', which one do you believe? I propose using the hostname to distinguish.

mdadm doesn't require that string given to --hosthost to actually be a hostname. It can be any string that will identify the host. You cannot use something from the kernel build as sites often run exactly the same kernel on all (or many) machines.

Getting a host name isn't really that hard. In some situations you could get it from dhcp. In others you could build it in to the initrd. Or you could use MAC address if you are sure to only have one. But somehow you need to identify 'this' host.

Thanks for your thoughts.




[æ]