From owner-freebsd-questions@FreeBSD.ORG Tue Feb 15 16:31:25 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6465916A4CE for ; Tue, 15 Feb 2005 16:31:25 +0000 (GMT) Received: from prosporo.hedron.org (hedron.org [66.11.182.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA46B43D48 for ; Tue, 15 Feb 2005 16:31:24 +0000 (GMT) (envelope-from ean@hedron.org) Received: from www.hedron.org (localhost.hedron.org [127.0.0.1]) by prosporo.hedron.org (Postfix) with ESMTP id 14664C108; Tue, 15 Feb 2005 11:31:28 -0500 (EST) Received: from 216.220.59.169 (SquirrelMail authenticated user ean); by www.hedron.org with HTTP; Tue, 15 Feb 2005 11:31:28 -0500 (EST) Message-ID: <3112.216.220.59.169.1108485088.squirrel@216.220.59.169> In-Reply-To: <42122150.9030300@locolomo.org> References: <20050215142237.GC56849@fw.farid-hajji.net> <42122150.9030300@locolomo.org> Date: Tue, 15 Feb 2005 11:31:28 -0500 (EST) From: "Ean Kingston" To: "Erik Norgaard" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal cc: cpghost@cordula.ws cc: freebsd-questions@freebsd.org Subject: Re: Diskless NFS mounts weirdness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 16:31:25 -0000 > cpghost@cordula.ws wrote: > >> 1. /var *is* actually mounted on >> 192.168.122.1:/pool/diskless_rw/192.168.122.11/var >> but it is not listed in mount(8)s output. Why? >> >> 2. Which part of the system created /dev/md0 and mounted that >> on /var? I don't need that and would like to save some RAM >> anyway. > > I guess you are using 5.3 or newer? the /etc/rc.d/diskless script has > been replaced, by among other things, a script /etc/rc.d/var which > creates a memory disk, /dev/md0, using up your precious ram. > > I have tried to remove the script but get an error because nfs wants to > update the /var/db/mounttab - before /var is actually mounted - so the > mount fails. > > The /etc/rc.d/var script creates a memory disk if it detects that /var > is read-only - which is the case since the nfs mount failed. And the > memory disk is then populated. > > If the root partition is rw-mounted the nfs-mount will succeed. > > If you have enough ram this is not a problem, simply let var be a memory > disk. You can set the size of the memory disk in rc.conf. > > > /dev/md0 on /var (ufs, local, soft-updates) > > 192.168.122.1:/pool/diskless_rw/192.168.122.11/var on /var (nfs) > > Now this is wierd - how can you have to mounts on the same mount point? Wierd yes, but very easy to do. A mount point is just a directory. That directory does not have to be empty. First /dev/md0 was mounted, then the NFS share was mounted. So, the NFS share is what is being used as /var. This indicates poor design (or an error). -- Ean Kingston E-Mail: ean_AT_hedron_DOT_org URL: http://www.hedron.org/