From owner-freebsd-net@freebsd.org Tue Aug 2 22:55:04 2016 Return-Path: <owner-freebsd-net@freebsd.org> Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BD23BAC388 for <freebsd-net@mailman.ysv.freebsd.org>; Tue, 2 Aug 2016 22:55:04 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51BE71383 for <freebsd-net@freebsd.org>; Tue, 2 Aug 2016 22:55:04 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from <slw@zxy.spb.ru>) id 1bUiaU-0008wX-Gl; Wed, 03 Aug 2016 01:55:02 +0300 Date: Wed, 3 Aug 2016 01:55:02 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: Is NFSv4 mount interruptible? Message-ID: <20160802225502.GO8192@zxy.spb.ru> References: <20160802223728.GN8192@zxy.spb.ru> <YTXPR01MB049518E305D351F36900774FDD050@YTXPR01MB0495.CANPRD01.PROD.OUTLOOK.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <YTXPR01MB049518E305D351F36900774FDD050@YTXPR01MB0495.CANPRD01.PROD.OUTLOOK.COM> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: <locally generated> X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/> List-Post: <mailto:freebsd-net@freebsd.org> List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 02 Aug 2016 22:55:04 -0000 On Tue, Aug 02, 2016 at 10:48:52PM +0000, Rick Macklem wrote: > Slawa wrote: > >I have autofs NFSv4 mount with /etc/nfs.map: > > > >/NFS -nfsv4,intr,soft,sec=krb5i,gssname=host storage01:/ > > > >Currently I am see NFS hung and I am can't kill shell and can't > >unmount /NFS. > > > >Is NFSv4 mount interruptible? > >Or intr support only by NFSv3? > Well, in the BUGS section of "man mount_nfs" it notes that soft and intr cannot be > safely used with NFSv4. The problem is that, if an RPC that updates state (Open, Close,...) > terminates, then the state is no longer usable. > > You can "umount -f" the file system, but only if no other "umount" is already in progress. > (I am working on a new umount option that will allow "umount -f" to succeed when another > umount is stuck. It requires "umount(8)" to avoid all the path checking, etc.) > > Personally, I would never use "soft" for any mount (except read-only maybe), since it can > result in a write failure when the NFS server is slow. Using "intr" should be ok for NFSv3, > since it is stateless. For me, this mount like r/o. I am don't have significant write to this mount. If some data lost I am able to create this data again. Currently NFS hang after long idle. I am try to do umount, w/o success: # ps -ax | grep mou 706 - Is 0:00.00 /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid 1116 - Ds 1:16.50 /usr/sbin/autounmountd 86794 3- T+ 0:00.00 umount -f /NFS # procstat 86794 PID PPID PGID SID TSID THR LOGIN WCHAN EMUL COMM 86794 86791 86794 86788 86788 1 admin autofsvl FreeBSD ELF64 umount # procstat 1116 PID PPID PGID SID TSID THR LOGIN WCHAN EMUL COMM 1116 1 1116 1116 0 1 root newnfs FreeBSD ELF64 autounmountd