Difference between revisions of "RAID"

From Vague Hope Wiki
Jump to: navigation, search
(Mount)
(Mount)
Line 51: Line 51:
 
Add to /etc/fstab:
 
Add to /etc/fstab:
 
<pre>
 
<pre>
/dev/md0 /media/yama ext4 defaults,errors=remount-ro 0 2
+
/dev/md0 /media/yama ext4 defaults,errors=remount-ro,nobootwait 0 2
 
</pre>
 
</pre>
  

Revision as of 13:21, 24 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

mdadm.conf

sudo -i
mdadm --detail --scan --verbose >> /etc/mdadm/mdadm.conf

Format

sudo mkfs.ext4 /dev/md0

Mount

Add to /etc/fstab:

/dev/md0 /media/yama ext4 defaults,errors=remount-ro,nobootwait 0 2

References