lxc-clone fails for xfs fs on lvm

Bug #1013549 reported by Maurizio Sambati on 2012-06-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)

Bug Description

cloning an lvm backed container fails when the fs is xfs and a snapshot is used for clone. The reason is that xfs has an uuid that is checked before mounting. The issue can be solved regenerating the uuid of the snapshot. This patch seems to work:

> # change filesystem UUID if it is an xfs filesystem
> xfs_admin -u /dev/$lxc_vg/$lxc_new && xfs_admin -U generate /dev/$lxc_vg/$lxc_new

Changed in lxc (Ubuntu):
importance: Undecided → Medium
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug.

If I understand right (after testing), you have no problems with cloning
the container, or running the original or cloned container, but running
both at the same time fails, right?

If I am understanding you correctly. Thanks for the suggested fix!

Changed in lxc (Ubuntu):
status: New → Triaged

yes, the problem is just for the last scenario (both running at the same time fails).

Serge Hallyn (serge-hallyn) wrote :

Here is an updated version of your patch (thanks for that) which I've sent upstream.

We could wait for it to percolate through an upstream release, but it might be worth dropping it into quantal and precise in the meantime.

Yeah, it's not like having an extra patch will hurt ;)
I guess we can upload that to quantal whenever we have something else to
push and we'll bundle it in precise next time we SRU.

Stéphane Graber
Ubuntu developer

tags: added: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.8.0~rc1-4ubuntu21

lxc (0.8.0~rc1-4ubuntu21) quantal; urgency=low

  [ Stéphane Graber ]
  * Fix lxc-ubuntu and lxc-ubuntu-cloud to fix the /dev/shm workaround to only
    trigger when /dev/shm is not a symlink. (LP: #974584)

  [ Serge Hallyn ]
  * lxc.lxc-net.upstart: replace the check for USE_LXC_BRIDGE (which could be
    changed from true to false after starting lxc-net) with one for the
    existence /var/run/lxc. (LP: #1019290)
  * 0095-lxc-clone-change-uuid-on-xfs.patch: give each cloned xfs-backed
    lvm partition a unique uuid so they can be mounted simultaneously.
    (LP: #1013549)
  * 0096-lxc-wait-add-timeout.patch: patch submitted upstream to add a timeout
    option to lxc-wait. (LP: #1020179)
 -- Serge Hallyn <email address hidden> Thu, 26 Jul 2012 17:40:36 +0000

Changed in lxc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers