From sparc@mail.trident-uk.co.uk  Tue Feb  8 11:58:42 2005
Return-Path: <sparc@mail.trident-uk.co.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E809516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Feb 2005 11:58:42 +0000 (GMT)
Received: from mail.trident-uk.co.uk (mail.trident-uk.co.uk [208.174.37.105])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8F86B43D3F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Feb 2005 11:58:42 +0000 (GMT)
	(envelope-from sparc@mail.trident-uk.co.uk)
Received: from localhost (localhost.trident-uk.co.uk [127.0.0.1])
	by mail.trident-uk.co.uk (Postfix) with ESMTP id BCCDB8294D
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Feb 2005 11:58:41 +0000 (GMT)
Received: from mail.trident-uk.co.uk ([127.0.0.1])
 by localhost (cobain.trident-uk.co.uk [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 35197-10 for <FreeBSD-gnats-submit@freebsd.org>;
 Tue,  8 Feb 2005 11:58:41 +0000 (GMT)
Received: from m0ng.noc.trident-uk.co.uk (m0ng.noc.trident-uk.co.uk [192.168.122.20])
	by mail.trident-uk.co.uk (Postfix) with ESMTP id 60BEB8294B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  8 Feb 2005 11:58:41 +0000 (GMT)
Received: by m0ng.noc.trident-uk.co.uk (Postfix, from userid 1001)
	id 473CE6484; Tue,  8 Feb 2005 11:58:46 +0000 (GMT)
Message-Id: <20050208115846.473CE6484@m0ng.noc.trident-uk.co.uk>
Date: Tue,  8 Feb 2005 11:58:46 +0000 (GMT)
From: Jamie Heckford <jamie@tridentmicrosystems.co.uk>
Reply-To: Jamie Heckford <jamie@tridentmicrosystems.co.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: df behaviour has changed between 4.x and 5.x	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         77260
>Category:       bin
>Synopsis:       df behaviour has changed between 4.x and 5.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 08 12:00:44 GMT 2005
>Closed-Date:    Mon Jan 28 00:14:15 UTC 2008
>Last-Modified:  Mon Jan 28 00:14:15 UTC 2008
>Originator:     sparc
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD nipples.trident-uk.co.uk 5.3-RELEASE FreeBSD 5.3-RELEASE #5: Fri Jan 21 12:46:39 GMT 2005 sparc@nipples.trident-uk.co.uk:/usr/obj/usr/src/sys/NIPPLES i386


	
>Description:

Behaviour of df has changed between 4.x and 5.x when displaying NFS volumes

According to the manual page NFS volumes should be displayed unless the switch
-t nonfs is used.

>How-To-Repeat:

On 4.x with NFS mounts, do df. Repeat on 5.x. example below:

* 4.x *
=======

admin@cobain:~> uname -v
FreeBSD 4.9-RELEASE #1: Thu Apr 15 10:00:08 GMT 2004     admin@cobain.trident-uk.co.uk:/usr/src/sys/compile/COBAIN 

admin@morrison:~> df
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
/dev/da0s1a    604718     50564    505778     9%    /
/dev/da0s1e    100750       202     92488     0%    /tmp
/dev/da0s1g  10050414   1699344   7547038    18%    /usr
/dev/da0s1f   6193438   1458468   4239496    26%    /var
procfs              4         4         0   100%    /proc
lennon:/u   538172626 215128824 279989992    43%    /u       <===== NFS SHOWN


* 5.x *
=======

admin@lennon:~> uname -v
FreeBSD 5.3-RELEASE #0: Sun Dec 12 13:42:02 GMT 2004     root@lennon.trident-uk.co.uk:/usr/obj/usr/src/sys/LENNON 

admin@lennon:~> df
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
/dev/da0s1a   1012974     52206    879732     6%    /
devfs               1         1         0   100%    /dev
/dev/da0s1e   1012974         6    931932     0%    /tmp
/dev/da0s1g 538172626 215265926 279852890    43%    /u
/dev/da0s1f  10154158   1556208   7785618    17%    /usr
/dev/da0s1d   4058062     22098   3711320     1%    /var

admin@lennon:~> df -t nfs
df: /backup stats possibly stale
Filesystem    1K-blocks      Used    Avail Capacity  Mounted on
data1:/backup 229592288 160110224 69252472    70%    /backup



>Fix:

In 5.x add the -t nfs switch to df to display just the NFS volume.

>Release-Note:
>Audit-Trail:

From: Kris Kennaway <kris@obsecurity.org>
To: Jamie Heckford <jamie@tridentmicrosystems.co.uk>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/77260: df behaviour has changed between 4.x and 5.x
Date: Tue, 8 Feb 2005 20:21:22 -0800

 On Tue, Feb 08, 2005 at 11:58:46AM +0000, Jamie Heckford wrote:
 
 > * 4.x *
 > =======
 > 
 > admin@cobain:~> uname -v
 > FreeBSD 4.9-RELEASE #1: Thu Apr 15 10:00:08 GMT 2004     admin@cobain.trident-uk.co.uk:/usr/src/sys/compile/COBAIN 
 > 
 > admin@morrison:~> df
 > Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
 > /dev/da0s1a    604718     50564    505778     9%    /
 > /dev/da0s1e    100750       202     92488     0%    /tmp
 > /dev/da0s1g  10050414   1699344   7547038    18%    /usr
 > /dev/da0s1f   6193438   1458468   4239496    26%    /var
 > procfs              4         4         0   100%    /proc
 > lennon:/u   538172626 215128824 279989992    43%    /u       <===== NFS SHOWN
 > 
 > 
 > * 5.x *
 > =======
 > 
 > admin@lennon:~> uname -v
 > FreeBSD 5.3-RELEASE #0: Sun Dec 12 13:42:02 GMT 2004     root@lennon.trident-uk.co.uk:/usr/obj/usr/src/sys/LENNON 
 > 
 > admin@lennon:~> df
 > Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
 > /dev/da0s1a   1012974     52206    879732     6%    /
 > devfs               1         1         0   100%    /dev
 > /dev/da0s1e   1012974         6    931932     0%    /tmp
 > /dev/da0s1g 538172626 215265926 279852890    43%    /u
 > /dev/da0s1f  10154158   1556208   7785618    17%    /usr
 > /dev/da0s1d   4058062     22098   3711320     1%    /var
 > 
 > admin@lennon:~> df -t nfs
 > df: /backup stats possibly stale
 
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 This indicates that the statfs call failed, e.g. you don't have read
 access to the filesystem mount, or there's some other error condition.
 
 Certainly I see nfs filesystem mounts from plain 'df' on 5.x and 6.x.
 
 > Filesystem    1K-blocks      Used    Avail Capacity  Mounted on
 > data1:/backup 229592288 160110224 69252472    70%    /backup
 
 Kris
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Jan 28 00:12:56 UTC 2008 
State-Changed-Why:  
kris' analysis indicated that this might be a permissions problem. 

In any case, 4.X is now no longer supported, so whatever the behavior 
in 5.X is now the standard. 

Sorry it took so long to look at this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77260 
>Unformatted:
