bug-coreutils
[Top][All Lists]
Advanced

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

df displays wrong figures for network mounts


From: Bruno Haible
Subject: df displays wrong figures for network mounts
Date: Tue, 16 Aug 2005 20:37:55 +0200
User-agent: KMail/1.5

Hi,

Here's a case where GNU df 5.2.1 displays figures that are totally off
the reality.

address@hidden:/smb/ibook/data/temp $ df --version
df (coreutils) 5.2.1
...
address@hidden:/smb/ibook/data/temp $ df .
Filesystem           1K-blocks      Used Available Use% Mounted on
//ibook/bruno         13827584  12813056   1014528  93% /smb/ibook
address@hidden:/smb/ibook/data/temp $ ls -l             
total 0
address@hidden:/smb/ibook/data/temp $ dd if=/dev/zero of=dummy1 bs=1024 
count=100000
dd: writing `dummy1': No space left on device
99521+0 records in
99520+0 records out
address@hidden:/smb/ibook/data/temp $ ls -l
total 99520
-rw-r--r--    1 bruno    user     101908480 Aug 11 02:45 dummy1
address@hidden:/smb/ibook/data/temp $ df .
Filesystem           1K-blocks      Used Available Use% Mounted on
//ibook/bruno         13827584  12813056   1014528  93% /smb/ibook

So, although between the two "df ." operations, I have stored
99 MB of data, the "Available" figure has not shrunk by a single kilobyte.
And equally confusing, although "dd" reports "no space left on device",
"df ." keeps on telling me that there's ca. 1 GB free space.

The machine is a Linux/x86 machine, Linux 2.4.x, glibc 2.3.x.

What is going on?

/smb/ibook is a smbfs mount pointing to another machine, 'ibook'.
On that machine,

address@hidden:~/data/temp $ df -k
Filesystem              1K-blocks     Used   Avail Capacity  Mounted on
/dev/disk0s3             13827604 12674556 1014772    93%    /
/dev/disk0s5             10417852 10417852       0   100%    /Volumes/UserData
...

the /smb/ibook directory resides on the / partition and has 1 GB available,
but the /smb/ibook/data directory resides on the /Volumes/UserData
partition and is full.

/smb/ibook/data is actually a symbolic link pointing into the
/Volumes/UserData partition. It does not look like a symbolic link on
the host:

address@hidden:~ $ ls -ld data
lrwxr-xr-x  1 bruno  bruno  17 24 Aug  2004 data -> /Volumes/UserData

address@hidden:/smb/ibook $ ls -ld data
drwxr-xr-x    1 bruno    user         4096 Aug 11 00:54 data


The mistake that 'df' did is: When it climbed up directories until it
found a mount point
  /smb/ibook/data/temp
  /smb/ibook/data
  /smb/ibook
it only considered mount points on the current host (linuix), but ignored
mount points and symbolic links on the machine that exports the filesystem.

Bruno





reply via email to

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