So I’ve run into a pretty big issue. I moved over from arch to fedora as I liked the idea of having a more stable and reliable system. While on arch I set up a raid array using mdadm and mounted it using fstab. Luckily fedora immediately recognized ithe array when I did the switch and everything seemed fine. The problem I ran into however was after I added it to fstab. Now whenever I boot it puts me into emergency mode, gives me no terminal access as it says root is locked and traps me in a loop of hit enter to continue, which then just prompts the same dialogue again. I’ve made sure I’m using the right UUID and mount point by using the mount -a command to test, and while in the system it worked fine. I know it’s the fstab file because the instant I remove the line everything works again and I’m able to boot into the system.
Now my question is, has anyone here ran into this issue, and if so, how did you manage to solve it?
Here is my fstab file, the forth line is the one I added.
Remove the line so that you can login normal and then you have to set a password for your root account.
If you done so: sudo passwd root
you have a root pw to log in in the emergency mode.
To verify the UUIDs you can use lsblk -f and ensure that your line in question is actually the file system on the raid array. Also as you stated, once the line is entered in /etc/fstab you should ensure that file system is not mounted then use mount -a to ensure it mounts properly before you attempt to reboot.
I am not sure the options you have on that line in fstab are correct. The file system is set to mount at boot, but the ‘user’ option says that the ownership will be given to the user mounting it, which at boot is by default the root user. Maybe adding the option ‘noauto’ to that line would be all that is required.
So after doing sudo passwd root and login in during emergency mode, it would seem the error has to do with a missing dependency, though it is unclear on what dependency I’m missing exactly. Again, like I said above, it mounts while I’m in the system. It is only failing to mount on booting up.
Sorry about the bad images, but this is what I have to work with.
That shows the /dev/md127 array does not properly activate.
What is the output of cat /proc/mdstat?
You said that you are able to mount the device from the command line.
What is the output of lsblk -f
According to the earlier posts you seem to be trying to directly mount the raw raid array with that entry in fstab.
Have you created a partition on that array, formatted the file system within that partition, then tried mounting that partition?
In general, every raid array must be treated exactly like a physical device: → which implies that it normally would be partitioned and formatted with a file system in the partition then that partition be used for the system.
I use raid 5 for my /home.
On that array I used the array as LVM, with the array being the PV, a VG created on the PV, and multiple LVs created within that VG. This separated the actual data from the physical raid array.
Have you regenerated your initramfs since adding the /etc/mdadm.conf file? If not, you may need to do so so that that file will get packaged in the initramfs. Without it, the RAID will not assemble during early boot.
$ sudo dracut -f
You can use lsinitrd to verify that the file is (or isn’t) there.
$ sudo lsinitrd | grep mdadm.conf
Edit: This is just a first-time problem. In the future, when new kernels are installed, they should pick up /etc/mdadm.conf automatically.
/dev/md127 is the partition that is spread across the raid array and is the mount point for said array. I’m not sure how your array was made or works, but mine was made using mdadm and this is how arrays using it are structured.
I just noticed that your screenshot shows that the array is assembled, but it is failing a filesystem check. Does changing the last value on your fstab line to “0” workaround the problem?
setting it to “0” did seem to do the trick, though having it as that isn’t optimal. I would love if this bug got fixed for Fedora as currently the one you linked is for Debian.