-   Linux - Server (
-   -   How do I create a software raid array from 3TB drives? (parted?) (

swingliner 10-13-2011 06:59 PM

How do I create a software raid array from 3TB drives? (parted?)
I'm on Ubuntu 10.04 64 bit. I have 6 3TB drives I want to place in raid 10. For <=2TB drives, I would run fdisk, create 'fd' (linux raid autodetect) partitions on each drive, then mdadm --create, then mkfs on the new mdX raid device. Since I can no longer use fdisk on >2TB drives, I tried parted instead of fdisk:


        parted /dev/sdx
        (parted) mklabel gpt
        (parted) unit TB
        (parted) mkpart primary 0 -1
        (parted) print
        (parted) quit

I ran the above on all drives, then did:

        mdadm --create /dev/md0 --level=10 --verbose --raid-devices=6 --spare-devices=0 /dev/sd{b,c,d,e,f,g}1
        mdadm --detail --scan >> /etc/mdadm.conf

as usual.

This actually worked, and I was able to mkfs and mount and read/write data. However, upon reboot, ubuntu didn't correctly detect the drives and recreate the md0 from the appropriate partitions. What am I doing wrong?

Skaperen 10-13-2011 08:05 PM

How far did the reboot get? Any error messages you can provide? I suspect some module might not have been set up to load into the kernel. Or if you never reached the kernel, the boot loader got mangled or doesn't have GPT support.

I generally recommend in a RAID situation to have a separate smaller drive, even an SSD flash device, for booting and system files (like /usr) that need nowhere near a TB. Separation like that also means being able to re-install the OS without losing data, or reformatting the data for recovery from backup without losing the OS, easier to do. In some cases the OS drive might be mirrored or simply replicated as a fast backup (boot the other drive).

syg00 10-13-2011 09:34 PM

You'll probably need "raid" in parted for autodetect.

All times are GMT -5. The time now is 10:42 AM.