1st Post on OC although a reader for a number of years ... And I am pleading for help!
Possibly more for "randal24" I have opted for a similar spec to you:
N40L, 8GB Memory, 2x 3TB REDs + a couple of 3TB GREENS (when the Synology is sold on)
I am stuck at the formatting stage:
I want to have the 2x RED's running a mirrored pair with the OS/Home/Boot/etc
I will have the 2nd pair as a mounted area for storage of other media files etc.
I am really struggling at getting RAID on the first pair due to the GPT partitions and looking google has just confused matters even more - so ideally looking for a step by step guide on getting it working if you could help me and others?
Thanks in advance
Hello mate,
What are you running? Ubuntu? I have a slightly different setup insomuch as I have an SSD for OS/apps and the RAID1 array for storage.
I used Gparted to create a new GPT partition table on each RAID member disk. You have to change it from msdos to GPT so you can create individual partitions greater that 2TB.
Once that's done, create ext4 partitions on each drive to the size you want. I went for maximum sizes, which equates to 2.73TB. Due to the nature of ext4 it provisions it's overhead at creation time so that's why you won't see the full 3TB.
Don't use fdisk on the command line because it has a 2TB partition limit btw.
Once that's done, you need to install mdadm (apt-get install mdadm) to create the mirror.
I think I ran:
Code:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1
Once this has done, you can cat /proc/mdstat to see how it's doing in the disk sync. Prepare to wait, lots.
Protip:
Code:
echo 100000 > /proc/sys/dev/raid/speed_limit_min
Code:
while true
do
clear
cat /proc/mdstat
sleep 10
done
Code:
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
Now, setup /etc/fstab to mount the array at boot. Add the line:
Code:
/dev/md0 /your/mount/point ext4 defaults 0 2
Finally, I'd recommend installing ssmtp and then setting up the mail alerts for mdadm also. I setup a GMail account for the purpose and piped the credentials into sstmp.
ssmtp guide here: http://en.gentoo-wiki.com/wiki/Gmail_and_sSMTP
mail alerts guide for mdadm here: http://ubuntuforums.org/showthread.php?t=1185134
general mdadm help here: http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/
Enjoy.

edit - Oh, big thing I forgot to mention! MD randomly decided to rename my metadevice from /dev/md0 to /dev/md127 after reboot... duh. If you get an error about not being able to find the array to mount on reboot, just ls /dev/md and hit tab to autocomplete and you should see what it's renamed it to. Edit /etc/fstab accordingly then either reboot to test it properly, or mount -a to mount everything from /etc/fstab.
Last edited: