[lxc-devel] Next few milestones for 1.0

S.Çağlar Onur caglar at 10ur.org
Fri Jan 10 20:22:59 UTC 2014


Hey John,

On Fri, Jan 10, 2014 at 3:06 PM, John Peacock
<jpeacock at messagesystems.com> wrote:
> On Fri, 2014-01-10 at 12:42 -0600, Serge Hallyn wrote:
>> > I may be totally biased, but I believe that the bug I just entered:
>> >
>> >   https://github.com/lxc/lxc/issues/131
>> >
>> > should be a blocker for rc1.  Restoring snapshots is impossible on btrfs
>>
>> Not if your rootfs is btrfs though, right?
>
> I don't know, since that is not how I have my system configured; I've
> got my OS on one RAID volume and a second larger RAID set with
> subvolumes mounted at specific points in the tree.  I can experiment.
>
> But the fact that the restore was using rsync (which crashed and
> corrupted the btrfs metadata) rather than directly using subvolume
> snapshots means that at the very least the current mode is inefficient.
> I suspect I'll see the same problem even on a root btrfs filesystem.

This is what happens on a system that uses btrfs;

[caglar at qp:~] sudo btrfs subvolume list /
ID 256 gen 67911 top level 5 path @
ID 258 gen 67911 top level 5 path @home

[caglar at qp:~] sudo lxc-create -t ubuntu -n original -B btrfs
[...]


[caglar at qp:~] sudo btrfs subvolume list /
ID 256 gen 67912 top level 5 path @
ID 258 gen 67911 top level 5 path @home
ID 316 gen 67912 top level 256 path var/lib/lxc/original/rootfs

[caglar at qp:~] sudo lxc-snapshot --name original

[caglar at qp:~] sudo btrfs subvolume list /
ID 256 gen 67913 top level 5 path @
ID 258 gen 67913 top level 5 path @home
ID 316 gen 67913 top level 256 path var/lib/lxc/original/rootfs
ID 317 gen 67913 top level 256 path var/lib/lxcsnaps/original/snap0/rootfs

[caglar at qp:~] sudo lxc-snapshot -n original -r snap0

[caglar at qp:~] sudo btrfs subvolume list /
ID 256 gen 67915 top level 5 path @
ID 258 gen 67913 top level 5 path @home
ID 317 gen 67913 top level 256 path var/lib/lxcsnaps/original/snap0/rootfs
ID 318 gen 67915 top level 256 path var/lib/lxc/original/rootfs

[caglar at qp:~] sudo lxc-snapshot --list --name original
snap0 (/var/lib/lxcsnaps/original) 2014:01:10 15:16:41

[caglar at qp:~] sudo lxc-snapshot --name original -d snap0

[caglar at qp:~] sudo lxc-snapshot --list --name original
No snapshots

[caglar at qp:~] sudo btrfs subvolume list /
ID 256 gen 67922 top level 5 path @
ID 258 gen 67913 top level 5 path @home
ID 320 gen 67922 top level 256 path var/lib/lxc/original/rootfs

So it looks like it works (but as you saud uses rsync instead of btrfs snapshot)

> John
>
> --
> JOHN PEACOCK
> senior software build and release engineer
> www.messagesystems.com
> twitter @MessageSystems
>
> tel 410-872-4910 x239
> email john.peacock at messagesystems.com
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
S.Çağlar Onur <caglar at 10ur.org>


More information about the lxc-devel mailing list