Difference between revisions of "RAID"

From Vague Hope Wiki
Jump to: navigation, search
Line 26: Line 26:
 
fd        ; sets the type to be “Linux raid auto detect” (83h)
 
fd        ; sets the type to be “Linux raid auto detect” (83h)
 
w        ; write changes to disk and exit
 
w        ; write changes to disk and exit
 +
</pre>
 +
 +
=== Create array ===
 +
<pre>
 +
sudo mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
 +
sudo watch cat /proc/mdstat
 
</pre>
 
</pre>
  

Revision as of 04:10, 15 October 2011

Set up

sudo aptitude install mdadm

Create

Set disc type

For each disc:

sudo fdisk /dev/sdb

n          ; for a new partition
enter
p          ; for a primary partition
enter
1          ; number of partition
enter    ; accept the default
enter    ; accept the default
t          ; to change the type
fd        ; sets the type to be “Linux raid auto detect” (83h)
w         ; write changes to disk and exit

Create array

sudo mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
sudo watch cat /proc/mdstat

References