Re: Replace disks

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

 



>>>>> "Gandalf" == Gandalf Corvotempesta <gandalf.corvotempesta@xxxxxxxxx> writes:

Gandalf> Ok, it's time to replace 3 disks in a 3-way mirrors on a running
Gandalf> production server.

Gandalf> This is the current raid:

Gandalf> # mdadm --detail /dev/md0
Gandalf> /dev/md0:
Gandalf>         Version : 1.2
Gandalf>   Creation Time : Mon Jul 25 12:55:48 2016
Gandalf>      Raid Level : raid1
Gandalf>      Array Size : 488382841 (465.76 GiB 500.10 GB)
Gandalf>   Used Dev Size : 488382841 (465.76 GiB 500.10 GB)
Gandalf>    Raid Devices : 3
Gandalf>   Total Devices : 3
Gandalf>     Persistence : Superblock is persistent

Gandalf>     Update Time : Tue Mar 27 10:49:06 2018
Gandalf>           State : clean
Gandalf>  Active Devices : 3
Gandalf> Working Devices : 3
Gandalf>  Failed Devices : 0
Gandalf>   Spare Devices : 0

Gandalf>            Name : x:0  (local to host x)
Gandalf>            UUID : b2a5ed53:42890b73:dc6de22a:1ac12524
Gandalf>          Events : 31038

Gandalf>     Number   Major   Minor   RaidDevice State
Gandalf>        0       8        1        0      active sync   /dev/sda1
Gandalf>        1       8       17        1      active sync   /dev/sdb1
Gandalf>        2       8       33        2      active sync   /dev/sdc1


Gandalf> I have to replace all disks (one per time, or, if possible,
Gandalf> all at the same time), by adding new disks in spare slots (I
Gandalf> have 3 free slots in this server).

Gandalf> The final configuration should be an increased
Gandalf> raid/filesystem, growing from the current 500GB to a 2TB

Gandalf> Any suggestions ?
Gandalf> I know that mdadm is able to replace a disks without bringing offline
Gandalf> the previous one, thus without affecting the redundancy. This is what
Gandalf> I would like to do.

If you're running LVM on top of this array, then I would simply:

1. add three new disks into a new RAID1 array spanning the entire
   disk as /dev/md1
2. pvcreate /dev/md1
3. vgextend <vg> /dev/md1
4. pvmove -b /dev/md0
5. wait for the move to complete
6. vgreduce <vg> /dev/md0

Then you can simply stop the /dev/md0 with md and pull the drives once
it's all quiet.  This is why I really like putting LVM ontop of MD
devices, since it makes volume moves like this really simple.

John
--
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