"Luis Carlos Erpen de Bona":
> [EMAIL PROTECTED]:/# exportfs -o no_root_squash localhost:/boot
> [EMAIL PROTECTED]:/# mount localhost:/boot /mnt
> [EMAIL PROTECTED]:/# mount |grep mnt
> localhost:/boot on /mnt type nfs (rw,addr=127.0.0.1)
> [EMAIL PROTECTED]:/# cd /mnt
> [EMAIL PROTECTED]:/mnt# mkdir A; touch A/B; ln A/B B; tail -f A/B &
> [1] 9267
> [EMAIL PROTECTED]:/mnt# rm A/B; rmdir A
> rmdir: A: Directory not empty
> [EMAIL PROTECTED]:/mnt# echo AAAA >> B
> [EMAIL PROTECTED]:/mnt# AAAA

This is an expected behaivour on nfs.
And I guess you will see these messages after a while.
  tail: A/B: Stale NFS file handle
  tail: no files remaining


> With aufs the exactly same test has a diferent behaviour, 

What is the difference?
Here is the output from my test.
- the error has two cases, as I wrote.
- both branches are ext2.

none /tmp/exp c0995990 br:/dev/shm/rw=rw:/dev/shm/ro=ro
none /tmp/exp aufs rw,xino=/dev/shm/rw/.aufs.xino,noplink 0 0
localhost:/tmp/exp /dev/shm/u nfs 
rw,dirsync,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=localhost
 0 0
+ cd /dev/shm/u
+ mkdir A
+ touch A/B
+ ln A/B B
+ echo test
+ echo test
+ rm A/B
+ tail -f A/B
test
test
+ echo test
+ rmdir A
test
rmdir: A: Directory not empty


> But in your tests, the "rm A/B" is truncating the file? Even
> existing the hard link?

I think it was renamed to .nfsXXX by the feature of nfs server, which is
called silly-rename.


> But with a /tmp being AUFS exported via NFS, mutt and 
> some other apps didn't work correctly.

Still I don't understand your problem (except the delay).
Do you want to say this ENOTEMPTY is the problem?

> rmdir("/tmp/.muttIOAHhM")               = -1 ENOTEMPTY (Directory not empty)

I don't think it is a problem as long as your /tmp is nfs.
You already have to know that by the result of your '/boot' test.


If you have time, please try strace for the delay problem and let me
know which systemcall took a long time.


Junjiro Okajima

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Reply via email to