btrfsprogs: cases of snapshot failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since btrfs does not do recursive atomic snapshots (which I am ok with),
I am doing this myself. A handful of suggestions/problems came up.

1. Maybe btrfsprogs could gain an option to do recursive non-atomic
snapshots at the userspace level, simply invoking low-level atomic
snapshots one by one?


For the following, the kernel is 3.4.4 with the too-overloaded "0.19"
version of btrfsprogs.

2. Subvolume directories are somewhat special, as you may know.
Only `btrfs sub create/snap` creates them, and they cannot be rmdird.

# btrfs sub list .
ID 256 top level 5 path HEAD
[...]
ID 450 top level 5 path HEAD/woven
ID 451 top level 5 path HEAD/leet

Attempting to snapshot a directory with further subvolumes in it
has the strange effect that directories get created, and do so
with the wrong inode info:

# ls -l HEAD
total 4
drwxr-xr-x 1 root root  18 Aug 18 01:04 .
dr-xr-xr-x 1 root root 218 Aug 23 00:25 ..
drwxr-xr-x 1 root root  66 Aug 17 23:04 leet
drwxrwx--- 1 root root 100 Aug 18 00:53 woven

# btrfs sub snap HEAD today
Create a snapshot of 'HEAD' in './today'
# ls -l today
total 4
drwxr-xr-x 1 root root  18 Aug 18 01:04 .
dr-xr-xr-x 1 root root 228 Aug 23 00:25 ..
drwxr-xr-x 1 root root   0 Aug 23 00:25 leet
drwxr-xr-x 1 root root   0 Aug 23 00:25 woven


3. The creation of these non-special directories in today/
is undesired, because now I need to rmdir them first before
creating the subsnapshots.

# btrfs sub snap HEAD today
Create a snapshot of 'HEAD' in './today'
# btrfs sub snap HEAD/leet today/
Create a snapshot of 'HEAD/leet' in 'today//leet'
ERROR: cannot snapshot 'HEAD/leet' - File exists


4. Because today/leet already exists as a non-subvolume root,
btrfsprogs defaults to creating another directory inside it
(unexpected, but ok). However, while doing so, it runs into
some unexplainable ENOTTY:

# btrfs sub snap HEAD today
Create a snapshot of 'HEAD' in './today'
# btrfs sub snap HEAD/leet today/leet
Create a snapshot of 'HEAD/leet' in 'today/leet/leet'
ERROR: cannot snapshot 'HEAD/leet' - Inappropriate ioctl for device
(^failure where success would have been expected)

Successes:
# rmdir today/leet/
# mkdir today/leet
# btrfs sub snap HEAD/leet today/leet
Create a snapshot of 'HEAD/leet' in 'today/leet/leet'

So today/leet as created by `sub snap HEAD` is also some weird
object.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux