I've been setting up Proxmox VE (thanks for such a great tool!) on my home server and have hit a wall with some resource sharing/mounting. I tried searching around and did not find anything really addressing this issue. That makes me somewhat worried I am going about this the wrong way, but all advice is appreciated!
What I want to do is have my media container (ubuntu 22.04 LXC running Jellyfin) access media on my NAS storage (shared via an SMB share from a VM running TrueNAS Scale on the same machine).
As far as I understand it, I need to mount the SMB share on the host (ie. Proxmox) and then provide that as a mount point to the Jellyfin LXC. I can do this running console commands on the host once everything is up and then manually starting the Jellyfin LXC, but I would like to have all this mounted up automatically whenever the box gets rebooted. This is just on a home server and at present I'm rebooting it semi-regularly as I fiddle around with things.
I tried putting an entry in
I then tried a hookscript. The example hookscript has a "post-start" section that seemed appropriate for this. I added a system call to run a mount console command once in the post-start phase but this also failed. The command works if I simply run it on the console of the host. The error message given was
I then tried adding a sleep of 10 seconds in the hookscript in an attempt to let the VM start the SMB server (assuming that is the problem) but this did not resolve the issue. Similarly, a sleep of 30 seconds did not resolve the issue. DMESG reports:
Any help or ideas of how I can automate the mounting of an SMB share once the TrueNAS VM and SMB server has come online would be greatly appreciated! Or perhaps I'm asking the wrong questions and going about this entirely the wrong way. Any advice is appreciated!
Thanks!
What I want to do is have my media container (ubuntu 22.04 LXC running Jellyfin) access media on my NAS storage (shared via an SMB share from a VM running TrueNAS Scale on the same machine).
As far as I understand it, I need to mount the SMB share on the host (ie. Proxmox) and then provide that as a mount point to the Jellyfin LXC. I can do this running console commands on the host once everything is up and then manually starting the Jellyfin LXC, but I would like to have all this mounted up automatically whenever the box gets rebooted. This is just on a home server and at present I'm rebooting it semi-regularly as I fiddle around with things.
I tried putting an entry in
/etc/fstab
and that worked if I tried mounting everything (via mount -a
or similar once the machine we up. However, this fails at boot. This made sense after I saw the error as the TrueNAS VM - and the SMB server running on it - would not have been running when the machine was first booting.I then tried a hookscript. The example hookscript has a "post-start" section that seemed appropriate for this. I added a system call to run a mount console command once in the post-start phase but this also failed. The command works if I simply run it on the console of the host. The error message given was
mount error(11): Resource temporarily unavailable
. I _think_ this is because the SMB server had not had time to start even though the VM had started and reached the "post-start" phase, but I am not sure.I then tried adding a sleep of 10 seconds in the hookscript in an attempt to let the VM start the SMB server (assuming that is the problem) but this did not resolve the issue. Similarly, a sleep of 30 seconds did not resolve the issue. DMESG reports:
[17099.139705] CIFS: Attempting to mount \\<server IP>\data-share
[17100.959676] CIFS: VFS: \\<server IP> Send error in SessSetup = -11
[17100.959694] CIFS: VFS: cifs_mount failed w/return code = -11
Any help or ideas of how I can automate the mounting of an SMB share once the TrueNAS VM and SMB server has come online would be greatly appreciated! Or perhaps I'm asking the wrong questions and going about this entirely the wrong way. Any advice is appreciated!
Thanks!