[lxc-users] [debian/stretch64] lxc-copy: Snapshot with OverlayFS backingstorage fails

Sedat Dilek sedat.dilek at gmail.com
Tue Oct 24 16:57:00 UTC 2017


Hi,

I am using Debian/stretch AMD64 and trying to do a snapshot with lxc-copy.

root# lxc-copy --version
2.0.7

root# lsmod | grep overlay
overlay                49152  0

root# lxc-create -n stretch64 -t download -B overlayfs

My generated LXC config file is listed below.

root# lxc-copy -n stretch64 -N snapshot -B overlayfs -s
--logfile=lxc-copy-log.txt --logpriority=DEBUG
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/full"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/tty4"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/zero"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/tty"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/urandom"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/random"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/null"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/tty2"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/tty3"
file has vanished: "/var/lib/lxc/snapshot/rootfs/dev/tty1"
rsync warning: some files vanished before they could be transferred
(code 24) at main.c(1196) [sender=3.1.2]
lxc-copy: bdev/lxcoverlay.c: ovl_rsync: 717 rsyncing
/var/lib/lxc/stretch64/rootfs to /var/lib/lxc/snapshot/rootfs
lxc-copy: bdev/lxcoverlay.c: ovl_do_rsync: 757 copying overlayfs delta
lxc-copy: bdev/bdev.c: bdev_copy: 388 failed getting pathnames for
cloned storage:
overlayfs:/var/lib/lxc/stretch64/rootfs:/var/lib/lxc/stretch64/delta0
lxc-copy: lxccontainer.c: copy_storage: 2867 Error copying storage.
clone failed

root# cat lxc-copy-log.txt
       lxc-copy 20171024164430.373 WARN     lxc_confile -
confile.c:config_pivotdir:1910 - lxc.pivotdir is ignored.  It will
soon become an error.
       lxc-copy 20171024164430.376 WARN     lxc_confile -
confile.c:config_pivotdir:1910 - lxc.pivotdir is ignored.  It will
soon become an error.
       lxc-copy 20171024164430.383 INFO     lxcoverlay -
bdev/lxcoverlay.c:ovl_mount:436 - Overlayfs: Mounted
/var/lib/lxc/stretch64/rootfs onto /var/lib/lxc/stretch64/rootfs with
options upperdir=/var/lib/lxc/stretch64/delta0,lowerdir=/var/lib/lxc/stretch64/rootfs,workdir=/var/lib/lxc/stretch64/olwork.
       lxc-copy 20171024164430.385 INFO     lxcoverlay -
bdev/lxcoverlay.c:ovl_mount:436 - Overlayfs: Mounted
/var/lib/lxc/stretch64/rootfs onto /var/lib/lxc/snapshot/rootfs with
options upperdir=/var/lib/lxc/snapshot/delta0,lowerdir=/var/lib/lxc/stretch64/rootfs,workdir=/var/lib/lxc/snapshot/olwork.
       lxc-copy 20171024164430.335 ERROR    lxcoverlay -
bdev/lxcoverlay.c:ovl_rsync:717 - rsyncing
/var/lib/lxc/stretch64/rootfs to /var/lib/lxc/snapshot/rootfs
       lxc-copy 20171024164430.335 ERROR    lxcoverlay -
bdev/lxcoverlay.c:ovl_do_rsync:757 - copying overlayfs delta
       lxc-copy 20171024164430.335 ERROR    bdev -
bdev/bdev.c:bdev_copy:388 - failed getting pathnames for cloned
storage: overlayfs:/var/lib/lxc/stretch64/rootfs:/var/lib/lxc/stretch64/delta0
       lxc-copy 20171024164430.335 ERROR    lxc_container -
lxccontainer.c:copy_storage:2867 - Error copying storage.
       lxc-copy 20171024164430.336 INFO     lxc_container -
lxccontainer.c:container_destroy:2414 - Destroyed directory for
snapshot

Is that a known issue for Debian?

Is there an alternative way of doing a snapshot in my scenario?

Do you need further informations?

Thanks in advance.

Regards,
- Sedat -

P.S.: LXC config of stretch attached

[ /var/lib/lxc/stretch64/config ]

# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# Template script checksum (SHA-1): 740c51206e35463362b735e68b867876048a8baf
# For additional config options, please look at lxc.container.conf(5)

# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)


# Distribution configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.arch = x86_64

# Container specific configuration
lxc.rootfs = overlayfs:/var/lib/lxc/stretch64/rootfs:/var/lib/lxc/stretch64/delta0
lxc.rootfs.backend = overlayfs
lxc.utsname = stretch64

# Network configuration
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:f2:04:b6

- EOT -
-------------- next part --------------
       lxc-copy 20171024164430.373 WARN     lxc_confile - confile.c:config_pivotdir:1910 - lxc.pivotdir is ignored.  It will soon become an error.
       lxc-copy 20171024164430.376 WARN     lxc_confile - confile.c:config_pivotdir:1910 - lxc.pivotdir is ignored.  It will soon become an error.
       lxc-copy 20171024164430.383 INFO     lxcoverlay - bdev/lxcoverlay.c:ovl_mount:436 - Overlayfs: Mounted /var/lib/lxc/stretch64/rootfs onto /var/lib/lxc/stretch64/rootfs with options upperdir=/var/lib/lxc/stretch64/delta0,lowerdir=/var/lib/lxc/stretch64/rootfs,workdir=/var/lib/lxc/stretch64/olwork.
       lxc-copy 20171024164430.385 INFO     lxcoverlay - bdev/lxcoverlay.c:ovl_mount:436 - Overlayfs: Mounted /var/lib/lxc/stretch64/rootfs onto /var/lib/lxc/snapshot/rootfs with options upperdir=/var/lib/lxc/snapshot/delta0,lowerdir=/var/lib/lxc/stretch64/rootfs,workdir=/var/lib/lxc/snapshot/olwork.
       lxc-copy 20171024164430.335 ERROR    lxcoverlay - bdev/lxcoverlay.c:ovl_rsync:717 - rsyncing /var/lib/lxc/stretch64/rootfs to /var/lib/lxc/snapshot/rootfs
       lxc-copy 20171024164430.335 ERROR    lxcoverlay - bdev/lxcoverlay.c:ovl_do_rsync:757 - copying overlayfs delta
       lxc-copy 20171024164430.335 ERROR    bdev - bdev/bdev.c:bdev_copy:388 - failed getting pathnames for cloned storage: overlayfs:/var/lib/lxc/stretch64/rootfs:/var/lib/lxc/stretch64/delta0
       lxc-copy 20171024164430.335 ERROR    lxc_container - lxccontainer.c:copy_storage:2867 - Error copying storage.
       lxc-copy 20171024164430.336 INFO     lxc_container - lxccontainer.c:container_destroy:2414 - Destroyed directory for snapshot


More information about the lxc-users mailing list