From owner-freebsd-hackers@freebsd.org Tue Apr 19 16:12:06 2016 Return-Path: Delivered-To: freebsd-hackers@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 659A5B143E4 for ; Tue, 19 Apr 2016 16:12:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAC4C1C25; Tue, 19 Apr 2016 16:12:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u3JGC1TO037594 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 19 Apr 2016 19:12:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u3JGC1TO037594 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u3JGC1x9037593; Tue, 19 Apr 2016 19:12:01 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 19 Apr 2016 19:12:01 +0300 From: Konstantin Belousov To: Ian Lepore Cc: BERTRAND Jo?l , freebsd-hackers@freebsd.org Subject: Re: Diskless workstation and some minor issues Message-ID: <20160419161201.GZ2422@kib.kiev.ua> References: <57163991.4000100@systella.fr> <1461075243.1232.9.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461075243.1232.9.camel@freebsd.org> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 16:12:06 -0000 On Tue, Apr 19, 2016 at 08:14:03AM -0600, Ian Lepore wrote: > On Tue, 2016-04-19 at 15:58 +0200, BERTRAND Jo?l wrote: > > Second trouble. /var/log/message contains a lot of : > > Apr 9 10:50:00 pythagore atrun[862]: cannot lock /var/at/jobs/: > > Permission denied > > > > > Of course, lockd and statd are running on nfs server. Permission on > > /var/at are : > > > > root@pythagore:/var/at # ls -al > > total 8 > > drwxr-xr-x 4 root wheel 512 Aug 12 2015 . > > drwxr-xr-x 28 root wheel 512 Apr 15 09:14 .. > > drwxr-xr-x 2 daemon wheel 512 Aug 12 2015 jobs > > drwxr-xr-x 2 daemon wheel 512 Aug 12 2015 spool > > root@pythagore:/var/at # > > > > > I don't understand where is the mistake. > > > > This is a more serious problem. I have found it to be impossible to > run a diskless workstation with a persistant /var mounted via NFS > (either by itself or as a directory within the nfs rootfs). It's been > this way for several years. You can add varmfs=yes to your rc.conf to > get a working system, but then you have a non-persistant /var which > really isn't very useful. > > Hmm, but the problems I usually have are with /var/run and pidfiles. > I've never noticed this /var/at problem (maybe just because I gave up > trying to run with an nfs-mounted /var before I noticed them). I successfully run with nfs-mounted /var (actually, part of the nfs-mounted root) on my test machines, with the following boot setting: boot.nfsroot.options="nolockd" What you need is the working advisory locks, but since /var is by its structure, private, there is no need to share locking with the server or other clients. nolockd makes the client kernel to handle adv locks autonomously, without lockd/statd protocol.