lxc-copy: bdev/bdev.c: bdev_copy: 381 no such block device type: overlay

Bug #1591513 reported by Jesse Pretorius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu 16.04 LTS
Release: 16.04

lxc:
  Installed: 2.0.1-0ubuntu1~16.04.1
linux-image-virtual:
  Installed: 4.4.0.24.25
linux-image-extra-virtual:
  Installed: 4.4.0.24.25

Man ref:
http://manpages.ubuntu.com/manpages/xenial/man1/lxc-copy.1.html

Problem:
The man package references 'overlay' as a backing storage type, but when the following command is executed:

lxc-copy --name=cache --newname overlayfs1 -B overlay --snapshot

The result is:
lxc-copy: bdev/bdev.c: bdev_copy: 381 no such block device type: overlay
lxc-copy: lxccontainer.c: copy_storage: 2844 Error copying storage.
clone failed

Expected result:
An overlay snapshot should be created.

Existing workaround:
Use the deprecated lxc-clone command instead:
lxc-clone --snapshot --backingstore overlayfs --orig cache --new overlayfs1

Steps to recreate:
apt-get update && apt-get install -y lxc
lxc-create --name=cache --template=download -- --dist ubuntu --release trusty --arch amd64
lxc-copy --name=cache --newname overlayfs1 -B overlay --snapshot

description: updated
description: updated
description: updated
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

After some experimentation I've found that with no 'linux-image-extra-virtual' package installed (whether it's installed or not makes no difference) and all other package versions at the same level the command does work when the backing store is specified as 'overlayfs' instead of 'overlay'.

root@lxchost-xenial3:~# lxc-copy --name=cache --newname overlayfs1 -B overlayfs --snapshot
root@lxchost-xenial3:~# grep rootfs /var/lib/lxc/overlayfs1/config
lxc.rootfs = overlayfs:/var/lib/lxc/cache/rootfs:/var/lib/lxc/overlayfs1/delta0
lxc.rootfs.backend = overlayfs
root@lxchost-xenial3:~# grep overlay /proc/filesystems
nodev overlayfs
nodev overlay
root@lxchost-xenial3:~# lxc-copy --name=cache --newname overlayfs2 -B overlay --snapshot
lxc-copy: bdev/bdev.c: bdev_copy: 381 no such block device type: overlay
lxc-copy: lxccontainer.c: copy_storage: 2844 Error copying storage.
clone failed

So it would appear that the backing store is supported, but the man page and the tooling do not match in functionality.

Revision history for this message
Christian Brauner (cbrauner) wrote :
Changed in lxc (Ubuntu):
status: New → Fix Committed
Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.