I created a RAID5 array using 4 x 2.0Tb drives using the disks GUI. I used
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
to save the configuration. I opened the mdadm.conf file and double checked. I then was able to use
mdadm --stop
to stop the array and
mdadm --assemble --scan
to run it again. I did this several times to make sure it kept working. I created a partition on the new array and repeated the mdadm stop and assemble commands. Confident that I had created an array that would at least assemble when I rebooted, I then rebooted and my array will not assemble. Running
mdadm --assemble --scan
does nothing, no output. Running
mdadm --assemble --scan uuid=xxx
where xxx is the uuid that I copied and pasted from the config file yielded:
uuid=0d6ee5f3:faa93caf:77dbf3dc:828a1f20 not identified in config file.
Using
mdadm --assemble /dev/md127 /dev/sda /dev/sdb /dev/sdc /dev/sdd
yields:
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: /dev/sda has no superblock - assembly aborted
The devices were partitioned, and the array would assemble after I created it, but then after I rebooted it and it would not assemble, I deleted the partitions and it still would not assemble. I admit this may not have been the best move, but I wasn't sure if I was supposed to have created partitions before creating the array, so i deleted them. It appeared not to make a difference, but I can't be sure.
The output of
blkid -p /dev/sd[abcd]
now yields (after the partitions were deleted):
/dev/sda: PTTYPE="gpt"
/dev/sdb: PTTYPE="gpt"
/dev/sdc: PTTYPE="gpt"
/dev/sdd: PTTYPE="gpt"
Update 4 Apr 15: I wrote new GPT tables to each of the drives in 0xfd00 "Linux RAID" format, hoping that might make a difference. I have recreated my RAID 5 array using mdadm instead of the disks GUI. I then used
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
again, but this time, per the replies in this thread, I added auto=md to the end of the line.
Then, I created a script in /usr/share/initramfs-tools/scripts/init-premount that reads:
#!/bin/sh
mdadm --assemble --scan
and then I ran
update-initramfs -u
I also formatted it as a ntfs volume so I could put files on it.
I am able to stop and assemble it using mdadm. Is there anything else I should do before rebooting? I really want this thing to show up again when it restarts!
sudo blkid -p /dev/sda
as well as the same for sdb, sdc, and sdd. Thank you.