Date: Sun, 17 Sep 1995 18:27:52 +0200 From: Lars Koeller <lars.koeller@odie.physik2.uni-rostock.de> To: julian@ref.tfs.com Cc: freebsd-questions@freefall.FreeBSD.org Subject: Re: Discrepance between df/du/tar! Message-ID: <199509171627.SAA00382@odie.physik2.uni-rostock.de> In-Reply-To: Mail from 'Julian Elischer <julian@ref.tfs.com>' dated: Fri, 15 Sep 1995 15:59:31 -0700 (PDT)
next in thread | previous in thread | raw e-mail | index | archive | help
Hi!
> Terry: it's the other way around..
> df is showing more than du, and tar..
Right that's the problem!
> my guesses are:
> 1/ a lot of files using 'part' of a last block (more than a frag but less
> than a block, OR
> 2/ you've mounted a filesystem over a directory that contains files?
That's it is!! There were more than 8 MB in /usr/bin left from a
wrong installation and I mount a filesystem in /usr! After removing this
ererything seems to be o.k.!
>
> > > I'm running FreeBSD-2.0.5R and there is a missmatch between the
> > > occupied disk space 'df' and 'du/gtar'!
> > >
> > > * df:
> > >
> > > Filesystem 1K-blocks Used Avail Capacity Mounted on
> > > /dev/sd0a 68735 31516 31720 50% /
> > >
> > > * du -skx: 22943
> > >
> > > * with GNU level-0 backup script for root filesystem:
> > >
> > > tar cpvl --totals /: Total bytes written: 23142400
> > >
> > > where are the difference of approx 9 MB???
> >
> > Files with blocks containing nothing but 0's in them are not necessarily
> > allocated real blocks. You create these by seeking to an offset and
> > writing. All blocks prior to the seek offset are zero'ed.
> >
> > This is called a sparse file.
> >
> > Most likely you have several sparse file on your box, including your
> > password databases and mail aliases.
> >
> > GNU tar has an option to not save these blocks to tape. You should use
> > it, or when you restore your files, they will grow and potentially take
> > more disk space than you really have.
> >
> > Try an experiment: open a file, seek to some offset, like 1G, and write
> > one 512b block.
> >
> > Then ls -l the file.
> >
> > Do this on a 40M drive. It will look like you have a 1G file.
> >
> >
> > Terry Lambert
> > terry@lambert.org
> > ---
> > Any opinions in this posting are my own and not those of my present
> > or previous employers.
> >
>
--
______________________________________________________________________________
Lars Köller E-Mail:
University of Rostock (Germany) lars.koeller@odie.physik2.Uni-Rostock.DE
Fachbereich Physik
Universitätsplatz 3 Phone: +49 381/498-1665 or 498-1648
18051 Rostock Fax: +49 381/498-1667
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509171627.SAA00382>
