Skip to content

gmoniker/lxcfs

This branch is 1022 commits behind lxc/lxcfs:main.

Folders and files

NameName
Last commit message
Last commit date
Jan 20, 2015
Jan 1, 2016
Dec 3, 2015
Oct 28, 2015
Nov 19, 2015
Dec 12, 2014
Dec 12, 2014
Dec 12, 2014
Dec 12, 2014
Nov 17, 2015
Dec 12, 2014
Dec 12, 2014
Jan 1, 2016
Jan 20, 2015
Nov 20, 2015
Nov 11, 2015
Nov 25, 2015
Apr 30, 2015
Dec 17, 2015
Dec 12, 2014

Repository files navigation

lxcfs

Introduction

FUSE filesystem for LXC, offering the following features:

  • a cgroupfs compatible view for unprivileged containers
  • a set of cgroup-aware files:
    • cpuinfo
    • meminfo
    • stat
    • uptime

In other words, it will provide an emulated /proc and /sys/fs/cgroup folder for the containers.

Usage

The recommended command to run lxcfs is:

sudo mkdir -p /var/lib/lxcfs
sudo lxcfs -s -f -o allow_other /var/lib/lxcfs
  • -s is required to turn off multi-threading as libnih-dbus isn't thread safe.
  • -f is to keep lxcfs running in the foreground
  • -o allow_other is required to have non-root user be able to access the filesystem
  • -d can also be passed in order to debug lxcfs

In order to use lxcfs with systemd-based containers, you can either use LXC 1.1 in which case it should work automatically, or otherwise, copy the lxc.mount.hook and lxc.reboot.hook files (once built) from this tree to /usr/share/lxcfs, make sure it is executable, then add the following lines to your container configuration:

lxc.mount.auto = cgroup:mixed
lxc.autodev = 1
lxc.kmsg = 0
lxc.include = /usr/share/lxc/config/common.conf.d/00-lxcfs.conf

About

FUSE filesystem for LXC

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 91.4%
  • Shell 8.6%