All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Taylor <jtaylor.debian@googlemail.com>
To: linux-btrfs@vger.kernel.org
Subject: enospace regression in 4.4
Date: Tue, 12 Apr 2016 12:24:59 +0200	[thread overview]
Message-ID: <570CCCFB.5000104@googlemail.com> (raw)

hi,
I have a system with two filesystems which are both affected by the
notorious enospace bug when there is plenty of unallocated space
available. The system is a raid0 on two 900 GiB disks and an iscsi
single/dup 1.4TiB.
To deal with the problem I use a cronjob that uses fallocate to give me
an advance notice on the issue so I can apply the only workaround that
works for me, which is shrink the fs to the minimum and grow it again.
This has worked fine for a couple of month.

I now updated from 4.2 to 4.4.6 and it appears my cronjob actually
triggers an immediate enospc in the balance after removing the
fallocated file and the shrink/resize workaround does not work anymore.
it is mounted with enospc_debug but that just says "2 enospc in
balance". Nothing else useful in the log.

I had to revert back to 4.2 to get the system running again so it is
currently not available for more testing, but I may be able to do more
tests if required in future.

The cronjob does this once a day:

#!/bin/bash
sync

check() {
  date
  mnt=$1
  time btrfs fi balance start -mlimit=2 $mnt
  btrfs fi balance start -dusage=5 $mnt
  sync
  freespace=$(df -B1 $mnt | tail -n 1 | awk '{print $4 -
50*1024*1024*1024}')
  fallocate -l $freespace $mnt/falloc
  /usr/sbin/filefrag $mnt/falloc
  rm -f $mnt/falloc
  btrfs fi balance start -dusage=0 $mnt

  time btrfs fi balance start -mlimit=2 $mnt
  time btrfs fi balance start -dlimit=10 $mnt
  date
}

check /data
check /data/nas


btrfs info:


 ~ $ btrfs --version
btrfs-progs v4.4
sagan5 ~ $ sudo btrfs fi show
Label: none  uuid: e4aef349-7a56-4287-93b1-79233e016aae
	Total devices 2 FS bytes used 898.18GiB
	devid    1 size 880.00GiB used 473.03GiB path /dev/mapper/data-linear1
	devid    2 size 880.00GiB used 473.03GiB path /dev/mapper/data-linear2

Label: none  uuid: 14040f9b-53c8-46cf-be6b-35de746c3153
	Total devices 1 FS bytes used 557.19GiB
	devid    1 size 1.36TiB used 585.95GiB path /dev/sdd

 ~ $ sudo btrfs fi df /data
Data, RAID0: total=938.00GiB, used=895.09GiB
System, RAID1: total=32.00MiB, used=112.00KiB
Metadata, RAID1: total=4.00GiB, used=3.10GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
sagan5 ~ $ sudo btrfs fi usage /data
Overall:
    Device size:		   1.72TiB
    Device allocated:		 946.06GiB
    Device unallocated:		 813.94GiB
    Device missing:		     0.00B
    Used:			 901.27GiB
    Free (estimated):		 856.85GiB	(min: 449.88GiB)
    Data ratio:			      1.00
    Metadata ratio:		      2.00
    Global reserve:		 512.00MiB	(used: 0.00B)

Data,RAID0: Size:938.00GiB, Used:895.09GiB
   /dev/dm-1	 469.00GiB
   /dev/mapper/data-linear1	 469.00GiB

Metadata,RAID1: Size:4.00GiB, Used:3.09GiB
   /dev/dm-1	   4.00GiB
   /dev/mapper/data-linear1	   4.00GiB

System,RAID1: Size:32.00MiB, Used:112.00KiB
   /dev/dm-1	  32.00MiB
   /dev/mapper/data-linear1	  32.00MiB

Unallocated:
   /dev/dm-1	 406.97GiB
   /dev/mapper/data-linear1	 406.97GiB

             reply	other threads:[~2016-04-12 10:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 10:24 Julian Taylor [this message]
2016-04-12 15:52 ` enospace regression in 4.4 Julian Taylor
2016-04-12 18:09   ` Henk Slager
2016-04-12 19:01     ` Julian Taylor
2016-04-13  3:13   ` Duncan
2016-04-13 11:56   ` Henk Slager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570CCCFB.5000104@googlemail.com \
    --to=jtaylor.debian@googlemail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.