I have created a container say base and I am trying to create a clone of the base container with backing store as overlayfs. But it always fails with the following error,
lxc_container: bdev.c: overlayfs_mount: 2237 No such device - overlayfs: error mounting /var/lib/lxc/base/rootfs onto /usr/lib64/lxc/rootfs options upperdir=/var/lib/lxc/s0/delta0,lowerdir=/var/lib/lxc/base/rootfs,workdir=/var/lib/lxc/s0/olwork
Any way to resolve this issue?
Best How To :
It sounds as if they
overlay filesystem is not available in your kernel. First, check if it is listed in
# grep overlay /proc/filesystems
If it's not there, it may be available as a loadable kernel module. You can load it using
# modprobe overlay
If this resolves your issue, you'll want to configure your system to automatically load this module when it boots. On a systemd-based system, you can create
/etc/modules-load.d/overlay.conf with the content:
And you're done. For non-systemd based distributions, consult the appropriate documentation.
The name of the
overlay filesystem changed from
overlay at some point. Support for this was added in commit 38b3491, which was made after the release of lxc 1.0.7. It looks like this change should be available in LXC releases 1.1.1 and later.
lxc package on CentOS comes from the EPEL repository. You should probably open a bug report against the package (here) reporting the problem; it should be reasonably easy for the package maintainer to fix this for EPEL7.