SUMMARY of improper kbyte representation in 2.5.1?

From: Aaron Lineberger (aaron@cs.odu.edu)
Date: Mon Mar 23 1998 - 10:13:07 CST


First thanks to all who responded:
Gert Marais <maraisg@saps.org.za>
Casper Dik <casper@holland.Sun.COM>
David Thorburn-Gundlach <david@bae.uga.edu>
Kelly Fergason <klfergason@amoco.com>

The original post:
>I'm having a problem using du with the -k option on a SS10 running 2.5.1.
>It seems that no matter whether I use the -k option or not, I can not get
>it to return the value in kbytes. This wouldn't be such a big deal if I
>wasn't implementing quotas, but since I am it causes a huge problem.
>
>An example:
>someone with a quota limit of 150MB has 110856 returned by `du -ks .` in
>their home directory on a 2.5 machine; but the same person has 1773216
>returned by `du -ks .` on a 2.5.1 machine. As you can see quota sees this
>number and thinks the person has 1.7GB used instead of only using 111MB.
>
>What I've tried:
>I've tried both /usr/ucb/du and /usr/bin/du, I've tried copying du from a
>2.5 machine with the same results, so I don't think it's a problem with
>the du program.
>
>Has anyone else experienced this behavior?
>Does anyone know of a patch for this?

The responses:
Gert gave me an idea that du might be crossing file systems and to use
`du -sdk` to prevent this, however this was not the case but it is
insightful for others who might have overlooked this. Thanks Gert!

Casper pointed me to the solaris FAQ which describes a bug in the first
release of 2.5 NFS V3 with the solution: (Thanks Casper!)

    There are two ways to fix this: one is to upgrade to Solaris 2.5.1,
    the other is to install the 2.5 NFS patches 103226 (SPARC) or
    103227 (x86), revision -04 or later. As of this writing,
    patch 103226 has been superseded by patch 103477-06 (or later).

The most recently posted version of the FAQ is available from
<http://www.wins.uva.nl/pub/solaris/solaris2/>

David also pointed me in the right direction with a good explanation of
what was happenning and how the byte representation was either 16 times
larger or 16 times smaller depending on which way you were going between
2.5 and 2.5.1, his response regarding the patches: (Thanks David!)

It looks like the patch you want is 103093 (current rev = 17), which
covers lots of stuff in the 2.5 kernel. Go to SunSolve and start digging
with BugID 1234858, which summarized and explained this very problem down
at the bottom of the page, or go straight to 103093-17.

Thanks also to Kelly for her response which also pointed me in the right
direction:

Try looking at bug #1234858. It mentions a patch as a workaround
and describes what is happening. (patch 103226-xx)

-----------------------------------------------------------------------------
Aaron Lineberger aaron@cs.odu.edu
ODUCS Systems Group http://www.cs.odu.edu/cspage/systemstaff.html
Asst. Systems Engineer http://www.cs.odu.edu/~aaron
-----------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:34 CDT