Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2009 09:14:50 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        perryh@pluto.rain.com
Cc:        john@zog.net, freebsd-questions@freebsd.org
Subject:   Re: NFSv2 Wrong FS Size
Message-ID:  <20090204151450.GQ75802@dan.emsphone.com>
In-Reply-To: <49894cf9.J2VbLPqLSoDq7yay%perryh@pluto.rain.com>
References:  <158E6ABD-6BCF-4222-AD59-9B43FE6832D5@zog.net> <ECF42325-F49A-4C4F-9C1C-F5B00A78BC73@zog.net> <20090203215326.GN75802@dan.emsphone.com> <49894cf9.J2VbLPqLSoDq7yay%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 04), perryh@pluto.rain.com said:
> > 1755708928*1024/512 = 3511417856 blocks.  This number is larger than
> > 2^31, which techinically isn't a problem because the NFSv2 spec says
> > that the filesystem size is unsigned.  FreeBSD treats it as signed,
> > though, so it can display "negative" free space when root starts using
> > its 8% reserve, so your unsigned 3511417856 gets printed as a signed
> > -783549440, which messes everything up.
> ...
> > you could rebuild "df" to print its numbers as unsigned instead of
> > signed.  Just watch out if your local filesystems start eating into
> > their 8% reserve, since they'll start reporting huge values.
> 
> Or patch "df" to print local filesystem sizes as signed -- so that the
> reserve reporting still works -- and NFS as unsigned to match the spec.

That works as long as you don't NFS-mount other FreeBSD systems with
overfull drives :)

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090204151450.GQ75802>