On 08/03/17 11:28, Gandalf Corvotempesta wrote: > Hi to all > I'm trying to configure mdadm to do automatic replace/rebuild when a > disk is phisically removed and replaced in a slot but without success Do you mean you remove an old disk, and put a new blank disk in? > > Is this possible? How? > The new disk must be formatted or mdadm will replicate partition table > on it's own? If that's what you mean, then no, it's not possible. mdadm doesn't have a clue about disks, what it sees is "block devices". If you stick a new disk in, you need to tell mdadm about it. At which point you can add it as a spare (which means mdadm will use it to replace a disk that fails), or you can tell mdadm to replace a failed disk. You should not - if you can help it - ever remove a disk and then replace it. Yes in practice I know that's a luxury people often don't have ... at best you should have spares configured; if you have to you put the new drive in, use --replace, and then remove the old one. The last resort is to remove the broken drive and then replace it - this is likely to trigger further failures and bring down the array. Cheers, Wol -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html