From owner-freebsd-questions@FreeBSD.ORG Tue Feb 15 14:26:40 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 3C0C516A4CE for ; Tue, 15 Feb 2005 14:26:40 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9735E43D48 for ; Tue, 15 Feb 2005 14:26:39 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (net4801-2 [192.168.254.1]) by fw.farid-hajji.net (Postfix) with ESMTP id 1DB374B8D5; Tue, 15 Feb 2005 15:22:38 +0100 (CET) Date: Tue, 15 Feb 2005 15:22:37 +0100 From: cpghost@cordula.ws To: freebsd-questions@freebsd.org Message-ID: <20050215142237.GC56849@fw.farid-hajji.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: 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 14:26:40 -0000 Hi, I've set up a pool of diskless workstations loosely following the instructions in http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html Everything runs just fine, except for one weirdness with mount and /var: % mount 192.168.122.1:/var/diskless_ro on / (nfs, read-only) devfs on /dev (devfs, local) 192.168.122.1:/pool/diskless_rw/192.168.122.11/etc on /etc (nfs) /dev/md0 on /var (ufs, local, soft-updates) 192.168.122.1:/pool/diskless_rw/192.168.122.11/tmp on /tmp (nfs) 192.168.122.1:/pool/diskless_rw/home on /home (nfs) 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. It is possible to manually mount /var after booting the workstation, though it doesn't seem to be necessary. All this does is add one line to mount's output: # mount /var % mount 192.168.122.1:/var/diskless_ro on / (nfs, read-only) devfs on /dev (devfs, local) 192.168.122.1:/pool/diskless_rw/192.168.122.11/etc on /etc (nfs) /dev/md0 on /var (ufs, local, soft-updates) 192.168.122.1:/pool/diskless_rw/192.168.122.11/tmp on /tmp (nfs) 192.168.122.1:/pool/diskless_rw/home on /home (nfs) 192.168.122.1:/pool/diskless_rw/192.168.122.11/var on /var (nfs) More details: ------------- The first rc script to run is: ---------------------------------------- server# cat /var/diskless_ro/etc/rc #!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH boot_ip=`kenv boot.netif.ip` mount -t nfs 192.168.122.1:/pool/diskless_rw/${boot_ip}/var /var mount -t nfs 192.168.122.1:/pool/diskless_rw/${boot_ip}/etc /etc mount -t nfs 192.168.122.1:/pool/diskless_rw/${boot_ip}/tmp /tmp mount -t nfs 192.168.122.1:/pool/diskless_rw/home /home . /etc/rc2 exit 0 ---------------------------------------- We see that /var is (or should be) mounted from the NFS server. This is then followed by rc2, which is nothing more than a copy of the regular /etc/rc, adapted for every single diskless client. Every client has its own fstab, e.g.: server# cat /pool/diskless_rw/192.168.122.11/etc/fstab # Device Mountpoint FStype Options Dump Pass# 192.168.122.1:/var/diskless_ro / nfs ro 0 0 192.168.122.1:/pool/diskless_rw/192.168.122.11/etc /etc nfs rw 0 0 192.168.122.1:/pool/diskless_rw/192.168.122.11/var /var nfs rw 0 0 192.168.122.1:/pool/diskless_rw/192.168.122.11/tmp /tmp nfs rw 0 0 192.168.122.1:/pool/diskless_rw/home /home nfs rw 0 0 All this is not terribly important (as said, everything works just fine), but if someone has already experimented with diskless workstations... :) Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/