I seem to have this problem, too.
I started using hardy (coming from gutsy) and changed nfs at the same
time from unfs3 to nfs-user-server because of different reasons.
You can reproduce this using bash:
[EMAIL PROTECTED]:/s/tmp#
[EMAIL PROTECTED]:/s/tmp#
[EMAIL PROTECTED]:/s/tmp#
[EMAIL PROTECTED]:/s/tmp# echo test >test.txt
[EMAIL PROTECTED]:/s/tmp# cat test.txt
test
[EMAIL PROTECTED]:/s/tmp# echo xyz >>test.txt
[EMAIL PROTECTED]:/s/tmp# cat test.txt
test
xyz
[EMAIL PROTECTED]:/s/tmp# echo abc >test.txt
bash: test.txt: Invalid argument
[EMAIL PROTECTED]:/s/tmp# cat test.txt
[EMAIL PROTECTED]:/s/tmp# ls -l test.txt
-rw------- 1 root root 0 2008-01-08 09:31 test.txt
[EMAIL PROTECTED]:/s/tmp#
where /s is a nfs mount.
When using zsh instead (which is my default shell) appending some text
replaces the old contents instead of appending to it.
using cp:
[EMAIL PROTECTED]:/s/tmp# rm test.txt
[EMAIL PROTECTED]:/s/tmp# echo abc >test.txt
[EMAIL PROTECTED]:/s/tmp# cat test.txt
abc
[EMAIL PROTECTED]:/s/tmp# cp test.txt test2.txt
[EMAIL PROTECTED]:/s/tmp# cat test2.txt
abc
[EMAIL PROTECTED]:/s/tmp# cp test.txt test2.txt
cp: cannot create regular file `test2.txt': Invalid argument
[EMAIL PROTECTED]:/s/tmp# cat test2.txt
[EMAIL PROTECTED]:/s/tmp#
then strace gives for "cp test.txt test2.txt":
...
stat64("test2.txt", {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
stat64("test.txt", {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
stat64("test2.txt", {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
open("test.txt", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=4, ...}) = 0
open("test2.txt", O_WRONLY|O_TRUNC|O_LARGEFILE) = -1 EINVAL (Invalid argument)
...
nfs-user-server is version 2.2beta47-23
kernel is 2.6.22-14-generic
pts/0 server:root ~ # cat /etc/exports
/ 10.77.0.0/255.255.255.0(rw,insecure,no_root_squash)
127.0.0.1/255.255.255.255(rw,insecure,no_root_squash)
--
nfs-user-server destroys files
https://bugs.launchpad.net/bugs/162508
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs