From dcca8b73c08913af4a6d8707690049a71bac2031 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 7 Oct 2024 19:54:28 -0400 Subject: [PATCH] Document hot-replacement to resize mdadm partitions With mdadm 3.3 or newer, partitions can be hot-replaced with new disks so that the array remains fault-tolerant through the replacement process. --- xml/storage_mdadm-resize.xml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/xml/storage_mdadm-resize.xml b/xml/storage_mdadm-resize.xml index d838f2561e..9d52818465 100644 --- a/xml/storage_mdadm-resize.xml +++ b/xml/storage_mdadm-resize.xml @@ -318,6 +318,39 @@ + + Alternatively, if you are replacing the disks and can install the new disks + temporarily alongside the existing array, you can hot-replace the + partitions. This will keep them in service until a new partition has been + rebuilt as a spare, so the array does not enter a degraded state and + remains fault-tolerant during the process. The following steps replace + steps 3–5 in the above procedure. + + + + + Mark a component partition for replacement. For example, to replace + /dev/sda1, enter + +&prompt.sudo;mdadm /dev/md0 --replace /dev/sda1 + + + + Add a replacement partition to the RAID array. For example, to add + /dev/sdd1, enter + +&prompt.sudo;mdadm -a /dev/md0 /dev/sdd1 + + + + Once the new partition has been added and has finished rebuilding, the + partition marked for replacement will be automatically marked as faulty, + and can be removed from the array. For example, to remove + /dev/sda1, enter + +&prompt.sudo;mdadm /dev/md0 --remove /dev/sda1 + +