Wednesday 30 November 2011

Fedora 16: mount software raid

change to root
$ sudo su

create a mount point for the raid
# mkdir /mnt/raid

save old mdadm config (just in case)
# mv /etc/mdadm.conf /etc/mdadm.conf.bak

copy raid details into mdadm config
# mdadm --detail --scan > /etc/mdadm.conf
creates a file somewhat like this:
> ARRAY /dev/md/NAS:0 metadata=1.2 name=NAS:0 UUID=4dc53f9d:f0c55279:a9cb9592:a59607c9

add the raid configuration to your /etc/fstab file (notice the 1st field is the device, which is the same as the 2nd field returned from mdadm --detail --scan)
/dev/md/NAS:0      /mnt/raid     ext4    defaults    1 2

mount the raid
# mount -a

check its status
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md127 : active raid5 sdb1[2] sde1[1] sdd1[4] sda1[0]
      5860538880 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]

unused devices: <none>


   


No comments:

Post a Comment