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