Hi there!
I’m running OSMC Alpha 4 on a Raspberry Pi 2. I’ve setup NFS automount with the following line in /etc/fstab
:
wdmycloud.local:/nfs/Media /media/wdmycloud nfs x-systemd.automount,noauto 0 0
I’ve also setup transmission-daemon to download files straight into this NFS share and it works just fine. The problem comes on shutdown or reboot, the system gets stuck for up to 6 minutes looping between the two following messages:
[ ** ] (1 of 2) A stop job is running for Transmission BitTorrent Daemon (30 s / 1min 30s)
[ ** ] (2 of 2) A stop job is running for /media/wdmycloud (31 s / 1min 30s)
It looks like transmission-daemon fails to stop and therefore the NFS share can’t be unmounted. It eventually gets to
[ OK ] Reached target Shutdown
but the system never reboots.
I’ve just reinstalled Alpha 4 from scratch and the only two tweaks I’ve made to the out-of-the-box system are the extra line in /etc/fstab
and running sudo apt-get install transmission-daemon transmission-cli
.
Any idea on how to fix this race condition?
Sorry, no solution but hoping to see one as my shiny new Pi2 is here and I am downloading OSMC while typing.
I intend to install Transmission and Flexget (sheduled to run twice a day via CRON).
I see this is a probable problem and am hoping someone can post a fix for this.
That’s the exact configuration I’m running.
Please share your setup in case you didn’t find the same issue.
I think that wdmycloud could be causing your problem.
So far I have installed and configured transmission, set static IP for Wi-Fi and Ethernet, changed the skin to confluence, a couple of automatic updates plus a few other tweaks. Numerous reboots without any problems whatsoever.
How do you mount your NFS share? Do you mind sharing your fstab config?
I think you should change ‘noauto’ to ‘auto’ and add ‘_netdev’ and ‘bg’ to options.
Also you should try manual stopping. Something like:
sudo /etc/init.d/transmission-daemon stop
sudo umount /media/wdmycloud
See if it works properly
I’m no expert on NFS mounting but I think I’m using the right options, see this: OSMC Alpha 1 is here! - #62 by Pablo
It works fine if I shut everything down manually. That’s why I suspect it’s a race condition.
Sorry you are right, I keep forgetting about systemd
EDIT: but you are not using suggested ‘intr’ option. Try it.
It should drop all requests when the server/network goes down. It is not very suitable for intensive right operations, but it can be workaround for you, at least for now.
EDIT2: I can see your pont though, It looks like connmanager drops network connections before systemd can unmount shares and it should be the other way around .
The reason I’m not using intr
is because it got deprecated on kernels after 2.6.25. See nfs(5) - Linux man page
Ok, you are correct. I guess I am not the only one that is still using it still without knowing it is useless.
I am out of ideas, sorry. Maybe someone with better knowledge of osmc shutdown process will address your problem.