lxc-fuse

 

 

 


On Hypervisor

 

yum install fuse         # Centos 7 @base

Verify

lsmod | grep fuse

fuse                  100463  7

ls -l /dev/fuse

crw-rw-rw- 1 root root 10, 229 Dec  3  2020 /dev/fuse

VPS Setting

/path/to/vps/config

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

lxc.autodev 與 lxc.hook.autodev

after any mount hooks have run, but before the pivot_root, if lxc.autodev == 1

The purpose of this hook is to assist in populating the /dev directory of the container

when using the autodev option for systemd based containers.

 


On VPS

 

yum install bindfs          # Centos 7 EPEL

ls -l /dev/fuse

crw-rw-rw- 1 root root 10, 229 Aug 31 13:13 /dev/fuse

crontab -e

# auto bind mount
@reboot /usr/bin/bindfs /root/tmp /home/root-tmp &> /dev/null