First post here, so please go easy on me! I've been using proxmox for less than a week! But I have been using linux for many years, so I have that going for me.
I have a Ubuntu container for Plex. My media files are stored on my Synology NAS. I have a systemd script set up to start the mount after reboots, but it almost never starts. I think it has worked once or twice, but I could be mistaken because I've been doing a lot of work with it. Anyway, after rebooting, the NAS files have not been mounted. I can verify with systemctl status. But if I manually run systemctl start a few minutes after booting, the mount is set up as expected. It looks like the container thinks the network is unreachable???
Is there anything I can do to make this work as expected after reboots? Honestly, I'd be OK with perhaps having it run a minute or two after booting with a cron job, but that seems like a kludge to me.
I have a Ubuntu container for Plex. My media files are stored on my Synology NAS. I have a systemd script set up to start the mount after reboots, but it almost never starts. I think it has worked once or twice, but I could be mistaken because I've been doing a lot of work with it. Anyway, after rebooting, the NAS files have not been mounted. I can verify with systemctl status. But if I manually run systemctl start a few minutes after booting, the mount is set up as expected. It looks like the container thinks the network is unreachable???
Code:
root@plex:~# systemctl status mnt-plex.mount
x mnt-plex.mount - Plex Media Server files
Loaded: loaded (/etc/systemd/system/mnt-plex.mount; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2024-01-07 14:50:52 EST; 8min ago
Where: /mnt/plex
What: //192.168.0.2/data
CPU: 1ms
Jan 07 14:50:52 plex systemd[1]: Mounting Plex Media Server files...
Jan 07 14:50:52 plex mount[112]: mount error(101): Network is unreachable
Jan 07 14:50:52 plex mount[112]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Jan 07 14:50:52 plex systemd[1]: mnt-plex.mount: Mount process exited, code=exited, status=32/n/a
Jan 07 14:50:52 plex systemd[1]: mnt-plex.mount: Failed with result 'exit-code'.
Jan 07 14:50:52 plex systemd[1]: Failed to mount Plex Media Server files.
root@plex:~# systemctl start mnt-plex.mount
root@plex:~# ls /mnt/plex/
'#recycle' cache downloads media
root@plex:~# cat /etc/systemd/system/mnt-plex.mount
[Unit]
Description=Plex Media Server files
Requires=network-online.target
After=network-online.service
[Mount]
What=//192.168.0.2/data
Where=/mnt/plex
Options=credentials=/root/.cifs_credentials,uid=999,gid=999
Type=cifs
[Install]
WantedBy=multi-user.target
root@plex:~#
Is there anything I can do to make this work as expected after reboots? Honestly, I'd be OK with perhaps having it run a minute or two after booting with a cron job, but that seems like a kludge to me.