After the recent import of ZFS v13 into 7-STABLE, an mkstemp() call from an NFS client to a ZFS-backed NFS server will fail: the syscall returns EIO and the server will have created a 0-byte file with 000 permissions. This breaks not just mktemp but also mv, tar, rsync... Fix: Kip Macy said there's a flags check that is too strict, in email message <3c1674c90905280025i17039257l573838d33d8493fd@mail.gmail.com> Otherwise, use cp and rm instead of mv, or use scp instead of NFS, or use UFS2 on the server How-To-Repeat: With both client/server running today's 7-STABLE: # dd if=/dev/random of=testfile bs=10000 count=1 >/dev/null 2>&1 # mount another-72-stable-system:/zfs /mnt # cp testfile /mnt # mv testfile /mnt mv: /mnt/testfile: Input/output error # mktemp /mnt/testfile2 mktemp: mkstemp failed on /mnt/testfile2: Input/output error # tar cf - testfile | (cd /mnt ; tar xpvf -) x testfile: Can't create 'testfile': Input/output error tar: Error exit delayed from previous errors. # rsync testfile /mnt rsync: mkstemp "/mnt/.testfile.0ycr51" failed: Input/output error (5) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6] # ls -l /mnt/testfile /mnt/.testfile* ---------- 1 root wheel 0 May 28 14:16 /mnt/.testfile.0ycr51 ---------- 1 root wheel 0 May 28 14:16 /mnt/testfile ZFS on-disk format was upgraded to v13, unknown yet whether leaving it at v6 would have made a difference, but I suspect not :) Everything works as expected if the remote filesystem is UFS2.
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
State Changed From-To: open->closed Close this PR, kern/135412 is a duplicate of this, but contains a simple test case
Responsible Changed From-To: freebsd-fs->gavin Track