From owner-freebsd-stable@FreeBSD.ORG Tue May 26 09:47:23 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 2F279106564A for ; Tue, 26 May 2009 09:47:23 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id B16F88FC16 for ; Tue, 26 May 2009 09:47:22 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: by fxm12 with SMTP id 12so3782613fxm.43 for ; Tue, 26 May 2009 02:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PoKlEPn2NOpPP5VKgpH4tCcbWf0xlTPnR47pfAVb+lw=; b=kN6411X3sdBGCE6JS5rqn9efv+lPXMr5aLlPdRHuu5Xzy4wL498y7Mq8zp3fPf6Z/W 1Acs6fBSetOKaS5t7DztKpIJoXMO9GJ9reWoTjNiZ9jj17t0ZNuajkVaRf9ksEikEkR+ iBlr3qShystDwz3AVzMkQBPMKf+JwFSC6Holk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=gtQLlSqma24HoamXaAi6eQouu0OqsqZ1aKpWHHG8hOFtcDdZ4ya5171dhe0V1WQObV DWsJWgCU/+lZmkXBKDHtvHlWBXwOmx1OIQov1zyT3Nmsvi4ebvoLsOmL/GfIY8p7yqVb Zv9cJpdZbqBo6p2m+ee8pM3nQKPENfckAcOuA= MIME-Version: 1.0 Received: by 10.86.26.11 with SMTP id 11mr6670919fgz.45.1243329966457; Tue, 26 May 2009 02:26:06 -0700 (PDT) In-Reply-To: <4A1B0B4F.1020106@h3q.com> References: <29579856-69F7-4CDC-A52A-B414A40180ED@yellowspace.net> <4A1B0B4F.1020106@h3q.com> Date: Tue, 26 May 2009 11:26:06 +0200 Message-ID: From: Mickael MAILLOT To: Philipp Wuensche Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Lorenzo Perone , FreeBSD Stable Mailing List Subject: Re: ZFS boot on zfs mirror 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: Tue, 26 May 2009 09:47:23 -0000 Hi, i prefere use zfsboot boot sector, an example is better than a long talk: $ zpool create tank mirror ad4 ad6 $ zpool export tank $ dd if=3D/boot/zfsboot of=3D/dev/ad4 bs=3D512 count=3D1 $ dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 count=3D1 $ dd if=3D/boot/zfsboot of=3D/dev/ad4 bs=3D512 skeep=3D1 seek=3D1024 $ dd if=3D/boot/zfsboot of=3D/dev/ad6 bs=3D512 skeep=3D1 seek=3D1024 $ zpool import tank $ zpool set bootfs=3Dtank tank $ zfs set mountpoint=3Dlegacy tank add vfs.root.mountfrom=3D"zfs:tank" to your loader.conf now you can boot on ad4 or ad6 Source: http://www.waishi.jp/~yosimoto/diary/?date=3D20080909 2009/5/25 Philipp Wuensche : > Lorenzo Perone wrote: >> >> Hello to all, >> >> Having licked blood now, and read the news from Kip Macy about >> >>> - =A0zfs boot for all types now works >> >> >> I was wondering if anyone has some updated tutorial on how to achieve a >> zfs-only bootable FreeBSD with a mirrored zpool. > > My own howto and script to do the stuff automated: > http://outpost.h3q.com/patches/manageBE/create-FreeBSD-ZFS-bootfs.txt > > But beware, it is meant to use with > http://anonsvn.h3q.com/projects/freebsd-patches/wiki/manageBE > afterwards. But the steps are the same. > >> Searching around I found this tutorial on how to set up a ZFS bootable >> system, which is mostly straightforward: >> >> http://blogs.freebsdish.org/lulf/2008/12/16/setting-up-a-zfs-only-system= / >> >> However it leaves a few questions open... How am I supposed to make a >> zfs mirror out of it? Suppose I have ad4 and ad6, should I repeat the >> exact same gpart-steps for both ad4 and ad6, and then make a zpool >> create data mirror ad4p3 ad6p3? > > Exactly. > >> How about swap? I suppose it will be on >> one of the disks? > > I keep swap in a seperate partition. You could either use two swap > partition, each on one disk or use gmirror to mirror a single swap > partition to be safe from disk crash. > >> And what if I start with one disk and add the second >> one later with zpool attach? > > This will work. Just do the same gpart commands on the second disk and > use zpool attach. > > greetings, > philipp > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >