trouble with statfs

Roger Espel Llima (espel@llaic.u-clermont1.fr)
Thu, 19 Nov 1998 21:45:32 +0100


Hi all,

One Linux server has just started exhibiting some weird behavior
with statfs, and therefore with df: it returns the exact same amount of
used and free space for the three 1gig partitions on the same drive.

The kernel version is 2.0.35 compiled from sources; I can give a .config
if needed, but there's nothing weird in there really. ext2 is the
default, and a few other fs's are there as modules, unused.

This is a production system, so I can't really start playing with
kernels, but I can upgrade it to 2.0.36 if it's fixed in there...

the 'df' output looks like this:

$ df
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sdb1 1018329 763666 202051 79% /
/dev/sdb5 1018329 763666 202051 79% /www
/dev/sdb6 1018329 763666 202051 79% /data
/dev/sda1 1416148 313835 1029134 23% /syjet

actually, 763666 is awfully close to the used space in the root
partition:

# du -s /data
18249 /data
# du -s /www
35203 /www
# du -s -x /
763637 /

fdisk /dev/sdb shows:
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 131 1052257 83 Linux native
/dev/sdb2 132 147 128520 82 Linux swap
/dev/sdb3 148 163 128520 82 Linux swap
/dev/sdb4 164 425 2104515 5 Extended
/dev/sdb5 164 294 1052226 83 Linux native
/dev/sdb6 295 425 1052226 83 Linux native

strace df shows:

statfs("/", {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=1018329,
f_bfree=254670, f_files=263160, f_ffree=213648, f_namelen=255}}) = 0
statfs("/proc", {f_type="PROC_SUPER_MAGIC", f_bsize=1024, f_blocks=0
, f_bfree=0, f_files=0, f_ffree=0, f_namelen=255}}) = 0
statfs("/www", {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=1018329,
f_bfree=254670, f_files=263160, f_ffree=213648, f_namelen=255}}) = 0
statfs("/data", {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=1018329,
f_bfree=254670, f_files=263160, f_ffree=213648, f_namelen=255}}) = 0

any ideas? the bad reports aren't a huge deal, but I'm concerned of
what could happen if the kernel suddently thinks the partitions are
full, when they aren't...

Roger

-- 
Roger Espel Llima, espel@llaic.u-clermont1.fr
http://www.eleves.ens.fr:8080/home/espel/index.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/