bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df shows wrong size for smbfs/cifs/nfs/davfs mounted directories


From: Bob Proulx
Subject: Re: df shows wrong size for smbfs/cifs/nfs/davfs mounted directories
Date: Sat, 8 Oct 2005 11:52:10 -0600
User-agent: Mutt/1.5.9i

Toralf Förster wrote:
> I am wondering about the displayed free disk space:
> n22 ~ # df -m /mnt/ramdisk/dav/ /mnt/dav/
> Filesystem           1M-blocks      Used Available Use% Mounted on
> tmpfs                      660         1       660   1% /mnt/ramdisk
> http://n22/davfs/         8790         0      8790   0% /mnt/dav
> 
> Why there seems to be ~8,8 GB space free whereas the whole ramdisk has only 
> 660 MB ?

Thanks for the report.  Please run the experiment again using strace
to find the result of the statfs(2) calls made by the program to the
kernel.

  strace -e statfs df -m /mnt/ramdisk/dav/ /mnt/dav/

This will report what information the df command is getting and
therefore will explain why df is printing what it is printing.

> normal behaviour (n22_uml is the UML sytem, n22_tun the host) :
> n22_uml ~ # df /mnt/nfs/n22_tmp
> Filesystem           1K-blocks      Used Available Use% Mounted on
> n22_tun:/tmp          14011712  10646784   2653184  81% /mnt/nfs/n22_tmp
> 
> Now I stop nfs at n22_tun:
> n22 ~ # /etc/init.d/nfs stop
> ...
> Ang got finally under UML:
> n22_uml ~ # df /mnt/nfs/n22_tmp
> Filesystem           1K-blocks      Used Available Use% Mounted on
> n22_tun:/tmp         77371252437321868667518976         0
> 77371252437321868667518976   0% /mnt/nfs/n22_tmp

Please do the same thing here too.

  strace -e statfs df /mnt/nfs/n22_tmp

> Here the exports - file from the host:
> n22 ~ # cat /etc/exports
> # /etc/exports: NFS file systems being exported.  See exports(5).
> /tmp            n22_uml(rw,sync,all_squash)

Looks fine to me.

> and the appropriate fstab - entry under UML:
> n22_uml ~ # grep n22_tmp /etc/fstab 
> n22_tun:/tmp            /mnt/nfs/n22_tmp        nfs     soft 0 0

I recommend to avoid the soft option for nfs mounts.  It can lead to
silent data corruption.  But I don't think it is related to your
current problem.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]