[SOLVED] autofs4 module in LXC

Mar 6, 2024
12
0
1
Hello,

I am wanting to use the autofs package in an LXC but the autofs4 module is not available, even though it is on the PVE host itself.
See the attached screenshot, left is PVE and to the right is the LXC.

I am on the latest proxmox verison and the LXC is Ubuntu 22.04 LTS.

Any ideas?

1710717998629.png
 
Last edited:
Hello,
Your Proxmox server is a Debian 12 system, and your LXC container is an Ubuntu 22.04.
You won't find the same packages preinstalled in two different distros.

In your Ubuntu container, try :
# apt search autofs
... and with the package name you get, do apt install it.

Kind regards,


GD
 
Hello,

I have installed autofs on the LXC but this does not provide me with the autofs4 kernel module.

It is also not possible (I think) to manually obtain this module file and load it in because LXC share's the host kernel.

Package installed already:

Code:
autofs/jammy-updates,now 5.1.8-1ubuntu1.3 amd64 [installed]
  kernel-based automounter for Linux

I transferred autofs4.ko to the LXC and tried to load it but that doesn't work as I thought.

1710759551003.png
 
Last edited:
To be able to use autofs, you need to configure it within the host system, including defining its mapping, FSs and shares. Only then will you be able to use these as directories within the LXC, which will then automount as required. Don't see it working unprivileged - but I may be wrong.
 
To be able to use autofs, you need to configure it within the host system, including defining its mapping, FSs and shares. Only then will you be able to use these as directories within the LXC, which will then automount as required. Don't see it working unprivileged - but I may be wrong.

Thanks for that but you're right, it does not work in unprivileged.
I worked around this by mapping the mounted folder directly to the LXC:

mp0: /mnt/shared/10.0.3.2/sharedstorage,mp=/mnt/10.0.3.2/sharedstorage
 
Last edited:

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!