khenriks/mp3fs

Failed mount breaks boot process

Closed this issue · 5 comments

I am not sure if this is the right way to discuss this. Today I had a problem that my boot was broken because the HDD mount that my mp3fs mount was referring to was not coming up fast enough.

The mp3fs mount appears in systemctl list-units.

I can put After=CERTAIN.MOUNT into the systemd unit file for any normal mount or any other service. Should it also be possible with mp3fs? When I try to edit the file I get


pi@raspberrypi:~ $ sudo systemctl edit --full mnt-hdd-mp3fs.mount
No files found for mnt-hdd-mp3fs.mount.
Run 'systemctl edit --force --full mnt-hdd-mp3fs-mp3fsx2dneuex2dmusik.mount' to create a new unit.

Will editing with --force-- create a file that will get used upon mount of mp3fs?

EDIT: I posted a related question here: https://unix.stackexchange.com/questions/634829/should-editing-fstab-change-systemd-mountpoint-service-file?noredirect=1#comment1189255_634829

It sounds like this might be specific to your setup. How did you configure the mp3fs mount initially?

I have two external HDD connected via USB. The FLAC are on the "mybook" and the mp3fs is on the "hdd". I do this because I backup mybook with Snapraid. I think when trying to mount mp3fs with fstab the "mybook" is not mounted yet.

pi@raspberrypi:~ $ cat /etc/fstab
proc            /proc           proc    defaults          0       0
PARTUUID=6c586e13-01  /boot           vfat    defaults          0       2
PARTUUID=6c586e13-02  /               ext4    defaults,noatime  0       1

UUID=a115a456-1fb7-4ae1-9bfd-504d47d1f780 	/mnt/hdd 		ext4 	rw,auto,defaults,nofail,x-systemd.device-timeout=15 0 2
UUID=e3f9d42a-9703-4e47-9185-33be24b81c46 	/mnt/mybook 	ext4 	rw,auto,defaults,nofail,x-systemd.device-timeout=15 0 2
UUID="2020-2020" 							/mnt/usbstick 	exfat 	uft8,noatime,nofail,uid=pi,gid=pi 0

#timeout problem, boot fails if not commented out: 

#mp3fs#/mnt/mybook/test/NEUE-MUSIK-FLAC /mnt/hdd/mp3fs/mp3fs-neue-musik fuse allow_other,ro,bitrate=192 0 0
#mp3fs#/mnt/mybook/test/NEUE-MUSIK-FLAC /mnt/hdd/mp3fs/mp3fs128-neue-musik fuse allow_other,ro,bitrate=128 0 0

Mount works fine after everything is booted up and I start it with this script:


pi@raspberrypi:~ $ cat mountmp3.sh 
#!/bin/bash
sudo mp3fs -b 192 /mnt/mybook/test/NEUE-MUSIK-FLAC 	/mnt/hdd/mp3fs/mp3fs-neue-musik 		-o allow_other,ro
sudo mp3fs -b 128 /mnt/mybook/test/NEUE-MUSIK-FLAC 	/mnt/hdd/mp3fs/mp3fs128-neue-musik 		-o allow_other,ro

You might be able to use the x-systemd.requires-mounts-for= mount option with the mp3fs mounts to make this work. For example, you would use x-systemd.requires-mounts-for=/mnt/hdd.

Using x-systemd.requires-mounts-for= works well! suggest you put this hint in your mp3fs website as it is very handy! Thank you very much!

Ok, I've added this info to the readme.