Re: df discrepencies



On Mon, 2006-05-01 at 10:08 -0400, charlie derr wrote:
On one of the machines that I oversee there is an issue with the df
output that I don't understand.

here's a part of the output from df -h

/dev/sda1 440G 420G 0 100% /backup

if i don't use the -h it looks like this:

/dev/sda1 461293804 440335112 0 100% /backup

It appears that there really are 20Gigs free, but that column shows 0
-- can i reliably ignore that column and use subtraction with the
previous two to compute the true free space?

dumpe2fs -h /dev/sda1

will show you exactly what is going on. On filesystems I have I want to
use the entire filesystem, I set the reserve to 16384 blocks (making the
reserved amount 64MB on ext3)

You can do this with:

tune2fs -r 16384 /dev/sda1

I also typically disable max-mount-counts, causing fsck to run only when
unmounted uncleanly or after so much time.

So, really the command I use to for maximizing the amont of disk space
for general user use and so on is as follows:

tune2fs -r 16384 -c 0 -e continue -i 3456000 /dev/sda1

BTW, 3456000 is 40 days.

If I clear up enough more diskspace the 4th column will eventually
show more than 0, but it won't be equivalent to the difference of the
2nd
and 3rd. My recollection is that rebooting will fix this problem
(for a while), but I'd prefer not to have to reboot every couple
weeks.

What are you talking about? That only clears /tmp files from the /
or /tmp directories.

This machine is running sarge and that partition is ext3 over a RAID5
array. I do slip up on occasion and allow this partition to
completely fill up (not sure if that might be relevant) so that the
rsync processes that are writing to it fail (because of no more
remaining disk space).

Please make sure you wan to do this before you go any further. I have
had years and years of working with *NIX and can basically take risks
that other could not, as I understand *WHAT* I am trying to accomplish.
Not that I am saying you don't, just make sure you understand the
consequences, before you do.
--
greg, greg@xxxxxxxxxxxxxxx

The technology that is
Stronger, Better, Faster: Linux

Use Debian GNU/Linux, its a bazaar thing

NOTICE: Due to Presidential Executive Orders, the
National Security Agency may have read this email
without warning, warrant, or notice, and certainly
without probable cause. They may do this without
any judicial or legislative oversight. You have no
recourse nor protection.

Attachment: signature.asc
Description: This is a digitally signed message part



Relevant Pages

  • Re: Is defragging really a myth?
    ... Although, rebooting should clear it ... I have plenty of free disk space (117GB free ... Swaps aren't truly deleted until a reboot - wheether deleted by OnyX, ... This would explain why deleteing the swap files doesn't cause chaos. ...
    (comp.sys.mac.system)
  • Re: Versioning file system
    ... I spent a lot of time trying to make the regrettable code work before ... versions of other files would have been wasteful of disk space, ... version management on top of the filesystem, and automatic versioning ... individual filesystems or in the vfs code so all filesystems can use it? ...
    (Linux-Kernel)
  • Re: Processes with open handles to unlinked files
    ... I need this because sometimes filesystems get filled up ... enough that I'm concerned about disk space (certainly not nowadays ... especially if the temporary files contain per-session database tables ...
    (comp.os.linux.misc)
  • Re: Is defragging really a myth?
    ... enough disk space, not enough RAM? ... Although, rebooting should clear it ... Using OnyX to delete the swap files ... I have plenty of free disk space (117GB free ...
    (comp.sys.mac.system)
  • Re: Fast testing
    ... Rebooting is bloody fast for me (0.7 seconds for the kernel start, ... the GUI is usable again and you can actually continue working? ... (ie. until it begins looking for the filesystems), 6 mins for fsck ...
    (Linux-Kernel)