From owner-freebsd-fs@FreeBSD.ORG Mon Apr 9 09:43:35 2007 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D6B816A40E; Mon, 9 Apr 2007 09:43:35 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 9E57113C46E; Mon, 9 Apr 2007 09:43:34 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E8AA2487FF; Mon, 9 Apr 2007 11:43:32 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C5E21487F0; Mon, 9 Apr 2007 11:43:27 +0200 (CEST) Date: Mon, 9 Apr 2007 11:43:19 +0200 From: Pawel Jakub Dawidek To: freebsd-current@FreeBSD.org Message-ID: <20070409094319.GB76673@garage.freebsd.pl> References: <20070409011723.GB74547@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UHN/qo2QbUvPLonB" Content-Disposition: inline In-Reply-To: <20070409011723.GB74547@garage.freebsd.pl> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org Subject: Re: ZFS: amd64, devd, root file system. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2007 09:43:35 -0000 --UHN/qo2QbUvPLonB Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 09, 2007 at 03:17:23AM +0200, Pawel Jakub Dawidek wrote: > 3. It is now possible to have root file system on ZFS. You would still > need UFS for your /boot/ file system. Let me explain how this suppose to work. You have ad0 disk. Create one slice covering entire disk: # fdisk -BI /dev/ad0 Initialize BSDlabel: # bsdlabel -wB /dev/ad0s1 Edit your label and create small (like 256MB-512MB) 'a' partition and use the rest for 'd' partition: # bsdlabel -e /dev/ad0s1 'd' partition will be used for ZFS: # zpool create tank ad0s1d Create UFS file system on /dev/ad0s1a and copy /boot/ directory in there: # newfs /dev/ad0s1a # mount /dev/ad0s1a /mnt/tmp # cp -Rp /boot/* /mnt/tmp/ Note that there is no /boot/ directory on ad0s1a yet. This is one of the two possibilities. You now need to create symlink: # cd /mnt/tmp # ln -s . boot =46rom what I checked our loader should handle symlinks just fine. This will allow us to mount /dev/ad0s1a on /boot directory and use it as usual. Another option is to: # cp -Rp /boot /mnt/tmp/ and in the future mount /dev/ad0s1a on eg. /bootdisk and create symlink: # ln -s bootdisk/boot /boot All in all, you should see your kernel when you do: # ls -l /mnt/tmp/boot/kernel Now don't forget to add zfs_load=3D"YES" to /mnt/tmp/boot/loader.conf. Ok, you also need to tell your loader where your root file system is. You can do it by adding: vfs.root.mountfrom=3D"zfs:tank" to /mnt/tmp/boot/loader.conf or you can create /mnt/tmp/etc/fstab file with one entry only: tank / zfs rw 0 0 On your ZFS file system, your /etc/fstab should contains the line above and: /dev/ad0s1a /boot ufs rw 0 0 (and everything else, ie. your swap and other file systems) --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --UHN/qo2QbUvPLonB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGGgq3ForvXbEpPzQRAmlbAKDspksBGqObSZy1iCUqWDfGIkwGZwCgkrsV RsDmcIlojnNaF2KCDzFTesA= =+ZEQ -----END PGP SIGNATURE----- --UHN/qo2QbUvPLonB--