[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reuniting disks in a raid1 array



On Tue, Aug 30, 2016 at 07:33:02AM +0200, Frédéric Marchal wrote:
> I had two disks in a mdadm software raid1 on an old computer.
> 
> I moved sda to a new computer. It ran there in a degraded raid1 for months.
> 
> The second disk, sdb, kept running as the lone survivor of the original raid1 
> on the old computer.
> 
> 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?
> 
> Do I have to wipe sdb before adding it to the new computer? If so, how do I 
> make sure raid data is gone from every one of the three partitions?

The wipefs tool can remove RAID signatures.

Deleting and recreating the partitions with the same size doesn't help
on its own, because it will not affect the signatures.
Overwriting the beginning of the disk or the partitions may not be
sufficient either, because depending on the RAID superblock version, it
might be stored at the end.

> Or maybe mdadm will see that sda was used more recently than sdb and will 
> synchronize sda onto sdb?

I would advise against such experiments. It's best to wipe the signatures
while the disk is still in the old computer, then transfer it to the new
one. A bootable rescue system such as GRML can be very handy for this job.

Regards
Mirko


Reply to: