[NBLUG/talk] disk space quirk?
Eric Eisenhart
eric at nblug.org
Wed Jul 28 16:40:51 PDT 2004
On Wed, Jul 28, 2004 at 04:26:14PM -0700, Bob Blick wrote:
> Here's something that doesn't add up. Perhaps there's something I'm not
> seeing, but it seems like df is reporting something incorrectly for
> /dev/hda3:
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hda1 1887540 1648968 238572 88% /
> /dev/hda3 27545968 26053464 93244 100% /home
> shmfs 127980 0 127980 0% /dev/shm
>
> Both partitions are reiserfs, du reports 26053464 used on /dev/hda3.
>
> Do I really have only 93 meg free when I should have 1.4 gig? fsck at boot
> doesn't complain about anything being wrong.
If you do a little math you'll find that the missing amount is just a hair
over 5%.
With most *nix filesystems, there's a "reserved blocks" parameter in the
filesystem (as well as reserved uid and gid). Basically, when the
filesystem gets to the point where the *true* blocks available is less than
or equal to the reserved blocks parameter, only the uid and gid in the
"Reserved UID" parameter of the filesystem can perform operations that will
allocate additional blocks.
It's a safety measure, so that programs root is running don't break when
somebody else fills up the filesystem.
df subtracts the reserved blocks from the *true* available blocks before
display, because they're not available to most users.
On modern, large, filesystems (27GB), the default of 5% is too big.
With ext2 and ext3, there's "tune2fs" to allow you to print and change that
(and other) parameters.
I've never done it with reiserfs. I thought reiserfstune might be a good
place to look, but documentation I can find online doesn't show any hint of
being able to set that...
--
Eric Eisenhart
NBLUG Co-Founder & Director-At-Large
The North Bay Linux Users Group
http://nblug.org/
eric at nblug.org, IRC: Freiheit at freenode, AIM: falschfreiheit, ICQ: 48217244
More information about the talk
mailing list