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.
|
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
|
|
|
|
|
|
|
`mdadm --create {{/path/to/raid_device_file}} --level {{ raid level }} --raid-devices {{ number of disks}} {{/path/to/disk_device_file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Stop array:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
|
|
|
`mdadm -S {{/path/to/raid_device_file}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Mark disk as failed:
|
2014-08-04 04:31:06 +01:00
|
|
|
|
2014-08-25 11:50:27 +01:00
|
|
|
`mdadm {{/path/to/raid_device_file}} -f {{/path/to/disk_device_file}}`
|
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
|
|
|
|
2014-08-25 11:50:27 +01:00
|
|
|
`mdadm {{/path/to/raid_device_file}} -r {{/path/to/disk_device_file}}`
|
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
|
|
|
|
2014-08-25 11:50:27 +01:00
|
|
|
`mdadm {{/path/to/raid_device_file}} -a {{/path/to/disk_device_file}}`
|
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
|
|
|
|
|
|
|
`mdadm -D {{/path/to/raid_device_file}}`
|