From owner-freebsd-stable@FreeBSD.ORG Sat Feb 28 04:43:04 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73D861065670 for ; Sat, 28 Feb 2009 04:43:04 +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 2A98F8FC15 for ; Sat, 28 Feb 2009 04:43:03 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id n1S4Cn4W089895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Feb 2009 22:12:50 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id n1S4Cmel033568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Feb 2009 22:12:49 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id n1S4Clnl033554; Fri, 27 Feb 2009 22:12:47 -0600 (CST) (envelope-from dan) Date: Fri, 27 Feb 2009 22:12:47 -0600 From: Dan Nelson To: Matthew Dillon Message-ID: <20090228041247.GJ45976@dan.emsphone.com> References: <4E614185-A54E-43B8-8C07-4BA901DE5861@drsns.com> <49A84B63.5080903@delphij.net> <200902280321.n1S3LFxR018622@apollo.backplane.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200902280321.n1S3LFxR018622@apollo.backplane.com> X-OS: FreeBSD 7.1-STABLE User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Fri, 27 Feb 2009 22:12:50 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-stable@freebsd.org Subject: Re: ZFS root File System X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 04:43:04 -0000 In the last episode (Feb 27), Matthew Dillon said: > My experience with one of our people trying to do the same thing w/ > HAMMER... we got it working, but it is not necessarily cleaner. > > I'd rather just boot from a small UFS /boot partition on 'a' (256M or > 512M), followed by swap on 'b', followed by the big-ass root partition on > 'd' using your favorite filesystem. > > The boot code already pretty much handles this state of affairs, one only > needs: > > (1) To partition it this way. > > (2) Add line to /boot/loader.conf pointing the kernel at the actual root, > e.g. (in my case): > > vfs.root.mountfrom="hammer:ad6s1d" > > (3) Adjust sysctl kern.bootfile in e.g. /etc/sysctl.conf. Since the > boot loader thinks the kernel is on / instead of /boot (because > /boot is the root from the point of view of the bootloader), it might > set this to "/kernel" instead of "/boot/kernel". So you may have to > override it to make crash dumps and name lists work properly. > > (4) Add a mount for the little /boot partition in /etc/fstab. I find it better (and easier to recover if something bad happens) if you create a /.boot filesystem with /boot and copies of /{bin,sbin,lib,libexec,etc} from your root partition, then symlink /boot in your root partition to /.boot/boot. That way you have a minimal system with recovery tools in case your non-UFS root has problems of any sort, and /boot always points to what you (and makefiles) think it should. If you have root on mirrored disks, you can gmirror /.boot too. Works great for ZFS; should work for HAMMER. -- Dan Nelson dnelson@allantgroup.com