Re: best way to replace all disks

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

 



>> I would like to replace all disks with bigger (and newer)
>> ones.  I *can* shutdown the server

> I have a full backup, but this is a huge server (about 2TB) on
> a very slow network (100mbit) Restoring 2TB from 100mbit/s
> network is something I would like to avoid. It's really my
> last resort.

2TB is nowadays a pretty minuscule server (a number of people I
know have in their laptop one or two 2TB NVME drive...), but
then 100Mb/s is small in relation to that.

>> I can't add more disks (so, I can't convert a 2-way mirror to
>> a 3-way mirror).

Except that your situation is that you have 2x RAID1 sets each
with 2x 1TB disks, the first 2 disks have 4 partitions and each
partition is mirrored on the other disk.

Since the two pairs of disks are independent, the obvious way to
proceed is to remove completely one of the two disk pairs, and
use the two slots thus freed to upgrade the RAID sets on the
first disk pair; then do the other.

So for example, assuming that disk A1 is 'sda', disk 'B1' is
'sdb', disk 'C1' is 'sdc', disk 'D1' is 'sdd', and you have
new disks A2, B2, C2, D2:

  * Remove C1 and D1.
  * Put in their place A2 and B2.
  * Expand A1 and B1 into A2 and B2.
  * Remove A1 and B1, A2 and B2.

  * Put in their place C1 and D1, C2 and D2.
  * Expand C1 and D1 into C2 and D2.
  * Remove C1 and D1. 
  * Put in their place A2 and B2.

To expand A1 and B1 into A2 and B2 (and similarly for the other
pair), the simplest and safest way is:

  * Make the RAID set on A1 and B1 read-only.

  * Configure A2 and B2 with the partitions you want.

  * Configure those partition pairs each as a RAID1, and format
    each RAID1 set with the filesystems of choice, and mount them.

  * Copy using 'rsync -axAXHO' the data from the existing RAID
    sets to the new RAID sets, e.g. from '/mnt/md-old[0-3]/' to
    '/mnt/md-new[0-3]/'.



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux