Raspberry PI hangs after reboot

I am on my 10th reimage thinking it is a issue with my setup. I have set everything up create a mdadm raid 5 with all four of my hard drives. I let it build and then will reboot. When I reboot the device it hangs because md0 which is the mdadm array isn’t available. I gain root access and none of the drives are showing and the oled is blank. I don’t want to run omv as I have other plans for this little nas.

Anyone have any ideas?

So I decided to skip figuring out why the drives weren’t mounting during boot. I edited my fstab to remove my md0 arrary.

I then created this script in the user folder, modified the rc/local to run it and the system seems to boot and work as expected.

#!/bin/bash

sudo mdadm -a /dev/md0
sudo mount /dev/md0 /mnt/storage

To anyone that might see this I used this link to discover the fix.

I am marking this as a solution for now.

Thank you for sharing.

Hi,

I had the same bad experience as you did, I didn’t understand how OMV can mount the drivers on boot (fstab).
I already checked and the fstab file wasn’t modified by OMV after the boot or during the boot process.

When I try to insert the lines myself in fstab the system stucks at boot.

------ my fstab entry after install OMV ------

>>> [openmediavault]

/dev/disk/by-id/md-name-raspberry-pi:0 /srv/dev-disk-by-id-md-name-raspberry-pi-0 ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
/dev/disk/by-id/dm-name-vg0-data /srv/dev-disk-by-id-dm-name-vg0-data ext4 defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2

<<< [openmediavault]

Yeah to me it sounds like the OS load something after fstab but how omv is able to boot it makes no sense. My solution works for me for now. It’s stable and I don’t plan to reboot often.

The only other thing I can think of is the image. I need to look but I’m pretty sure I am running the latest and greatest as of the 8th.

1 Like

@mediacowboy you will find the issue is fixed until you “shutdown” as it will do the same but in reverse. the drives will go offline when the service is stopped, before mdadm tries to unmount them and they will be listed as failed and removed from the raid.

Dave

Did not think of that. What is a better fix?

i am not good at linux i have put my server on hold until they have a fix. i do not want to use 4 seperate drives, not to mention i have not tried this and it may give the same errors

Dave

@Mediacowboy i think i have mine working using the unionfs plug in in omv

configure everything including omv
install the unionfs plug in
configure your drives, create a filesystem on each drive and mount them
in the unionfs tab create and add the drives you want to use as a pool
setup your share(s)

dont shutdown until you move the mount commnds from fstab

i moved them, had to re order the commands to fit the cli syntax

i added the following to the /etc/fc.local file above the part where it prints your i.p.

sudo mount -o defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl /dev/disk/by-label/disk1 /srv/dev-disk-by-label-disk1

sudo mount -o defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl /dev/disk/by-label/disk2 /srv/dev-disk-by-label-disk2

sudo mount -o defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl /dev/disk/by-label/disk3 /srv/dev-disk-by-label-disk3

sudo mount -o defaults,nofail,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl /dev/disk/by-label/disk4 /srv/dev-disk-by-label-disk4

sudo mergerfs -o defaults,allow_other,cache.files=off,use_ino,category.create=eprand,minfreespace=4G,fsname=ufs:365821fb-30db-4a59-945a-55bfb60a5616 /srv/dev-disk-by-label-disk1:/srv/dev-disk-by-label-disk2:/srv/dev-disk-by-label-disk3:/srv/dev-disk-by-label-disk4 /srv/365821fb-30db-4a59-945a-55bfb60a5616

save and reboot

looks like the drives are unmounted correctly on shutdown also.

i have shutdown and rebooted a few times and it seems to be working

your setup may be different but use the fstab entries as a guide

Dave

1 Like