Question

I'm using Ubuntu 13.10 and trying to create a RAID 5 array across 3 identical disks connected to SATA ports on the motherboard. I've followed every guide and and used both the built-in Disks GUI app and mdadm at the command line, and despite everything I cannot get the array to persist after reboot.

I create the array with the following command:

root@zapp:~# mdadm --create /dev/md/array --chunk=512 --level=5 \
    --raid-devices=3 /dev/sda /dev/sdb /dev/sdd

Then I watch /proc/mdstat for awhile while it syncs, until I get this:

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : active raid5 sda1[0] sdd1[3] sdb1[1]
      1953262592 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]

unused devices: <none>

To update the mdadm config file, I run the following:

root@zapp:~# /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

This adds the essential line to my config file:

ARRAY /dev/md/array metadata=1.2 UUID=0ad3753e:f0177930:8362f527:285d76e7 name=zapp:array

Everything seems correct, but when I reboot, the array is gone!

Was it helpful?

Solution

The key to fixing this was to partition the drives first, and create the array from the partitions instead of the raw devices.

Basically, the create command just needed to change to:

root@zapp:~# mdadm --create /dev/md/array --chunk=512 --level=5 \
    --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdd1

The rest of the steps were correct, and created everything properly once this change was made. Any further info as to why this was necessary would be helpful. It was certainly not obvious in any of the documentation I found.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top