Reminder : Mdadm commands
I'll try to sum up here everyday needed commands with mdadm.
Of course, you'll need to replace partitions letters and numbers by yours.
Every line is a different command and require root privileges.
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
mdadm --assemble /dev/md0 /dev/sda1 --force
Of course, you'll need to replace partitions letters and numbers by yours.
Every line is a different command and require root privileges.
- Install raid manager (mdadm) on Debian based distros (Ubuntu, Linux Mint...)
- Create a new raid with all disks presents
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
- Create a new raid with only one present (use it to migrate a single drive to a raid : first create the raid with one disk, copy data, complete the raid with the second disk)
mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sda1
- Get a quick overview of raids running on the system
- Get full details of a raid
- Assemble an existing raid with all disks presents
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
- Assemble a 2-disks raid with only one present (use it if one disk crashed)
mdadm --assemble /dev/md0 /dev/sda1 --force
- Add a new partition to an existing raid
Commentaires
Enregistrer un commentaire