[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
df 4.5.3 returning misleading/incorrect info
From: |
Frank 'xraz' Fricke |
Subject: |
df 4.5.3 returning misleading/incorrect info |
Date: |
Mon, 9 Dec 2002 11:36:47 +0100 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
I don't think the following behaviour is intended... if it is
my system:
Linux xr2k 2.4.19 #2 SMP Wed Oct 30 12:11:02 CET 2002 i686
|xr2k:~# cat /proc/mounts
|rootfs / rootfs rw 0 0
|/dev/root / ext2 rw 0 0
|proc /proc proc rw 0 0
|devpts /dev/pts devpts rw 0 0
|/dev/hda3 /win vfat rw 0 0
|/dev/hda6 /data ext3 rw 0 0
|/dev/hde2 /data/hde ext3 rw 0 0
i don't think you need more info as it seems a program-only problem.
if you however do require more i'm glad to provide it.
everything ok here:
|xr2k:~# df -m
|Filesystem 1M-blocks Used Available Use% Mounted on
|/dev/hda1 5946 2519 3125 45% /
|/dev/hda3 3993 1271 2723 32% /win
|/dev/hda6 32399 28972 1807 95% /data
|/dev/hde2 28846 24129 3275 89% /data/hde
here too - shows /dev/hde2 correct while it's mounted and also /dev/hda1
for a file existing thereon.
|xr2k:~# df -m /dev/hde2
|Filesystem 1M-blocks Used Available Use% Mounted on
|/dev/hde2 28846 24129 3275 89% /data/hde
|xr2k:~# df -m /etc/passwd
|Filesystem 1M-blocks Used Available Use% Mounted on
|/dev/hda1 5946 2519 3125 45% /
now if i unmount /dev/hde2:
|xr2k:~# umount /dev/hde2
|xr2k:~# df -m /dev/hde2
|Filesystem 1M-blocks Used Available Use% Mounted on
|/dev/hde2 5946 2519 3125 45%
it displays the values of /dev/hda1 claiming it's /dev/hde2 !
I know the manpage states "This version of df cannot show the space
available on unmounted filesystems" but i think it would be much
better to report an error here or at least display /dev/hda1 correctly
because the devicefile in question resides on /dev/hda1.
IMO reporting nothing/an error back in such a case would be best for
one can rely on df to fail in scripts when if devices are unexpectedly
unmounted and not return values that look correct.
if address@hidden is a public mailing list - i'm not subscribed.
feel free to cc anything about this you think i should know...
...Frank
http://www.gnupg.org | http://xraz.de/gpg.key
Fingerpint: C1E1 0A5C 3733 F4F1 D59B 14F7 57C6 1784 8F78 8A2B
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE99HI/V8YXhI94iisRAo0tAJ9u7B7ljbz7Im0IXwWuFEzHGHjV1QCfTvjy
S/zuQIJ1hGVJXgv6RpIDMS4=
=8mlN
-----END PGP SIGNATURE-----
- df 4.5.3 returning misleading/incorrect info,
Frank 'xraz' Fricke <=