Description of problem: There appears to be a bug in nfs-utils which causes unmount requests to mountd to be attempted via TCP even when an NFS filesystem is mounted via UDP. In cases where the NFS server's mountd implementation only supports UDP, this causes unmounts to fail, unless '-f' is passed to umount/umount.nfs. Version-Release number of selected component (if applicable): 1.0.9-40.el5 How reproducible: Always. Steps to Reproduce: 1. Mount an NFS filesystem via UDP from a server which only supports UDP mountd operations. 2. Attempt to unmount the filesystem. 3. Actual results: The following error messages are reported by umount/umount.nfs, and the filesystem remains mounted: umount.nfs: server.mydomain:/fs: not found / mounted or server not reachable umount.nfs: server.mydomain:/fs: not found / mounted or server not reachable Expected results: The filesystem should be unmounted. Additional info: I believe this issue is caused by umount.nfs' invocation of hasmntopt() with an invalid /proc/mounts NFS mount option ("udp", rather than "proto=udp"). A patch which seems to correct the problem is attached.
Created attachment 354905 [details] Patch which resolves the issue
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
This request was erroneously denied for the current release of Red Hat Enterprise Linux. The error has been fixed and this request has been re-proposed for the current release.
reproduced on nfs-utils-1.0.9-51.el5: [root@nec-em24-1 ~]# rpm -qa|grep nfs-utils nfs-utils-1.0.9-51.el5 nfs-utils-lib-1.0.8-7.6.el5 [root@nec-em24-1 ~]# mount -t nfs -o proto=udp localhost:/tmp /mnt ... localhost:/tmp /mnt nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=udp,timeo=11,retrans=2,sec=sys,addr=localhost 0 0 [root@nec-em24-1 ~]# umount /mnt [root@nec-em24-1 ~]# mount -t nfs -o proto=udp localhost:/tmp /mnt [root@nec-em24-1 ~]# vim /var/log/messages [root@nec-em24-1 ~]# umount /mnt -vvv Trying to umount /mnt mount: trying 127.0.0.1 prog 100005 vers 1 prot tcp port 688 verified patch nfs-utils-1.0.9-mount-udp-only.patch is been applied in nfs-utils-1.0.9-52.el5, and test results are fine by testing on i386 and x86_64: [root@hp-dl2x170g6-01 redhat]# rpm -qa|grep nfs-utils nfs-utils-lib-1.0.8-7.6.el5 nfs-utils-1.0.9-52.el5 [root@hp-dl2x170g6-01 redhat]# cat /etc/exports /tmp *(rw) [root@hp-dl2x170g6-01 redhat]# mount -t nfs -o proto=udp localhost:/tmp /mnt [root@hp-dl2x170g6-01 redhat]# cat /proc/mounts localhost:/tmp /mnt nfs rw,vers=3,rsize=32768,wsize=32768,hard,proto=udp,timeo=11,retrans=2,sec=sys,addr=localhost 0 0 [root@hp-dl2x170g6-01 redhat]# umount /mnt -vvv Trying to umount /mnt mount: trying 127.0.0.1 prog 100005 vers 1 prot udp port 610 localhost:/tmp umounted
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1048.html