You are not logged in.

#1 2015-08-16 20:17:28

Grillspett
Member
Registered: 2015-08-16
Posts: 2

[Solved][rar2fs] Problem mounting rar2fs (fuse) with systemd service.

Hi,

I have a server that runs Plex (in a docker container) among other things. As Plex doesn't support playing rar-files and a big chunk of my media library is rar i have resorted to using rar2fs which works like a charm when mounted manually.

However when i mount the volume with rar2fs to /mnt/rar2fs through a service it doesn't work. The problem is that when i run the service with systemctl the mount looks like this:

root@arch:/usr/lib/systemd/system# ls -la /mnt/
ls: cannot access /mnt/rar2fs: Transport endpoint is not connected
total 32
drwxr-xr-x  6 root        root  4096 Aug  7 03:12 .
drwxr-xr-x 18 root        root  4096 Jun 27 15:54 ..
drwxrwx--x  1 root        root  154  Aug 16 17:13 raid0
d?????????  ? ?           ?        ?       ?      rar2fs

The scripts only runs this:

exec rar2fs /mnt/raid0 /mnt/rar2fs
docker start plex

Plex starts like it should but the mount is broken. The script itself works as well when executed from the command line.

Also this is how the service file looks:

[Unit]
Description=Mounts the rar2fs volume and starts the Plex media server docker image.

[Service]
Type=idle
ExecStart=/usr/lib/systemd/scripts/start-plex

[Install]
WantedBy=multi-user.target

Anyone have an idea? I have been using Linux for many years but I'm quite new to systemd.

Last edited by Grillspett (2015-08-17 07:39:15)

Offline

#2 2015-08-16 21:38:43

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [Solved][rar2fs] Problem mounting rar2fs (fuse) with systemd service.

'Transport endpoint is not connected' usually happens when there are problems with fuse daemon process. Make sure that rar2fs process that handles fuse requests is still running. Does 'rar2fs' have some kind of debug option to tell what it is doing?

Also fuse filesystems tend to start a daemon and then exit. I wonder if systemd sees main thread exited so it kill all its children. Does rar2fs have some kind of 'foreground' flag. Try that one as well. Or 'Type=Forking' in systemd service file.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#3 2015-08-16 21:59:10

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [Solved][rar2fs] Problem mounting rar2fs (fuse) with systemd service.

I suggest you try to create a systemd mount unit or add it to your fstab. rar2fs comes with a mount helper, so it should be possible (/usr/bin/mount.rar2fs)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#4 2015-08-17 07:37:54

Grillspett
Member
Registered: 2015-08-16
Posts: 2

Re: [Solved][rar2fs] Problem mounting rar2fs (fuse) with systemd service.

Thanks for the advice. I'll just add it to /etc/fstab for now.

Last edited by Grillspett (2015-08-17 07:39:34)

Offline

Board footer

Powered by FluxBB