LXC SMB share doesn't automount

unf0rg0tt3n

Well-Known Member
Sep 28, 2016
42
0
46
31
Netherlands
Hi All,

I can't figure out how to get my SMB share automount with the fstab inside of LXC.
I have several LXC running with automount shares, but I can't get one specific LXC (new) to automount.
Tried:
/share /folder cifs _netdev,x-systemd.automount,credentials=/root/.creds,uid=www-data,gid=www-data,iocharset=utf8 0 0

Also tried:
To test the automount, unmount your share if it's currently mounted:
> $ sudo umount /mnt/storage

And then restart the remote-fs systemd unit:
> $ sudo systemctl daemon-reload
> $ sudo systemctl restart remote-fs.target

But it simply wont work.
When I punch in mount -a everything works fine. Anyone a idea?
Because the whole point of /etc/fstab is the automatic mount at boot right?

Thanks,
Dennis
 
You have to configure the lxc accordingly in the cfg file

Code:
features: mount=cifs
 

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!