Γιώργος (Giorgos?) reports: > Namely, being inside a snapshot directory, I can't create a file/directory > with the name of the snapshot directory. > > For example, inside /mnt/aSnap, I can't create a file named 'aSnap', so I'm > filling this bug report. It seems that the snapshot directory is partially created before the snapshot is taken, so that the snapshot directory half-exists (can be looked up, but doesn't appear in listings) inside the snapshot itself. This doesn't seem to be the recommended way to organise subvolumes, but it seems like it should at least result in a coherent filesystem within each subvolume. Ben. > Below follows full reproduction of this behavior: > > aris tmp # dd if=/dev/zero of=FILE bs=4k seek=`echo 5*1024*1024 | bc` count=1 > 1+0 records in > 1+0 records out > 4096 bytes (4.1 kB) copied, 1.8695e-05 s, 219 MB/s > aris tmp # losetup /dev/loop0 FILE > aris tmp # losetup -a > /dev/loop0: [fe01]:263872 (/tmp/FILE) > aris tmp # mkfs.btrfs -Ltest /dev/loop0 > > WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL > WARNING! - see http://btrfs.wiki.kernel.org before using > > fs created label test on /dev/loop0 > nodesize 4096 leafsize 4096 sectorsize 4096 size 20.00GB > Btrfs Btrfs v0.19 > aris tmp # mount /dev/loop0 /mnt/ > aris tmp # cd /mnt > aris mnt # ls -la > total 8 > dr-xr-xr-x 1 root root 0 Mar 8 12:07 . > drwxr-xr-x 24 root root 4096 Mar 8 11:41 .. > aris mnt # mkdir dir1 > aris mnt # mkdir dir2 > aris mnt # mkdir dir3 > aris mnt # l > total 0 > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir1 > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir2 > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir3 > aris mnt # btrfs subvolume snapshot /mnt/ /mnt/aSnap > Create a snapshot of '/mnt/' in '/mnt/aSnap' > aris mnt # cd /mnt/aSnap/ > aris aSnap # ls -la > total 8 > dr-xr-xr-x 1 root root 34 Mar 8 12:08 . > dr-xr-xr-x 1 root root 34 Mar 8 12:08 .. > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir1 > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir2 > drwxr-xr-x 1 root root 0 Mar 8 12:08 dir3 > aris aSnap # date > aSnap > bash: aSnap: Is a directory -- Ben Hutchings Computers are not intelligent. They only think they are.
Attachment:
signature.asc
Description: This is a digitally signed message part
