biolocal:Linux raid
From Wiki CEINGE
(Difference between revisions)
Revision as of 11:27, 19 June 2008 (edit) Gianluca (Talk | contribs) (New page: Verify raid status: <pre> mdadm --detail /dev/md0 </pre>) ← Previous diff |
Revision as of 12:56, 19 June 2008 (edit) (undo) Gianluca (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | + | '''RAID Management''' | |
+ | Verify raid status: | ||
<pre> | <pre> | ||
mdadm --detail /dev/md0 | mdadm --detail /dev/md0 | ||
+ | </pre> | ||
+ | |||
+ | Examine disks: | ||
+ | <pre> | ||
+ | mdadm -E /dev/sdd1 | ||
+ | </pre> | ||
+ | |||
+ | Stopping a raid disk: | ||
+ | <pre> | ||
+ | mdadm -S /dev/md0 | ||
+ | </pre> | ||
+ | |||
+ | Assemble a already configured raid disk: | ||
+ | <pre> | ||
+ | mdadm -A /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 | ||
+ | mdadm -Af /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 (force) | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | '''RAID creation''' | ||
+ | |||
+ | Create new partitions as Linux raid autodetect (type fd in fdisk) on each disk that should be added | ||
+ | <pre> | ||
+ | fdisk /dev/sda | ||
+ | </pre> | ||
+ | |||
+ | Create the array | ||
+ | <pre> | ||
+ | mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 | ||
+ | </pre> | ||
+ | |||
+ | Add the device list string into the file /etc/mdadm.conf: | ||
+ | <pre> | ||
+ | DEVICE /dev/sda* /dev/sdb* /dev/sdc* /dev/sdd* | ||
+ | </pre> | ||
+ | |||
+ | Automatically complete the configuration appending the raid device information: | ||
+ | <pre> | ||
+ | mdadm --detail --scan >> /etc/mdadm.conf | ||
</pre> | </pre> |
Revision as of 12:56, 19 June 2008
RAID Management
Verify raid status:
mdadm --detail /dev/md0
Examine disks:
mdadm -E /dev/sdd1
Stopping a raid disk:
mdadm -S /dev/md0
Assemble a already configured raid disk:
mdadm -A /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 mdadm -Af /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 (force)
RAID creation
Create new partitions as Linux raid autodetect (type fd in fdisk) on each disk that should be added
fdisk /dev/sda
Create the array
mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
Add the device list string into the file /etc/mdadm.conf:
DEVICE /dev/sda* /dev/sdb* /dev/sdc* /dev/sdd*
Automatically complete the configuration appending the raid device information:
mdadm --detail --scan >> /etc/mdadm.conf