Ok here's the rundown:
the media server is running manjaro [arch]
want to mount a NFS/CIFS [honestly dont care at this point] share from my NAS
using fstab to mount attempts to mount prior to network being available, thus this fails
- 192.168.1.1:/storage /mnt/storage nfs4 users,auto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,hard,intr,noatime 0 0
and this also fails in the same manner for the same reason
- 192.168.1.1:/storage /mnt/storage nfs4 rsize=8192,wsize=8192,timeo=14,_netdev 0 0
i then tried to use noauto, then the mount is not available to the other services that load in systemd [plex, tranmission...etc] until someone accesses the mount or runs mount -a and it mounts no problem
- 192.168.1.1:/storage /mnt/storage nfs4 users,noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,hard,intr,noatime 0 0
....however i do not get an error when using the above command [obviously since it's not mounted]
so i was able to find a script that uses the method above [noauto] method, then after the network is setup it triggers the following script, but not before the other systemd services try and access it. Meaning the mount is not mounted yet when transmissions, plex...etc attempt to access it, but is started within seconds after:
Create a file in /etc/NetworkManager/dispatcher.d/nfs.sh
/bin/sh
if [ "$2" = "up" ]
then
mount "/mnt/storage"
elif [ "$2" = "down" ]
then
umount "/mnt/storage"
fi
####### end script
make the file executable, now the mount is mounted when i log in, however it's NOT available when the transmissions service starts, thus this fails still.
I'M STUMPED, and defeated. i just want the following to happen
- boot
- setup network
- ensure network is up
- mount nfs mount
- start tranmission, plex...etc
the only other thing i can think of is do is not let systemd start and stop the services on boot. then i could create a script that does the following but i dont even know where to start with that...
- mount -t nfs4 192.168.1.1:/storage /mnt/storage.....blah blah
- systemctl start transmission
- systemctl start plexmediaserver
- ...etc...etc..
thoughts!!! i'm pulling my hair out
[link][2 comments]