mdadm / software raid¶
if you get an error like mdadm: invalid number of raid devices: devices=2 run the command like so (with
-l for level and
-n for devices):
create a file system:
or whatever filesystem you want.
check raid status¶
save raid config¶
well, that's somewhat important, right?
update-initramfs -u after updating this file.
also, back up the
mdadm.conf file to restore it onto a new system
copy partition table from backup or primary drive:
convert single disk to raid 1¶
... hopefully without losing data!
- create raid from 2nd disk with one missing disk
- copy data from 1st disk to 2nd disk (now in raid)
- add 1st (original) disk to raid config
- rebuild raid
- profit (took 5 steps, I'm sorry)
now copy the data from the original disk to the newly created raid, so create and mount your filesystem on
prepare original disk:
let's dump (
-d the disk layout from the raid disk to the original disk):
add original disk to raid:
check raid rebuild status:
increase mdadm rebuild / resync speed¶
you can check the current speed limits with:
and, now just increase that number to make it faster (it's displayed in kb)
if you messed things up, you can try and restore things with