User Tools

Site Tools


raid:mdadm:add_a_disk_to_an_existing_array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

raid:mdadm:add_a_disk_to_an_existing_array [2021/09/13 22:57] – created peterraid:mdadm:add_a_disk_to_an_existing_array [2021/09/26 12:17] (current) peter
Line 7: Line 7:
 </code> </code>
  
 +----
 +
 +===== Add a disk using its UUID =====
 +
 +==== Check the UUIDs of the partitions ====
 +
 +<code bash>
 +ls -l /dev/disk/by-partuuid/
 +</code>
 +
 +returns:
 +
 +<code bash>
 +lrwxrwxrwx 1 root root 10 Sep  4 14:49 526e2405-0124-4baa-805f-335369588ddd -> ../../sda1
 +lrwxrwxrwx 1 root root 10 Sep  4 14:49 5d426ea0-5795-4165-863d-1ed947dc77fd -> ../../sda2
 +lrwxrwxrwx 1 root root 10 Sep  4 14:49 8e53314c-0814-46cd-9f13-c2bb2b7a14b6 -> ../../sdb1
 +lrwxrwxrwx 1 root root 10 Sep  4 14:49 90412d26-ebec-4996-96d6-a7a6c702e57e -> ../../sdc1
 +</code>
 +
 +----
 +
 +==== Add /dev/sdc1 using its UUID ====
 +
 +<code bash>
 +mdadm /dev/md0 --add /dev/disk/by-partuuid/90412d26-ebec-4996-96d6-a7a6c702e57e
 +</code>
 +
 +returns:
 +
 +<code bash>
 +mdadm: added /dev/disk/by-partuuid/90412d26-ebec-4996-96d6-a7a6c702e57e
 +</code>
 +
 +----
 +
 +==== Check the details of the RAID array ====
 +
 +<code bash>
 +mdadm --detail /dev/md0
 +</code>
 +
 +returns:
 +
 +<code bash>
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  It reports /dev/sdc1 instead of the UUID.
 +
 +This is not a problem.
 +
 +mdadm allows disks to be moved around freely in the machine, regardless of how you add the disk to the array.
 +
 +  * It tracks the disks by the RAID metadata (superblocks) stored on the disk.
 +  * The default config, specified in /etc/mdadm/mdadm.conf, usually is normally DEVICE partitions, which means to look at all partitions (on all disks) checking for RAID superblocks.
 +    * It checks for a match of the array name or UUID (depending on what is in that config file.
 +</WRAP>
  
raid/mdadm/add_a_disk_to_an_existing_array.1631573830.txt.gz · Last modified: 2021/09/13 22:57 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki