Nasty NFS bug with RS/6000 and Sun

Steve Losen scl at sasha.acc.Virginia.EDU
Sat Jan 12 01:16:48 AEST 1991


If you NFS mount a directory tree from a rs6000 on a sun, beware
that you can destroy a directory on the rs6000 such that only fsck
can bring back the directory's contents.

Suppose you have a directory called x/y on the rs6000 that is NFS
mounted on the sun and you have a file called y on the sun.  If you
run this command on the sun:

cp y x

(where y is the file on the sun and x is the directory on the rs6000)
the command fails as you would expect (you can't copy file y on top
of directory x/y).  Unfortunately, the directory x/y is truncated to
zero length, effectively disconnecting anything below x/y until you
run fsck and look in lost+found.

One of our users got bitten by this and when he tried to remove the
stricken directory with rmdir he got "y is not a directory".  So when
he tried rm he got "y is a directory".  rm -r said "can't read
directory y".  None of this is surprising, just amusing.

We are running AIX 3.1 patchlevel (or whatever it's called) 3001.
I've called IBM's attention to this bug and they are working on it.
This problem does not occur between two rs6000s, nor between two suns,
nor when the NFS server is a sun and the client is a rs6000.

By the way, you can do the same thing to a directory by running dd
on the sun.

dd if=somefile of=x/y

This gives an error message but also truncates x/y to zero length.

--
Steve Losen                     scl at virginia.edu

University of Virginia Academic Computing Center



More information about the Comp.unix.aix mailing list