define UID and GID in /etc/pve/storage.cfg

jbates58

Member
Feb 17, 2020
11
1
23
35
Hi All,

i am wanting to mount a CIFS share on my PVE that connects to my Truenas server.

I have truenas virtualised on PVE, and need to pass storage that is managed by Truenas to a variety of LXCs on my PVE host.

However, in an effort to make them secure, i have followed this guide and it worked a treat. However, this does not bring the icon into the PVE GUI under the storage section. So i went looking and discovered that the config for these is contained in /etc/pve/storage.cfg.

I looked at the config for it, and am wondering if it is yet possible to define a UID and GID (100000:110000) on this mount point, so that I am not subject to the ID remapping that is done with LXCs. I currently have a entry in CRON that mounts the share 5 min after a reboot (i have my truenas startup delay configured for 5min also to ensure its booted and ready)

Ideally, i would like the information to show up in the sidebar so its easily to get a visual overview of the storage of the share etc..

I did find this thread asking for exactly the same thing, however it is dated back in 2021. For reference, i am using the latest PVE version.

The main reason im after this is that if the share is disconnected for some reason, my understanding is that PVE using the /etc/pve/storage.cfg method will continue to try mounting it rather than my current method which is only fired once after booting PVE

Many thanks.

Jason
 
Hi,
yes, it you click on the bug report of the thread you linked, you'll see that it is fixed. You can specify arbitrary CIFS mount options in the storage configuration via pvesm set <storage ID> --options <options>.

That said, if your intent is just to mount the CIFS share inside the container, the Proxmox VE storage.cfg is not the best place to put it, because the storages defined there are intended for storing Proxmox VE content types, like full guest images/backups/container templates/etc.. If you want to access the already existing filesystem contents on the share, it's better to put it in /etc/fstab or create a systemd mount unit for it and then bind mount it to the container.
 

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!