2

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!

4

1 に答える 1

3

これを修正するための鍵は、最初にドライブをパーティション分割し、raw デバイスではなくパーティションからアレイを作成することでした。

基本的に、create コマンドを次のように変更する必要がありました。

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

残りの手順は正しく、この変更が行われるとすべてが適切に作成されました。なぜこれが必要なのかについてのさらなる情報は役に立ちます。私が見つけたどのドキュメントでも、それは確かに明らかではありませんでした。

于 2014-03-03T03:29:17.103 に答える