-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to create backing store type btrfs #1525
Comments
Can you create a subvolume using the btrfs tools directly?
|
Yes indeed I can (which suprises me) |
When i try this without a config file and with the -t none i do not get the error (but nothing is created besides lxc config obviously).
Once i set the type to (for example) ubuntu/debian/etc it fails with the following message: lxc-create -B btrfs -n test -t ubuntu --logfile test.log --logpriority debug lxc-create: lxccontainer.c: do_bdev_create: 1042 Failed to create backing store type btrfs Same story for manually creating a volume, that works fine. (Testing as root / Ubuntu 14 + lxc from backports) |
With another (unprivileged) user I am able to use lxc-create correctly. Do I have to tell lxc something in order to be able to create a container as "user2"? |
Could you please tell me the usernames and the contents of your |
@chiasamen Use something like this to get the sub uid/gid info:
@brauner |
I don't know why, but it worked when I tried it again. I can only imagine that it's related to a reboot since thats the only relevant action which could have an effect to the user. @robincee : That was exactly my problem - the basics where clear to me (since I already have several unpriv. containers running (with other users)) |
@chiasamen thanks! I can't confirm the reboot was required, also was unable to remove the btrfs module and reload it without a reboot, but i don't think that was my problem. I followed a more general guide when setting btrfs up, while lxc expects the volume in /var/lib/lxc (by default). Mine was located in /mnt/folder. Whoopse. Once i changed My 2 cents: A simple check in the code if this folder isn't a btrfs volume with a neat comment would do better then the error you get now. And an older version of the lxc-create command listed way more info for the -B option, including a bit about /var/lib/lxc/ that's missing from the codebase atm. Long story short: when using btrfs be sure to set lxc.lxcpath to a mounted btrfs volume OR /var/lib/lxc should be a btrfs mount already. I confirmed both work just fine. Thanks! |
A bunch of problems around btrfs and other storage drivers are fixed in newer liblxc releases. |
The template below is mostly useful for bug reports and support questions.
Feel free to remove anything which doesn't apply to you and add more information where it makes sense.
Required information
lxc-start --version
:lxc-checkconfig
uname -a
cat /proc/self/cgroups
cat /proc/1/mounts
Issue description
Steps to reproduce
The text was updated successfully, but these errors were encountered: