tldr/pages/linux/mdadm.md

29 lines
501 B
Markdown

# mdadm
> RAID management utility.
> More information: <https://manned.org/mdadm>.
- Create array:
`mdadm --create {{/dev/md/MyRAID}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/dev/sdXN}}`
- Stop array:
`mdadm --stop {{/dev/md0}}`
- Mark disk as failed:
`mdadm --fail {{/dev/md0}} {{/dev/sdXN}}`
- Remove disk:
`mdadm --remove {{/dev/md0}} {{/dev/sdXN}}`
- Add disk to array:
`mdadm --assemble {{/dev/md0}} {{/dev/sdXN}}`
- Show RAID info:
`mdadm --detail {{/dev/md0}}`