Skip to content

Commit

Permalink
Merge pull request #1772 from Grinnz/patch-1
Browse files Browse the repository at this point in the history
Document hot-replacement to resize mdadm partitions
  • Loading branch information
lvicoun authored Oct 10, 2024
2 parents 293d2d1 + dbdd58a commit d630aea
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions xml/storage_mdadm-resize.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,39 @@
</para>
</step>
</procedure>
<para>
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&ndash;5 in the above procedure.
</para>
<procedure>
<step>
<para>
Mark a component partition for replacement. For example, to replace
<filename>/dev/sda1</filename>, enter
</para>
<screen>&prompt.sudo;mdadm /dev/md0 --replace /dev/sda1</screen>
</step>
<step>
<para>
Add a replacement partition to the RAID array. For example, to add
<filename>/dev/sdd1</filename>, enter
</para>
<screen>&prompt.sudo;mdadm -a /dev/md0 /dev/sdd1</screen>
</step>
<step>
<para>
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
<filename>/dev/sda1</filename>, enter
</para>
<screen>&prompt.sudo;mdadm /dev/md0 --remove /dev/sda1</screen>
</step>
</procedure>
</sect2>

<sect2 xml:id="sec-raid-resize-incr-raid">
Expand Down

0 comments on commit d630aea

Please sign in to comment.