Strange ZFS problem,
filesystem claims to be full when clearly not full
Oliver Fromme
olli at lurza.secnetix.de
Fri Oct 1 07:03:54 UTC 2010
Torbjorn Kristoffersen wrote:
> Here's some news, I finally found a file in a user's .spamassassin directory.
>
> $ ls -l .spamassassin/
> total 39877936
> -rw------- 1 gg gg 76546048 Sep 30 01:13 auto-whitelist
> -rw------- 1 gg gg 48 Sep 30 01:51 bayes.lock
> -rw------- 1 gg gg 20840448 Sep 30 01:13 bayes_seen
> ---------- 1 gg gg 552902721536 Sep 30 01:52 temp
> -rw------- 1 gg gg 1573 Sep 30 07:51 user_prefs
>
>
> Now that is an incredibly huge (and invalid) file! Something like
> 514GB, far more than the size of this ZFS filesystem.
> I removed it, and there was no visible effect in df. Some funny
> business must be happening with spamassassin though,
> otherwise this strange file would not be so huge.
Probably a so-called sparse file, i.e. a file with "holes"
that don't actually occupy disk space. "ls -ls" will print
the number of blocks actually allocated to the file on disk.
I once wrote a script that calculates the "sparseness" of
files. It's designed for UFS/UFS2. The output will be
inaccurate for ZFS, but it should still give a rough number.
http://www.secnetix.de/olli/scripts/sparsecheck
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"I invented Ctrl-Alt-Delete, but Bill Gates made it famous."
-- David Bradley, original IBM PC design team
More information about the freebsd-fs
mailing list