Persistently Use FUSE Inside of LXC Container

rflaherty

Active Member
Jun 18, 2015
13
1
43
I am using a package called s3fs which allows you to mount s3 object storage on a linux machine as a disk.

When trying to mount it, I get the error

fuse: device not found, try 'modprobe fuse' first


After referencing this thread, I was able to figure out that I need to run the following command to make fuse available to containers for my mount command to work properly:


mknod -m 666 /dev/fuse c 10 229

I can then run my s3fs mount command without error. However, all my attempts to make it persistent thus-far have failed. I followed this guide which had me place the following in the /etc/pve/lxc/container.conf file:

lxc.autodev: 1 lxc.hook.autodev: sh -c "mknod -m 0666 ${LXC_ROOTFS_MOUNT}/dev/fuse c 10 229"


However, the container refuses to boot when this is is in the config file, throwing the following error:

__safe_mount_beneath_at: 1106 Function not implemented - Failed to open 51(dev) run_buffer: 314 Script exited with status 2 lxc_setup: 3393 Failed to run autodev hooks do_start: 1218 Failed to setup container "108" __sync_wait: 36 An error occurred in another process (expected sequence number 5) __lxc_start: 1999 Failed to spawn container "108" TASK ERROR: startup for container '108' failed

Does anyone have any idea how to set this up correctly so that this change is persistent and I don't have to run a command manually every time to make it work?
 

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!