2015-10-22 08:00:05 +01:00
|
|
|
# mdadm
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> RAID management utility.
|
2020-10-28 17:19:43 +00:00
|
|
|
> More information: <https://linux.die.net/man/8/mdadm>.
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Create array:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --create {{/dev/md/MyRAID}} --level {{raid_level}} --raid-devices {{number_of_disks}} {{/dev/sdXN}}`
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Stop array:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --stop {{/dev/md0}}`
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Mark disk as failed:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --fail {{/dev/md0}} {{/dev/sdXN}}`
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Remove disk:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --remove {{/dev/md0}} {{/dev/sdXN}}`
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Add disk to array:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --assemble {{/dev/md0}} {{/dev/sdXN}}`
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show RAID info:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`mdadm --detail {{/dev/md0}}`
|