lxc-clone fails for xfs fs on lvm

Bug #1013549 reported by Maurizio Sambati
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

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:

198a199,202
>
> # 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
>

Tags: patch
Changed in lxc (Ubuntu):
importance: Undecided → Medium
Revision history for this message
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
Revision history for this message
Maurizio Sambati (maurizio-sambati) wrote :

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

Revision history for this message
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.

Revision history for this message
Stéphane Graber (stgraber) wrote : Re: [Bug 1013549] Re: lxc-clone fails for xfs fs on lvm

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
http://www.ubuntu.com

tags: added: patch
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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