On 08/30/2016 08:33 AM, Frédéric Marchal wrote: >... > Now, it's time for the old computer to retire and sdb to join its partner in > the new raid1 on the new computer. > > How can I do this safely?
Here is what I did when I restored a drive to a RAID 1 array. I'm not an expert, so you'll want to verify these steps. First I cleared the start of the drive-to-be-added using "dd" reading from /dev/zero for 1MB (probably unnecessarily large). Then I copied the partition table from the existing disk in the array to the disk-to-be-added. I used a different method, but looking around the correct way might have been to pipe output from "sfdisk -d" on the existing drive to "sfdisk" on the drive-to-be-added. That put the partition(s) in the right place(s). Then I added the "new" RAID partition to the array using "mdadm". e.g. mdadm --add /dev/md129 /dev/sdb3 Then it was just a matter of waiting and checking. e.g. mdadm -D /dev/md129 When it was finished, it showed that it was again clean and that both devices were present and in use. State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 YMMV Regards, Lars