biolocal:Linux raid

From Wiki CEINGE

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:56, 19 June 2008 (edit)
Gianluca (Talk | contribs)

← Previous diff
Revision as of 13:04, 19 June 2008 (edit) (undo)
Gianluca (Talk | contribs)

Next diff →
Line 25: Line 25:
'''RAID creation''' '''RAID creation'''
-Create new partitions as Linux raid autodetect (type fd in fdisk) on each disk that should be added+Create new "Linux raid autodetect" partitions (type code fd in fdisk) on each disk:
<pre> <pre>
fdisk /dev/sda fdisk /dev/sda

Revision as of 13:04, 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 "Linux raid autodetect" partitions (type code fd in fdisk) on each disk:

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
Personal tools