On Fri, 04 Mar 2016 22:10:57 +0100 nexus@xxxxxxxxxx wrote: > Hello, > > I'm encountering weird enospc problem while writing to filesystem and > creating snapshot at a same time: > > Steps to reproduce: > > start writing data to filesystem: > > # LC_ALL=C dd if=/dev/zero of=/foobar > dd: writing to '/foobar': No space left on device > 3003803+0 records in > 3003802+0 records out > 1537946624 bytes (1.5 GB, 1.4 GiB) copied, 10.8072 s, 142 MB/s > > in other terminal create read-only (or r/w - results are the same) > # btrfs sub snap -r / /.snap1 > Create a readonly snapshot of '/' in '//.snap1' > > while creating this snapshot, ENOSPC is produced. > > Interesting is that I can reproduce this on some filesystems but not on > others while all of available information are the same. There IS free > space in data, metadata and global reserve. > > I've tried balancing and defragmenting with no success. I've tried > debugging by using enospc_debug but nothing is written to dmesg or any > system log > > Does anybody have a clue what may be the cause? > > # uname -a > Linux interceptor 4.4.3-1-ARCH #1 SMP PREEMPT Fri Feb 26 15:09:29 CET > 2016 x86_64 GNU/Linux As you use the nodatacow mount option, this seems to be another case of http://www.spinics.net/lists/linux-btrfs/msg51276.html http://www.spinics.net/lists/linux-btrfs/msg51819.html and is fixed by https://patchwork.kernel.org/patch/7967161/ Unfortunately the bug is known since the start of the 4.4 series and the patch is out for 2 months, but it didn't get included into even 4.4.4 released recently. You have to apply it by yourself and recompile the kernel. -- With respect, Roman
Attachment:
pgpCKVWyUBomI.pgp
Description: OpenPGP digital signature
