Score:0

RAID1 Drives mounted randomly at boot

fm flag

I have two drives (HDD) in a RAID1 array. The issue here is that after I start the system, one time they are mounted as desired and the other time they are not. As can bee seen in the pictures with the command lsblk, I find that the one time they are listed as sdc->sdc1->md127 and sdd->sdd1->md127 and the other time (the desired I believe) they are listed as sdc->sdc1->md0 and sdd->sdd1->md0. This happens rather randomly in my belief.

Correct(?) mount with md0 Incorrect(?) mount with md127

I've set it up using mdadm following: https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-16-04 (using ubunto 20.04 though)

When they are not mounted correctly, I noticed that the startup screen takes very long. Could this mean anything?

Very sorry for the low quality of screenshots but the system is always on the road so hard to take prober screens.

/etc/mdadm/mdadm.conf: enter image description here

/proc/mdstat: enter image description here

I also noticed that somehow the UUID in the mdadm.conf file on both drives is the same. The following screenshot shows that this shouldn't be if I'm correct? If that is so, how can I fix this without losing data on my disks?

enter image description here

Please let me know what other info I could provide!

fr flag
What is your content of /etc/mdadm/mdadm.conf and /proc/mdstat? Also, please indicate clearly which is the desired state (I'm assuming md0).
fm flag
@NiclasBörlin thanks, i added these and yes, I believe the desired state is md0 since then, as seen, it is mounted as mnt/raid1
fm flag
I also added the config file which shows some incorrectness in my belief with the UUIDs.
fr flag
Please replace your screen dumps with the text content of the files. Using images where a simple text is more suitable generates posts that are harder to read, harder to comment, heavier to load, and not searchable.
fr flag
Something is wrong with your setup in `mdadm.conf`. You have two raid devices listed that both are called md0. Furthermore, both raid devices contain `/dev/sdc1`, one with `/dev/sdb1` and the other with `/dev/sdd1`. Which setup do you WISH to have? One or two raid devices?
fm flag
I wish to provide you the correct text content but that is, unfortunately, not possible to do so at this moment. I will as soon as I can edit this post to the text versions though! I wish to have the one with array /dev/sdc1 /dev/sdd1. and not the array with /dev/sdb1. Can I simply comment this line and reboot?
fr flag
Well, at least one of those two lines is causing your problem. I would try to comment the bad one and reboot.
Score:1
fr flag

Something is wrong with your setup in mdadm.conf. You have two raid devices listed that both are called md0. Furthermore, both raid devices contain /dev/sdc1, one together with /dev/sdb1 and the other with /dev/sdd1.

If you only want one RAID device, I suggest you comment the bad line and reboot.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.