Bug 109981 - Unhelpful error message "ERROR: incorrect snapshot name '/'" if snapshot dest is an existing directory
Summary: Unhelpful error message "ERROR: incorrect snapshot name '/'" if snapshot dest...
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Josef Bacik
Depends on:
Reported: 2015-12-25 21:29 UTC by Karl Richter
Modified: 2016-03-20 09:55 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.3.3
Tree: Mainline
Regression: No


Description Karl Richter 2015-12-25 21:29:14 UTC
Steps to reproduce:

  1. cd /tmp; mkdir a;
  2. sudo btrfs subvolume snapshot / /tmp/a

causes `ERROR: incorrect snapshot name '/'` whereas `ERROR /tmp/a is an existing directory` would be way more helpful

experienced with `btrfs-progs` 4.3.1
Comment 1 David Sterba 2016-01-13 16:25:48 UTC
Actually the problem is in '/' in the source path (or '.'). If you create another subvolume (say b), do 'snapshot b a', then it works and creates 'a/b'. This behaviour is consistent with 'cp' copying directories, but there's a bug in btrfs-progs that mistakenly refuses to use '/' or '.' as source subvolume.

Note You need to log in before you can comment on or make changes to this bug.