Hi, this is my first proper Linux install, so I don't really know my way around the OS yet. Apologies in advance
I want to automatically mount two NFS volumes which reside on a different machine at boot, that contain persistent volumes for some of my docker containers. I've followed some guides I found online, and added the remote NFS directory to the /etc/fstab file, currently looking like this (I played around with the options trying to get it to work, mostly relying on https://help.ubuntu.com/community/Fstab#Options and a few forum posts):However, I cannot seem to get the directories to automatically mount at startup. I can only mount them manually after the fact, e.g. with ```mount -a```. I've looked at several help requests / forum posts online, however most seem to have been caused by different issues (e.g. incorrect fstab entries). A few mention to check startup logs or similar logs to get to the root cause - however, most of these were Linux distributions other than Debian (and log directories seem to be one of the things which differ a lot between distros?).
One of the solutions mentioned often is to use autofs instead of specifying as fstab entries. I couldn't really discern whether that still holds up today: I try to stick to minimal solutions to avoid unnecessary complexity. I'd rather use the OS's features than installing an extra package; moreover, autofs seems to be built for a different use case - all I need is static volume mounts.
Desperate for a solution, I tried to execute a shell script at bootup to run ```mount -a```, but this didn't work either. I didn't investigate properly, and I'm not sure what permissions scripts executed by update-rc.d run with, maybe this was an issue... a lot of forum entries however speculated that network components not yet being available might be the cause for NFS volumes in fstab not mounting, which would then be true for the script as well?
Can anyone point me in the right direction regarding log files or other avenues I could investigate to resolve my issue? I'm desperate to get this working by now. For context, I'm running Debian bookworm in a minimal install.
I want to automatically mount two NFS volumes which reside on a different machine at boot, that contain persistent volumes for some of my docker containers. I've followed some guides I found online, and added the remote NFS directory to the /etc/fstab file, currently looking like this (I played around with the options trying to get it to work, mostly relying on https://help.ubuntu.com/community/Fstab#Options and a few forum posts):
Code:
# external storage directory mount10.8.0.15:/volume/storage/home/docker/mount/storagenfsauto,rw,noexec,user,_netdev00
One of the solutions mentioned often is to use autofs instead of specifying as fstab entries. I couldn't really discern whether that still holds up today: I try to stick to minimal solutions to avoid unnecessary complexity. I'd rather use the OS's features than installing an extra package; moreover, autofs seems to be built for a different use case - all I need is static volume mounts.
Desperate for a solution, I tried to execute a shell script at bootup to run ```mount -a```, but this didn't work either. I didn't investigate properly, and I'm not sure what permissions scripts executed by update-rc.d run with, maybe this was an issue... a lot of forum entries however speculated that network components not yet being available might be the cause for NFS volumes in fstab not mounting, which would then be true for the script as well?
Can anyone point me in the right direction regarding log files or other avenues I could investigate to resolve my issue? I'm desperate to get this working by now. For context, I'm running Debian bookworm in a minimal install.
Statistics: Posted by alvitali — 2024-04-05 02:45 — Replies 4 — Views 86