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

Re: Reuniting disks in a raid1 array



On Tuesday 30 August 2016 11:32:55 Lars Noodén wrote:
> 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).

I suspect this step won't work because the second hard disk was part of the 
array in the past. Its partition table is identical to the one on the active 
disk currently in the array..

If I wipe the partition table from sdb and clone the partition table from sda, 
sdb will end up with the exact same partition table as before. I suspect the 
raid superblocks and file systems will be detected as if I hadn't changed 
anything.

The only difference between sda and sdb is that they lived, as degraded raid1, 
on different computers for a few months.

I would like to avoid dd'ing a 1TB disk with /dev/zero. Syncing the two disks 
will take long enough…

Frederic


Reply to: