mogstored and df(1) arguments

Eric Hodel drbrain at segment7.net
Thu Mar 9 08:43:34 UTC 2006


On Mar 9, 2006, at 12:06 AM, Leon Brocard wrote:

> On 3/9/06, Eric Hodel <drbrain at segment7.net> wrote:
>
>> -k specifies 1024-byte blocks, but -P specifies POSIX mode which uses
>> 512-byte blocks.  It appears that the -P wins since it comes last.
>
> This sounds awfully like a silly portability thing.

I don't know, according to my (FreeBSD 4.10 through 6) manpage, POSIX  
mode is 512-byte blocks so -k and -P shouldn't be used together  
because it will result in operator confusion.

> uname -a; df -k -l -P
> Darwin roo.config 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22
> 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh
> powerpc
> Filesystem   512-blocks     Used     Avail Capacity  Mounted on
> ...
>
>
> uname -a; df -k -l -PLinux kanga.astray.com 2.4.19-gentoo-r10 #6 Wed
> May 7 20:56:57 BST 2003 i686 Pentium III (Coppermine) GenuineIntel
> GNU/Linux
> Filesystem         1024-blocks      Used Available Capacity Mounted on
> ...
>
> uname -a; df -k -l -P
> Linux braga 2.6.8-2-686-smp #1 SMP Thu May 19 17:27:55 JST 2005  
> i686 GNU/Linux
> ...
>
> uname -a; df -k -l -P
> SunOS searchuk 5.9 Generic_112233-08 sun4u sparc SUNW,Ultra-60
> df: unknown option: P
> Usage: df [-F FSType] [-abeghklntVv] [-o FSType-specific_options]
> [directory | block_device | resource]
>
> Pesky operating systems!
>
> Why, what does it do on your OS?

$ uname -a
FreeBSD nestor.43things.com 6.0-RELEASE-p5 FreeBSD 6.0-RELEASE-p5 #0:  
Tue Mar  7 22:31:29 PST 2006     root at nestor.43things.com:/usr/obj/ 
usr/src/sys/RACKSPACE-PAE  i386
$ df -kP /
Filesystem    512-blocks  Used  Avail Capacity  Mounted on
/dev/aacd0s1a    1015260 90388 843652    10%    /
$ df -Pk /
Filesystem    1K-blocks  Used  Avail Capacity  Mounted on
/dev/aacd0s1a    507630 45194 421826    10%    /
$ man df
[...]
      -k      Use 1024-byte (1-Kbyte) blocks rather than the  
default.  Note
              that this overrides the BLOCKSIZE specification from  
the environ-
              ment.
[...]
      -P      Use POSIX compliant output of 512-byte blocks rather  
than the
              default.  Note that this overrides the BLOCKSIZE  
specification
              from the environment.

-- 
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com




More information about the mogilefs mailing list