[TESTING] Debian Stretch upgrade for OSMC

If you are just relying on udisks to mount your disks then nfs server will not wait for this to happen. Waiting on the udisks service will not help you because the service having started does not mean the disk is mounted yet.

This has always been the case that it can’t be relied upon but the timing of the startup of nfserver may have changed in stretch.

You probably have two options:

  1. Mount your drive in fstab to ensure that it is mounted before nfs-server - mounting it here will give it dependencies that will force nfs server to wait. For example on my system I have:

UUID=09bf0117-fb6e-4fe9-8dcb-7c99f30bd8fd /mnt/USBMEDIA ext4 defaults,noatime,auto,nofail,x-systemd.mount-timeout=60 0 0

for my USB media drive which is also shared by nfs server. nofail ensures that if the drive is not connected that after a 90 timeout and error the system will continue to boot rather than drop to a systemd emergency shell.

  1. Make /media your nfs server export rather than a specific subdirectory below it. /media always exists so nfs server should be happy to start, as soon as a directory appears below it after automounting the clients will see it. This will only work if you are happy for all automounted drives to be shared with the same nfs permissions of course. If not, use individual fstab mounts as above under /mnt and individual exports.
2 Likes