Need a reliable way to mount

Riddleuk

Member
Jul 9, 2021
35
0
6
46
I do try Google Fu and reading endless posts but I need advice to mount shares from my Nas VM to containers. So basically so Plex can access my movies. Airsonic my music

Now I created a mount on host works fine I can read and write so I created privileged containers and enables cfis on the options but I cannot get the folder to mount. I tried everything. I noticed the fstab inside the container has #unconfirgured inside it so rebooting the container won't mount the drive at start up.

Currently running Plex in a VM and unhappy with the 1.5gb idle useage as it's only for inside the house.

Also if the pve is rebooted the Nas VM is 4th to boot up which means fstab won't load the share as the VM isn't on yet.

So is there an easy way to mount a Nas shared folder to a container but make the pve mount when the Nas / containers boot ?

All the Google Fu is really confusing instructions or contain commands that don't give me uid etc

The shares on Nas are cfis/samba. There is options for NFS etc but I don't know enough to create the mounts so the containers have access to the drives.

Thanks in advance for any help
 
For the problem with the SMB shares mounting on host:
You could create a cron like @reboot sleep 300 && mount -a. That cron will be triggered at boot, waits 300 seconds and will then try to mount all unmounted filesystems defined in fstab. So it basically mount your SMB shares defined in fstab 5 minutes after boot. If you got other VMs/LXCs that rely on SMB/NFS you could tell them to wait for atleast 5 minutes after boot to start. Uder "Option -> Start/Shutdown Order" there is an option "Startup delay".

For the problem with the LXC:
If fstab isn'T working you could try cron again. Use something like @reboot mount -t cifs -o user=myuser,... //192.168.1.1/myshare /mnt/myshare.
 
What OS are you running Plex on?

I have Plex on Debian on one proxmox node, and OMV (NAS) running on another proxmox node.
If I turn off OMV yes plex loses access to the content, but as soon as I turn OMV on again the mounts work.

The only thing I do in plex is turn off auto scanning for changes cause if I leave OMV off for too long plex will think I removed items.
I have plex scan libraries every 12 hours, and my media management tools also cause plex to rescan when new items are added.

If you have plex and your NAS on the same proxmox node, you can adjust the start up order of the VMs in proxmox so that your NAS starts first, then plex starts after.
 
I am using omv as well. It's been pretty good so far.

The delay seams like a good idea. At pve level I have everything wait 120 seconds so they boot in an order.
Pfsence 1st
Pihole 2nd
WordPress 3rd
Omv 4th
Etc etc
So that is likely to be the best way.

How do I get the mounts into the lxc containers ?

Plex uses Ubuntu 20.04.

I tried mounting Inside the containers but no joy. It always says host not available. However the same mounts at the pve shell level work every time and inside VM work every time.

I have tried unprivileged and privileged. Cfis is installed / enabled but I just can't get mounts into the containers.
 
Think I am getting closer but not sure as the container cannot see inside the folder.
I edited the lxc config section and basically added
Lxc.mount.entry
I am guessing it's a permissions thing as my files can't be seen inside the container
 
Oh for God sake

Added line to the container conf

Mp0:share,MP=folder

♂️♂️♂️♂️♂️

Works. Thank for the the suggestions on the timer delays for fstab.

I can't believe it was just that
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!