Reflink cloning of LXC container on btrfs?

I use btrfs on my system and have created an LXC container with Xubuntu on it. Now I'd like to use that as a base for other containers. Since it's a btrfs, I can use cp --reflink to create a copy-on-write copy of a file or folder. This seems kind of ideal in my use case, but I was wondering if lxc-clone will make use of that or create full copies when I use a directory backing rather than btrfs?

2 Answers

You can always bedup later. It is blazingly fast (incremental run takes only seconds to finish), thanks to the advanced features of btrfs, so you can put as an upstart job.

It's not an answer, but rather a walkaround.

1

Yes, lxc-clone will utilize btrfs capability of making COW copies as it's noted in Stephane Graber's blog entry in the paragraph "Cloning containers" if you use switch "-s" or have set up btrfs as your backing store.

UPD. I am very sorry, but it seems that I haven't read the question to the very end. If you use directory backing storage rather than btrfs, lxc-clone will NOT make COW copies.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like