Closed
Description
We need better integration with nfs-kernel-server for pools using zfs sharenfs. Currently for example restarting nfs-kernel-server causes the following to happen:
root@zorro:~# showmount -e
Export list for zorro:
root@zorro:~# zfs set sharenfs=on testpool/nfstest
root@zorro:~# showmount -e
Export list for zorro:
/testpool/nfstest *
root@zorro:~# mount -t nfs4 localhost:/testpool/nfstest /mnt/nfsloopbacktest
root@zorro:~# showmount -e
Export list for zorro:
/testpool/nfstest *
root@zorro:~# touch /testpool/nfstest/testfile
root@zorro:~# ls /mnt/nfsloopbacktest
testfile
root@zorro:~# dd if=/dev/zero of=/mnt/nfsloopbacktest/testfile bs=1M &
[1] 3536
root@zorro:~#
root@zorro:~# /etc/init.d/nfs-kernel-server restart
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... [ OK ]
* Starting NFS kernel daemon [ OK ]
root@zorro:~#
root@zorro:~# showmount -e
Export list for zorro:
root@zorro:~# ps xua |grep dd
root 2 0.0 0.0 0 0 ? S 19:22 0:00 [kthreadd]
root 3536 3.8 0.0 12516 1736 pts/0 D 19:34 0:01 dd if=/dev/zero of=/mnt/nfsloopbacktest/testfile bs=1M
root 3615 0.0 0.0 9444 952 pts/0 S+ 19:34 0:00 grep --color=auto dd
root@zorro:~# ls /mnt/nfsloopbacktest
^C^Z
[[ WE ARE STUCK HERE, IN ANOTHER TERMINAL: ]]
root@zorro:~# zfs share -a
[[ BACK TO BUSINESS ]]
root@zorro:~#
@ryao mentioned zeventd might solve this in the future.