Re: Replace disks

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

 



On Tue, Mar 27, 2018 at 10:51:06AM +0200, Gandalf Corvotempesta wrote:
> # mdadm --detail /dev/md0
> /dev/md0:
>         Version : 1.2
>      Raid Level : raid1
>    Raid Devices : 3

> (I have 3 free slots in this server).

If you have three free slots, add your new drives, partition them 
and grow your 3-drive RAID-1 to a 6-drive RAID-1.

  mdadm --grow /dev/md0 --raid-devices=6 --add /dev/newX1 /dev/newY1 /dev/newZ1
  mdadm --wait /dev/md0 # and/or watch cat /proc/mdstat

When the sync is done, you can fail the old drives.

  mdadm /dev/md0 --fail /dev/oldA1 /dev/oldB1 /dev/oldC1

And reduce the number of drives back to 3.

  mdadm --grow /dev/md0 --raid-devices=3

Finally grow the RAID size to max.

  mdadm --grow /dev/md0 --size=max

Of course the last step only works if you added large partitions...

Regards
Andreas Klauer
--
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



[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