tldr/pages/linux/mdadm.md

29 lines
501 B
Markdown
Raw Permalink Normal View History

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