From owner-freebsd-fs@FreeBSD.ORG Thu Mar 8 16:01:39 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33DA21065670 for ; Thu, 8 Mar 2012 16:01:39 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id DDD408FC0C for ; Thu, 8 Mar 2012 16:01:38 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAF7XWE+DaFvO/2dsb2JhbABDFoUfsHCCCgEBAQQBAQEgKyALGxIGAgINGQIpAQkYDgYIBwQBGgIEh2kLqCWSLYEviGQVhTCBFgSIUopLgiiQGIMBgT4 X-IronPort-AV: E=Sophos;i="4.73,552,1325480400"; d="scan'208";a="159585448" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 08 Mar 2012 11:01:32 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 6CC00B3F67; Thu, 8 Mar 2012 11:01:32 -0500 (EST) Date: Thu, 8 Mar 2012 11:01:32 -0500 (EST) From: Rick Macklem To: Peter Maloney Message-ID: <1116960020.624724.1331222492424.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4F5861B7.7010201@brockmann-consult.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-fs@freebsd.org Subject: Re: Deadlock (?) with ZFS, NFS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 16:01:39 -0000 Peter Maloney wrote: > On 03/08/2012 07:02 AM, Garrett Wollman wrote: > > This is a 9.0-RELEASE system with the mps driver backported from > > 9-stable. Hourly and daily snapshots were enabled. It had been > > working extremely well up to this point, and we were looking at > > possibly replacing our existing NFS servers with this architecture. > On one system, (haven't tried it lately), it will hang a single > dataset > if a Linux *client* mounts the zfs dataset and does: > > cd /mount/point > ls .zfs/snapshot > > So try that and see if it reproduces the problem. > > Setting snapdir=hidden doesn't prevent accessing it, only hides it > from > "ls -a" output. > > The problem did not occur back when I had few or no snapshots. It also > doesn't happen on the replicated backup server, with all the same > software, data and snapshots. > > So far, my hack solution is to mount /var/empty on top of every .zfs > directory on the client side. Another idea is to never export a whole > dataset from the root of it, because that is the only place that > contains the .zfs directory, other than if you have subdatasets inside > that one. > There was a patch specifically for readdirplus, where it avoids doing a VFS_VGET() when EOPNOTSUPP is replied by VFS_VGET(). This apparently happens for ZFS snapshots. The patch went into head as r220507 almost a year ago (Apr. 9, 2011), so Garrett will have it, but you might not? Also, note that, if all your clients are FreeBSD and none of the mounts specify the "rdirplus" mount option, the patch isn't relevant, since the clients will never do a ReaddirPlus RPC. Although I am highly doubtful that it would be the cause of the above hang, you should apply this patch, which went into head recently: http://people.freebsd.org/~rmacklem/nfsd-enoent.patch Without it, Lookup RPCs are being done with ni_topdir uninitialized. For NFSv4 mounts to a UFS volume, it resulted in spurious ENOENT replies to Lookup. Since the ZFS code doesn't appear to use ni_topdir, I really doubt it would cause a hang, but strange things can occur when variables aren't properly initialized and the patch should be safe to use. Good luck with it. I don't know anything about ZFS, so I can't really help much, rick > > > -- > > -------------------------------------------- > Peter Maloney > Brockmann Consult > Max-Planck-Str. 2 > 21502 Geesthacht > Germany > Tel: +49 4152 889 300 > Fax: +49 4152 889 333 > E-mail: peter.maloney@brockmann-consult.de > Internet: http://www.brockmann-consult.de > -------------------------------------------- > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"