Can't create a snapshot of a Btrfs subvolume

Martín Cigorraga martincigorraga at gmail.com
Tue Jul 29 02:50:35 UTC 2014


Hi!

I recently installed an Ubuntu Server with this layout:
partition 1: /          Btrfs
partition 2: /home  Btrfs
partition 3: swap
and I'm unable to create any snapshot of / -- a problem I never had before
when installing with the default Btrfs layout (that is, with both / and
/home subvolumes on the same partition).

My current Btrfs layout is this one:
UUID=blah-blah-blah /               btrfs
defaults,space_cache,autodefrag,relatime,compress-force=zlib,subvol=@
  0       1
UUID=blah-blah-blah /home       btrfs
defaults,space_cache,autodefrag,relatime,compress-force=zlib,subvol=@home 0
      2
UUID=blah-blah-blah none         swap  sw

 0       0

Now, when I try to create a snapshot I get this:
~> sudo btrfs subvolume snapshot -r / /home/SYSTEM/snapshots/root
Create a readonly snapshot of '/' in '/home/SYSTEM/snapshots/root'
ERROR: cannot snapshot '/' - Invalid argument
(Note: /home/SYSTEM/snapshots directory already exists)

This is strange because the same exact command does work as expected when /
and /home subvolumes are in the same partition.
Neither works:

~> sudo btrfs subvolume snapshot -r @ /home/SYSTEM/snapshots/root
ERROR: error accessing '@

Some additional debug information:
~> sudo btrfs subvolume show /
/
        Name:                   @
        uuid:                   5c2ad4ea-89b3-5e4f-9795-86418a745b58
        Parent uuid:            -
        Creation time:          2014-07-27 00:04:31
        Object ID:              257
        Generation (Gen):       2275
        Gen at creation:        6
        Parent:                 5
        Top Level:              5
        Flags:                  -
        Snapshot(s):

~> sudo btrfs subvolume list /
ID 257 gen 2277 top level 5 path @


I'm not new to Ubuntu but I am to Btrfs and I can't get it what's happening
here or what I am doing wrong, any idea?
-Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20140728/a249d8b1/attachment.html>


More information about the ubuntu-server mailing list