i figured it out, i think.
i keep getting emergency mode, or missing raid etc.
the issue is that the drives are not seen until the fan,led service is loaded
the drives are trying to be mounted at boot and are not seen so it goes into emergency mode
i just setup omv with unionfs and the same thing.
i found this when i restarted the service to change the temp and flip the display
the hdds dropped out and gave errors.
reboot is not an issue, its when you shut down and power back up. always emergency mode and missing drives.
first attempt was mdadm raid lvl 5 with 4 drives. everything went fine until i shutdown to put the top case back on. the service was stopped before the raid was unmounted and the drives were listed as failed and removed.
gave up on raid 5 mdadm and i setup unionfs.
same thing. everything was great until i shutdown.
at reboot. the drives were not seen when trying to mount as the service for the lcd was not loaded yet. emergency modeā¦
i had it fixed by mounting the drives after boot using the fix posted here with fc.local and a mount.sh file. but that doesnt fix the shutdown issue. as the service is stopped before the drives are unmounted.
I had this same problem. The issue is the rockpi-sata.service must be running before you can mount the RAID. I couldnāt figure out how to accomplish this while still using fstab to mount the drive, but Iāve figured out how to mount the raid using systemd instead. systemd allows you to configure dependencies and boot orders. Here is an article that helped me figure it out Mounting Linux Volumes with systemd vs fstab. and here is my nas.mount file:
i used ext2fsd to mount my root file system on the sd card from windows and commented out the mount commands in fstab, i then boot normally and move the mount commands to fc.local so they run after the hat service starts
I shutdown the pi and after reboot the file system was automounted in OMV (this is what I was expecting) but the Raid started syncing again starting from 0.0%. I donāt know what caused this.
I didnāt use the other solution with unionfs and rc.local file.
Ok after some reading I found out that the configuration fileās name must have the mount pointās name. This is my configuration that works fine and loaded by the system properly:
If your mount point is /home/nas then the configuration file name should be home-nas.mount
Beware of cases like mine that the mount point has ā-ā characters. Then these characters should be as \x2d in the filename.
So for my mounting point /srv/dev-disk-by-label-storage the filename is srv-dev\x2ddisk\x2dby\x2dlabel\x2dstorage.mount
After you need to run:
systemctl start status and enable for the mount file. For cases like mine with - in filename you call the filname within single quotes. example:
systemctl start āsrv-dev\x2ddisk\x2dby\x2dlabel\x2dstorage.mountā
systemctl status āsrv-dev\x2ddisk\x2dby\x2dlabel\x2dstorage.mountā
systemctl enable āsrv-dev\x2ddisk\x2dby\x2dlabel\x2dstorage.mountā
Thx for this tip, works like a charm. Only thing Iām wondering now: does it properly unmount when you stop the rock-pi service? Or does it still just āpull the plugā from the disks?
Also may I suggest a:
sudo systemctl daemon-reload
after adding/editing the .mount files
EDIT: It seems the disks get unmounted when stopping the rock-pi service. But donāt remount automatically when restarting service. So⦠need to look into systemd kind of āpostā start if something like that would exist.