Gabor Gombas <gombasg@xxxxxxxxx> writes: > On Sun, Jan 31, 2010 at 04:34:03PM +0100, Asdo wrote: > >> 1/ The live-spare gets filled of data without recording anything on >> any superblocks. If there is a power failure and reboot, the new MD >> will know nothing about this. The process has to be restarted. > > IMHO MD must know about the copy and it must know not to use the new > device before the copying is completed. Otherwise after a reboot mdadm > may either import the new half-written spare instead of the real one if > the superblock is already copied, or other tools like LVM may start > using the new half-written spare instead of the RAID if the MD > superblock is still missing. > > Gabor No that is exactly what he means to avoid. His suggestion is that at the start the metadata area of the life-spare is kept as is, being a simple unused spare. Only the in-memory data records that it actualy is a live-spare and only the data part of the device is mirrored. Then at the end you remove the old disk, add the live-spare and record the change in the metadata of all drives in an semi atomic way. If anything interrupts the operation before this the live-spare will still be recorgnised as normal spare when the raid is reassembled. MfG Goswin -- 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