linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Out of space on small-ish partition, clobber and other methods haven't worked
@ 2016-01-20 21:22 Jerry Steinhauer
  2016-01-21  2:28 ` Chris Murphy
  0 siblings, 1 reply; 7+ messages in thread
From: Jerry Steinhauer @ 2016-01-20 21:22 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]

Hello,

We are deploying BTRFS as part of an embedded system.  We're very
pleased with it overall.  In our case, the entire partition size is
~500Mb.  The problem that I encounter is that when I run the partition
out of space, I begin receiving out of space errors that I can't
clear.  I've looked on earlier list posts, and tried the following:
 a) Clobbering the file. cat /dev/null > a.file yields out of space.
 b) Unlinking the file.  rm a.file yields out of space.

% cat /dev/zero > a.file
cat: write error: No space left on device
% ls -la a.file
-rw-r--r-- 1 root root 479723520 Jan 20 20:59 a.file

So far, so good.

% rm a.file
rm: cannot remove 'a.file': No space left on device
% cat /dev/null > a.file
-sh: a.file: No space left on device
% btrfs fi df /data
System, single: total=32.00MiB, used=4.00KiB
Data+Metadata, single: total=506.00MiB, used=500.39MiB
GlobalReserve, single: total=12.00MiB, used=6.45MiB

We've also tried at other times rebalancing, with no success.

We encountered this on 3.1, so we upgraded as far as our distro would
take us (yocto) to 4.1.  Same issue persists.

Questions:
* Are there any other ways to exit this state?
* What debug tools can we use to determine where btrfs is running out
of space on the unlink?
* Failing these, is there someone we can work with to determine root
cause?  We'd like to work with you all to fix the issue, if we can.

Background information such as version:

% btrfs --version
btrfs-progs v4.1.2-dirty
% btrfs fi df /data
System, single: total=32.00MiB, used=4.00KiB
Data+Metadata, single: total=200.00MiB, used=41.99MiB
GlobalReserve, single: total=4.00MiB, used=0.00B
% btrfs fi show
Label: 'd_1.2.0_p1021'  uuid: e4a1f9f1-0e34-4ed1-b788-8a54f735d296
        Total devices 1 FS bytes used 42.00MiB
        devid    1 size 539.00MiB used 232.00MiB path /dev/sda8

btrfs-progs v4.1.2-dirty

dmesg and kernel config are attached.

We notice when trying this same flow against a debian 8 build (using
the exact same disks as we use here) that the size of the file is
smaller by ~70Mb.  The debian kernel is able to clear this issue (rm
works, clobber works).  We theorize that btrfs is calculating reserves
differently in our case.

We've tried on 3.1 (yocto), 3.14 (debian) and 4.1 (yocto).  The
command line output is from 4.1.

If we can provide other detail to help track this down, please let us know.

 - Jerry

[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 26821 bytes --]

[-- Attachment #3: dmesg.log.gz --]
[-- Type: application/x-gzip, Size: 16498 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-23 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20 21:22 Out of space on small-ish partition, clobber and other methods haven't worked Jerry Steinhauer
2016-01-21  2:28 ` Chris Murphy
2016-01-21 10:41   ` Duncan
2016-01-21 17:40     ` Chris Murphy
2016-01-22 12:08       ` Duncan
2016-01-22 12:11     ` Jerry Steinhauer
     [not found]   ` <CAHRikPHt7SmFhzQsZ-XKLYSbwCAgCeccEFXbw+YXBobJx8w1Ew@mail.gmail.com>
2016-01-23 15:23     ` Jerry Steinhauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).