Project

General

Profile

Actions

Bug #1110

closed

Hammer: df used space output wrong

Added by ftigeot over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This is the output of df for my /home filesystem:

Filesystem Size Used Avail Capacity Mounted on
Home 347G 1.0G 78G 77% /home

The "Used" column is obviously wrong; all other values are about what
they should be.

I recently copied a 40 GB directory on /home which went to 90% capacity.
I later deleted most of the files and kept about only 5GB of them. I then
noticed df(1) output was wrong.

A run of hammer prune didn't fix things; I will run a reblock operation and
report the result later.

Actions #1

Updated by ftigeot over 15 years ago

This is after a run of hammer reblock:

Filesystem Size Used Avail Capacity Mounted on
Home 347G 960M 82G 76% /home

Actions #2

Updated by dillon over 15 years ago

:This is after a run of hammer reblock:
:
:Filesystem Size Used Avail Capacity Mounted on
:Home 347G 960M 82G 76% /home
:
:--
:Francois Tigeot

Hmm.  I'm not sure I entirely trust DF, have you rebuilt the world
recently? DF went through some changes.
Try running it with -k and without -h or -H.  And try rebuilding
the world to make sure DF has the libc statvfs changes as well.
-Matt
Matthew Dillon
<>
Actions #3

Updated by ftigeot over 15 years ago

AFAIK, I'm running the last kernel and world from the 2.0 branch (build on
the 6th):
DragonFly 2.0.0-RELEASE #14: Wed Aug 6 20:08:27 CEST 2008

df -k output appears to be correct:

Filesystem 1K-blocks Used Avail Capacity Mounted on
Home 364036096 277831680 86204416 76% /home

On further examination one of my UFS slices also exhibit the same problem,
so it seems not to be a Hammer specific bug.

Sorry for the noise.

Actions #4

Updated by swildner over 15 years ago

I've committed a fix, can you update and try again?

Thanks,
Sascha

Actions #5

Updated by ftigeot over 15 years ago

Sure.

For some reason, Chlamydia doesn't seem to have picked the changes yet. I
have patched df.c by hand and it now works as expected:

Filesystem Size Used Avail Capacity Mounted on
Home 347G 265G 82G 76% /home

Thanks for the good work !

Actions #6

Updated by matthias over 15 years ago

Fix committed

Actions

Also available in: Atom PDF