xfs
[Top] [All Lists]

strange nfs...

To: linux-xfs@xxxxxxxxxxx
Subject: strange nfs...
From: Klaus Rein <k.rein@xxxxxxxxx>
Date: Tue, 07 Aug 2001 21:33:20 +0200
Organization: levigo systems gmbh
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi,

I have a strange problem with xfs (kernel 2.4.7, cvs checkout from
about July, 20th) and nfs (kernel nfs server).

When the attached script is run against a nfs mounted xfs filesystem 
the size of the directory trees checked with du is not constant:

# du -sk linux.*
142448  linux.orig
142448  linux.pass.0
142448  linux.pass.1
142448  linux.pass.2
142448  linux.pass.3
142448  linux.pass.4
142448  linux.pass.5
142448  linux.pass.6
142448  linux.pass.7
392036  linux.pass.8
701588  linux.pass.9
696992  linux.pass.10
695468  linux.pass.11
705772  linux.pass.12
703256  linux.pass.13
686964  linux.pass.14
709092  linux.pass.15

Comparing two directory trees shows:

# du -sk linux.orig/* linux.pass.15/*
20      linux.orig/COPYING
76      linux.orig/CREDITS
12      linux.orig/CVS
5728    linux.orig/Documentation
36      linux.orig/MAINTAINERS
20      linux.orig/Makefile
16      linux.orig/README
4       linux.orig/REPORTING-BUGS
12      linux.orig/Rules.make
26668   linux.orig/arch
67252   linux.orig/drivers
14036   linux.orig/fs
20180   linux.orig/include
36      linux.orig/init
100     linux.orig/ipc
212     linux.orig/kdb
404     linux.orig/kernel
120     linux.orig/lib
420     linux.orig/mm
6632    linux.orig/net
460     linux.orig/scripts
64      linux.pass.15/COPYING
128     linux.pass.15/CREDITS
192     linux.pass.15/CVS
34244   linux.pass.15/Documentation
64      linux.pass.15/MAINTAINERS
64      linux.pass.15/Makefile
64      linux.pass.15/README
64      linux.pass.15/REPORTING-BUGS
64      linux.pass.15/Rules.make
171172  linux.pass.15/arch
215548  linux.pass.15/drivers
57084   linux.pass.15/fs
187856  linux.pass.15/include
320     linux.pass.15/init
576     linux.pass.15/ipc
1156    linux.pass.15/kdb
1988    linux.pass.15/kernel
900     linux.pass.15/lib
1604    linux.pass.15/mm
32600   linux.pass.15/net
3336    linux.pass.15/scripts

But ls reports identical file sizes:

# ls -ld linux.orig/* linux.pass.15/*
drwxr-xr-x   18 2008     101          4096 Jul 10 17:16 linux.orig/arch
-rw-r--r--    1 2008     101         18633 Jun  9 04:44
linux.orig/COPYING
-rw-r--r--    1 2008     101         76191 Jul  5 08:13
linux.orig/CREDITS
drwxr-xr-x    2 2008     101            48 Jul 19 16:16 linux.orig/CVS
drwxr-xr-x   29 2008     101          4096 Jul 19 16:16
linux.orig/Documentation
drwxr-xr-x   39 2008     101          4096 Jul 19 16:16
linux.orig/drivers
drwxr-xr-x   44 2008     101          4096 Jul 19 16:16 linux.orig/fs
drwxr-xr-x   25 2008     101          4096 Jul 10 17:34
linux.orig/include
drwxr-xr-x    3 2008     101            45 Jul 10 17:34 linux.orig/init
drwxr-xr-x    3 2008     101            93 Jul 10 17:34 linux.orig/ipc
drwxr-xr-x    4 2008     101          4096 Jul 10 17:34 linux.orig/kdb
drwxr-xr-x    3 2008     101          4096 Jul 19 16:16
linux.orig/kernel
drwxr-xr-x    3 2008     101          4096 Jul 13 12:18 linux.orig/lib
-rw-r--r--    1 2008     101         35274 Jul 19 16:16
linux.orig/MAINTAINERS
-rw-r--r--    1 2008     101         17744 Jul 19 16:16
linux.orig/Makefile
drwxr-xr-x    3 2008     101          4096 Jul 19 16:16 linux.orig/mm
drwxr-xr-x   28 2008     101          4096 Jul 19 16:16 linux.orig/net
-rw-r--r--    1 2008     101         14491 Apr  2 19:13
linux.orig/README
-rw-r--r--    1 2008     101          2815 Mai  2 08:22
linux.orig/REPORTING-BUGS
-rw-r--r--    1 2008     101          8884 Apr  2 19:13
linux.orig/Rules.make
drwxr-xr-x    6 2008     101          4096 Jul 10 17:35
linux.orig/scripts
drwxr-xr-x   18 2008     101          4096 Jul 10 17:16
linux.pass.15/arch
-rw-r--r--    1 2008     101         18633 Jun  9 04:44
linux.pass.15/COPYING
-rw-r--r--    1 2008     101         76191 Jul  5 08:13
linux.pass.15/CREDITS
drwxr-xr-x    2 2008     101            48 Jul 19 16:16
linux.pass.15/CVS
drwxr-xr-x   29 2008     101          4096 Jul 19 16:16
linux.pass.15/Documentation
drwxr-xr-x   39 2008     101          4096 Jul 19 16:16
linux.pass.15/drivers
drwxr-xr-x   44 2008     101          4096 Jul 19 16:16 linux.pass.15/fs
drwxr-xr-x   25 2008     101          4096 Jul 10 17:34
linux.pass.15/include
drwxr-xr-x    3 2008     101            45 Jul 10 17:34
linux.pass.15/init
drwxr-xr-x    3 2008     101            93 Jul 10 17:34
linux.pass.15/ipc
drwxr-xr-x    4 2008     101          4096 Jul 10 17:34
linux.pass.15/kdb
drwxr-xr-x    3 2008     101          4096 Jul 19 16:16
linux.pass.15/kernel
drwxr-xr-x    3 2008     101          4096 Jul 13 12:18
linux.pass.15/lib
-rw-r--r--    1 2008     101         35274 Jul 19 16:16
linux.pass.15/MAINTAINERS
-rw-r--r--    1 2008     101         17744 Jul 19 16:16
linux.pass.15/Makefile
drwxr-xr-x    3 2008     101          4096 Jul 19 16:16 linux.pass.15/mm
drwxr-xr-x   28 2008     101          4096 Jul 19 16:16
linux.pass.15/net
-rw-r--r--    1 2008     101         14491 Apr  2 19:13
linux.pass.15/README
-rw-r--r--    1 2008     101          2815 Mai  2 08:22
linux.pass.15/REPORTING-BUGS
-rw-r--r--    1 2008     101          8884 Apr  2 19:13
linux.pass.15/Rules.make
drwxr-xr-x    6 2008     101          4096 Jul 10 17:35
linux.pass.15/scripts

And finally diff -r linux.orig linux.pass.15 does not find any
differences.

Both machines are PIII/800 with scsi disks and RedHat 7.1. The compiler
is
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) which should to be
ok
(according to the comments in the makefile of the kernel tree).

If it was only du reporting wrong values it would not bother me, but 
the reported space on the filesystem is really in use.

Klaus.

----------8<--------------------8<--------------------8<----------

#!/bin/sh

echo This is memtest.sh

# This is where we will run the tests at
TEST_DIR=/net/nfsserver/

# The location of the linux kernel source file we will be using
SOURCE_FILE=/tmp/linux-2.4.7-xfs.tar.gz

# How many passes to run of this test, higher numbers are better
NR_PASSES=200

# How many passes to run simultaneously (in order to flush memory on
# large memory machines).
#NR_SIMULTANEOUS=30
NR_SIMULTANEOUS=15

cd $TEST_DIR

echo TEST_DIR is $TEST_DIR
echo

# Remove any possible left over directories from a cancelled previous
run
echo `date`: rm -rf linux linux.orig linux.pass.*
rm -fr linux linux.orig linux.pass.*

# Unpack the one copy of the source tree that we will be comparing
against
echo `date`: unpacking linux.orig
zcat $SOURCE_FILE | tar xf -
mv linux linux.orig

i=0
while [ "$i" -lt "$NR_PASSES" ]; do
  j=0
  while [ "$j" -lt "$NR_SIMULTANEOUS" ]; do
    echo `date`: unpacking linux.pass.$j
    zcat $SOURCE_FILE | tar xf -
    mv linux linux.pass.$j
    j=`expr $j + 1`
  done
  j=0
  while [ "$j" -lt "$NR_SIMULTANEOUS" ]; do
    echo `date`: diff -r linux.orig linux.pass.$j
    diff -r linux.orig linux.pass.$j | grep -v "Common subdirectories"
    echo `date`: rm -rf linux.pass.$j
    rm -fr linux.pass.$j
    j=`expr $j + 1`
  done
  echo `date`: pass $i of $NR_PASSES finished
  i=`expr $i + 1`
done

# Clean up after ourselves
echo `date`: cleaning up
rm -fr linux linux.orig linux.pass.*
echo `date`: done


<Prev in Thread] Current Thread [Next in Thread>