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