raid:mdadm:add_a_disk_to_an_existing_array
Differences
This shows you the differences between two versions of the page.
raid:mdadm:add_a_disk_to_an_existing_array [2021/09/13 22:57] – created peter | raid:mdadm:add_a_disk_to_an_existing_array [2021/09/26 12:17] (current) – peter | ||
---|---|---|---|
Line 7: | Line 7: | ||
</ | </ | ||
+ | ---- | ||
+ | |||
+ | ===== Add a disk using its UUID ===== | ||
+ | |||
+ | ==== Check the UUIDs of the partitions ==== | ||
+ | |||
+ | <code bash> | ||
+ | ls -l / | ||
+ | </ | ||
+ | |||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add /dev/sdc1 using its UUID ==== | ||
+ | |||
+ | <code bash> | ||
+ | mdadm /dev/md0 --add / | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | mdadm: added / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Check the details of the RAID array ==== | ||
+ | |||
+ | <code bash> | ||
+ | mdadm --detail /dev/md0 | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | 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 / | ||
+ | * It checks for a match of the array name or UUID (depending on what is in that config file. | ||
+ | </ | ||
raid/mdadm/add_a_disk_to_an_existing_array.1631573830.txt.gz · Last modified: 2021/09/13 22:57 by peter