From: Marc Joliet <marcec@gmx.de>
To: linux-btrfs@vger.kernel.org
Subject: Re: ENOSPC errors during balance
Date: Tue, 22 Jul 2014 01:30:22 +0200 [thread overview]
Message-ID: <20140722013022.52b189ee@marcec> (raw)
In-Reply-To: <20140722003057.0f3b89f0@marcec>
[-- Attachment #1: Type: text/plain, Size: 3248 bytes --]
Am Tue, 22 Jul 2014 00:30:57 +0200
schrieb Marc Joliet <marcec@gmx.de>:
> Am Mon, 21 Jul 2014 15:22:16 +0200
> schrieb Marc Joliet <marcec@gmx.de>:
>
> > Am Sun, 20 Jul 2014 21:44:40 +0200
> > schrieb Marc Joliet <marcec@gmx.de>:
> >
> > [...]
> > > What I did:
> > >
> > > - delete the single largest file on the file system, a 12 GB VM image, along
> > > with all subvolumes that contained it
> > > - rsync it over again
> > [...]
> >
> > I want to point out at this point, though, that doing those two steps freed a
> > disproportionate amount of space. The image file is only 12 GB, and it hadn't
> > changed in any of the snapshots (I haven't used this VM since June), so that
> > "subvolume delete -c <snapshots>" returned after a few seconds. Yet deleting it
> > seems to have freed up twice as much. You can see this from the "filesystem df"
> > output: before, "used" was at 229.04 GiB, and after deleting it and copying it
> > back (and after a day's worth of backups) went down to 218 GiB.
> >
> > Does anyone have any idea how this happened?
> >
> > Actually, now I remember something that is probably related: when I first
> > moved to my current backup scheme last week, I first copied the data from the
> > last rsnapshot based backup with "cp --reflink" to the new backup location, but
> > forgot to use "-a". I interrupted it and ran "cp -a -u --reflink", but it had
> > already copied a lot, and I was too impatient to start over; after all, the
> > data hadn't changed. Then, when rsync (with --inplace) ran for the first time,
> > all of these files with wrong permissions and different time stamps were copied
> > over, but for some reason, the space used increased *greatly*; *much* more than
> > I would expect from changed metadata.
> >
> > The total size of the file system data should be around 142 GB (+ snapshots),
> > but, well, it's more than 1.5 times as much.
> >
> > Perhaps cp --reflink treats hard links differently than expected? I would have
> > expected the data pointed to by the hard link to have been referenced, but
> > maybe something else happened?
>
> Hah, OK, apparently when my daily backup removed the oldest daily snapshot, it
> freed up whatever was taking up so much space, so as of now the file system
> uses only 169.14 GiB (from 218). Weird.
And now that the background deletion of the old snapshots is done, the file
system ended up at:
# btrfs filesystem df /run/media/marcec/MARCEC_BACKUP
Data, single: total=219.00GiB, used=140.13GiB
System, DUP: total=32.00MiB, used=36.00KiB
Metadata, DUP: total=4.50GiB, used=2.40GiB
unknown, single: total=512.00MiB, used=0.00
I don't know how reliable du is for this, but I used it to estimate how much
used data I should expect, and I get 138 GiB. That means that the snapshots
yield about 2 GiB "overhead", which is very reasonable, I think. Obviously
I'll be starting a full balance now.
I still think this whole... thing is very odd, hopefully somebody can shed
some light on it for me (maybe it's obvious, but I don't see it).
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-07-21 23:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-19 15:26 ENOSPC errors during balance Marc Joliet
2014-07-19 17:38 ` Chris Murphy
2014-07-19 21:06 ` Piotr Szymaniak
2014-07-20 2:39 ` Duncan
2014-07-20 10:22 ` Marc Joliet
2014-07-20 11:40 ` Marc Joliet
2014-07-20 19:44 ` Marc Joliet
2014-07-21 2:41 ` Duncan
2014-07-21 13:22 ` Marc Joliet
2014-07-21 22:30 ` Marc Joliet
2014-07-21 23:30 ` Marc Joliet [this message]
2014-07-22 3:26 ` Duncan
2014-07-22 7:37 ` Marc Joliet
2014-07-20 12:59 ` Duncan
2014-07-21 11:01 ` Brendan Hide
-- strict thread matches above, loose matches on Subject: below --
2014-07-19 20:10 Fw: " Marc Joliet
2014-07-19 20:58 ` Marc Joliet
2014-07-20 0:53 ` Chris Murphy
2014-07-20 9:50 ` Marc Joliet
2014-07-20 1:11 ` Chris Murphy
2014-07-20 9:48 ` Marc Joliet
2014-07-20 19:46 ` Marc Joliet
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=20140722013022.52b189ee@marcec \
--to=marcec@gmx.de \
--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 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).