← Back to team overview

touch-packages team mailing list archive

Re: [Bug 1532125] Re: lxc-clone: Use btrfs backing store if original container does

 

Ok, so this is working as expected.  But I guess there is really zero
advantage to having a copy-clone on btrfs, so I think it's worth
changing.

 status confirmed
 importance medium


** Changed in: lxc (Ubuntu)
   Importance: Undecided => Medium

** Changed in: lxc (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1532125

Title:
  lxc-clone: Use btrfs backing store if original container does

Status in lxc package in Ubuntu:
  Confirmed

Bug description:
  lxc-clone documents the backingstore option as "Select a different
  backing store for the new container. By default the same as the
  original container's is used.". This sounds like if the original
  container uses btrfs, the cloned container should as well.

  I have the LXC data dir on btrfs, and did lxc-create -n adt-xenial -B
  best. This correctly selected btrfs backing store:

  ID 293 gen 16369 top level 5 path lxc/adt-xenial/rootfs

  However, cloning is slow:

  $ time sudo lxc-clone -o adt-xenial -n x1
  Created container x1 as copy of adt-xenial

  real	0m9.417s
  user	0m1.359s
  sys	0m4.436s

  It did create a new btrfs snapshot:
  ID 297 gen 16372 top level 5 path lxc/x1/rootfs

  but apparently not as a copy of the original  lxc/adt-xenial/rootfs
  one.

  If I explicitly select btrfs as backingstore, it works as intended:

  $ time sudo lxc-clone -B btrfs -o adt-xenial -n x1
  Created container x1 as copy of adt-xenial

  real	0m0.136s
  user	0m0.004s
  sys	0m0.012s

  However, for scripts this is impractical, as it's not quite obvious
  how to determine whether the original container uses btrfs backing
  store, and "-B best" (which works for lxc-create) does not work for
  lxc-clone. So it seems lxc-clone does not actually use "the same -B as
  the original container"?

  I haven't tested this for other backing stores.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: lxc 1.1.5-0ubuntu3
  ProcVersionSignature: Ubuntu 4.3.0-5.16-generic 4.3.3
  Uname: Linux 4.3.0-5-generic x86_64
  ApportVersion: 2.19.3-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan  8 10:10:03 2016
  EcryptfsInUse: Yes
  SourcePackage: lxc
  UpgradeStatus: No upgrade log present (probably fresh install)
  defaults.conf:
   lxc.network.type = veth
   lxc.network.link = lxcbr0
   lxc.network.flags = up
   lxc.network.hwaddr = 00:16:3e:xx:xx:xx
  lxc.conf: lxc.lxcpath = /srv/lxc

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1532125/+subscriptions


References