System and processes
The mdadm command
Creates and manages software RAID: mirror (raid1), parity (raid5), etc.
Syntax
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdcMost useful options
--createCreate the array--levelRAID level (1, 5...)--detailShow array status--stopStop the arrayCopy-ready examples
$ sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdcCreate a mirror$ sudo mdadm --detail /dev/md0See statusYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- RAID1 needs at least 2 disks; the array appears as /dev/md0.
FAQ
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course