From owner-freebsd-stable@FreeBSD.ORG Tue Oct 30 15:32:46 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A781E67 for ; Tue, 30 Oct 2012 15:32:46 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id F211C8FC08 for ; Tue, 30 Oct 2012 15:32:45 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [172.17.17.101]) by email1.allantgroup.com (8.14.5/8.14.5) with ESMTP id q9UFVgI4033118 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Oct 2012 10:31:42 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id q9UFVg8c072159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Oct 2012 10:31:42 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id q9UFVgbs072157; Tue, 30 Oct 2012 10:31:42 -0500 (CDT) (envelope-from dan) Date: Tue, 30 Oct 2012 10:31:42 -0500 From: Dan Nelson To: jb Subject: Re: tmpfs nfs exports? Message-ID: <20121030153142.GA21003@dan.emsphone.com> References: <508FA008.2040503@mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 8.3-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.6 at email1-new.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (email1.allantgroup.com [172.17.19.78]); Tue, 30 Oct 2012 10:31:42 -0500 (CDT) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on email1.allantgroup.com X-Scanned-By: MIMEDefang 2.73 Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 15:32:46 -0000 In the last episode (Oct 30), jb said: > Alfred Perlstein mu.org> writes: > > Hey folks, any reason why not to include the following patch in 9.1? It > > would be nice to have tmpfs be exportable. > > > > I'm good to commit it, I can also wait until post 9.1. > > ... > > How do you identify tmpfs ? With fsid ? > > Since nfs server is stateless, are these exports identical ? > export /tmp, reboot, export /tmp > > What about /tmp on tmpfs ? > export /tmp, reboot, export /tmp I wanted to do the exact same thing a few years ago. I patched mdmfs and the startup scripts to allow for an fsid value to be passed to mdmfs on every reboot. That works for the filesystem itself, but then you have to contend with the random NFS generation number on every inode. I decided it wasn't worth the trouble at that point. If you really want an exportable /tmp, just live with the fact that you'll get ESTALE errors on all clients when you reboot the server. Maybe giving the root inode a constant generation number is all that's needed, since I suppose most clients that have mounted the server don't actually have any open filehandles. -- Dan Nelson dnelson@allantgroup.com