Description of problem: I cannot snapshot neither directory nor whole volume using btrfsprogs in F11. I have LUKS-encrypted partition, over it I have single partition btrfs: /dev/dm-5 on /media/WDP-Crypt type btrfs (rw,nosuid,nodev,uhelper=devkit) Version-Release number of selected component (if applicable): btrfs-progs-0.18-4.fc11.x86_64 kernel-2.6.29.4-167.fc11.x86_64 [root@gilbertus ~]# btrfsctl -s back_2009-06-02_01 /media/WDP-Crypt/Backup/ ioctl:: Inappropriate ioctl for device [root@gilbertus ~]# btrfsctl -s back_2009-06-02_01 /media/WDP-Crypt/ ioctl:: Inappropriate ioctl for device [root@gilbertus ~]# btrfsctl -s back_2009-06-02_01 /dev/dm-5 ioctl:: Inappropriate ioctl for device After some stracing and debugging I found following two errors in btrfsctl.c: 1) snapshot name is treated as directory to be snapshotted 2) dirname() strips the parameter and leaves "." as dir to be snapshotted. This happens after following lines in btrfsctl.c: snap_location = strdup(fullpath); snap_location = dirname(snap_location); (snap_location equals "." afterwards). Look into following strace snippet: stat(".", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=20480, ...}) = 0 open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3 fcntl(3, F_GETFD) = 0x1 (flags FD_CLOEXEC) stat("/media/WDP-Crypt/Backup/", {st_mode=S_IFDIR|0755, st_size=82, ...}) = 0 open("/media/WDP-Crypt/Backup/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4 ioctl(3, 0x50009401, 0x7ffff3e192e0) = -1 ENOTTY (Inappropriate ioctl for device) first "." is opened as fd3, then correct dir as fd4, and lastly *fd3* is snapshotted.
Created attachment 346244 [details] name is first argument ot -s, and path is second
Ok looks like the documentation is wrong. The way this is supposed to work is you do btrfsctl -s /mnt/btrfs/snapshot_name /mnt/btrfs that should work. Sorry for the confusion, I'm fixing the wiki so it makes more sense.
*** Bug 572958 has been marked as a duplicate of this bug. ***