Add a drive to raid1
First get information about the raid array:
cat /proc/mdstat
Then get information about the drive you’re going to add
fdisk -l /dev/DISK_TO_ADD
If there are any partitions, delete them and create a one new primary partition with type
fd
– Auto RAID Add the prepared drive to the array:mdadm --add /dev/RAID /dev/DISK_TO_ADD
And expand it:
mdadm --grow /dev/RAID --raid-devices= N+1 # N - the number of drives in the raid array before the expansion
Seat comfortable and watch the raid being rebuilded:
watch cat /proc/mdstat