Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
lxc-create fails mysteriously if /var/lxc is BTRFS and ~/.vagrant/boxes is not #81
I'm following the README and failing at the vagrant up stage. I'm running Ubuntu 13.04. Here's some sample output:
If I set the debug mode I can see the following output from lxc-create:
This turns out to be a problem with the way my filesystem is set up... I hade made /var/lxc a symlink to /two/lxc, where /two is a BTRFS filesystem. I guess lxc-create is trying to use some kind of BTRFS magic to clone the filesystem from my vagrant boxes dir ~/.vagrant/boxes to the /var/lxc location.
I managed to fix this by creating a new subvolume and making ~/.vagrant/boxes to that. Follow the instructions again and the box comes up fine. I wonder if you should make this part of the documentation, or even better detect it and warn the user beforehand.
I imagine that using BTRFS to drive /var/lxc will be a common requirement, and if you already have a root partition with another filesystem then this is an easy way to achieve it.
@sport-clan tks for reporting this, I haven't used BTRFS before but after some debugging looks like the issue is this line on creation scripts. could you please try commenting out that
Sorry, I reported under the wrong user id, this is my personal account.
As for the bug, I can't reproduce it now :-(
I've set my boxes dir back to a plain old directory (on my ext3 root partition as opposed to a symlink to the same btrfs partition where /var/lib/lxc points). But it seems to work fine now!
I wonder if I've installed an update that has fixed the underlying behaviour since yesterday...
@jamespharaoh would you be able to help me understand if I got it right? I've used an Ubuntu Raring VBox machine that you can find on https://gist.github.com/fgrehm/b07c6370a710be622807 and I followed instructions from http://www.funtoo.org/BTRFS_Fun to set things up and reproduce the problem.
That will make
And you'll get the same error again. If you remove the line
Does that represent the setup you had when you've hit this?