[Top][All Lists]

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

bug#8208: Possible bug for df

From: Jesse Molina
Subject: bug#8208: Possible bug for df
Date: Wed, 09 Mar 2011 02:36:31 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110123 SeaMonkey/2.0.12

The "df" tool will mismatch mounted devices when a specific device parameter is specified.

Here's some console output from running df;

address@hidden>df -h /dev/md5
Filesystem            Size  Used Avail Use% Mounted on
/dev/md5              2.3T  1.7T  534G  76% /mnt/backup/bak5
address@hidden>df -h /dev/md5
Filesystem            Size  Used Avail Use% Mounted on
udev                  881M  372K  880M   1% /dev

In the second invocation, the /dev/md5 device had been dismounted, but the /dev filesystem is now being matched, when it should not be.

Expected behavior is to get non-zero exit code and print nothing, and/or an error on stderr that the device is not found.

Note that this was to be used in a script. I tried with the -P flag, and the behavior is the same, in that the wrong mount is matched.

address@hidden>df --version
df (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Paul Eggert.

Also FYI

address@hidden>df -v
Filesystem           1K-blocks      Used Available Use% Mounted on
                       8256952   3884136   4288932  48% /
tmpfs                   906132         4    906128   1% /lib/init/rw
udev                    901260       372    900888   1% /dev
tmpfs                   906132         4    906128   1% /dev/shm
/dev/md0                241036    108803    107344  51% /boot
                       2064208     71112   1888240   4% /tmp
                     1906616172 621163644 1266103904  33% /var
                       4128448   2038268   2090180  50% /var/log

No reply needed.  Sorry if this is duplicate or expected behavior.

# Jesse Molina
# Mail = address@hidden
# Page = address@hidden
# Cell = 1.602.323.7608
# Web  = http://www.opendreams.net/jesse/

reply via email to

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