From owner-freebsd-current@FreeBSD.ORG Thu Oct 22 17:49:52 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461851065670 for ; Thu, 22 Oct 2009 17:49:52 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-vw0-f189.google.com (mail-vw0-f189.google.com [209.85.212.189]) by mx1.freebsd.org (Postfix) with ESMTP id EEBB18FC08 for ; Thu, 22 Oct 2009 17:49:51 +0000 (UTC) Received: by vws27 with SMTP id 27so3359473vws.3 for ; Thu, 22 Oct 2009 10:49:51 -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=UCTRjIWpwUfFJqrmkx9yQs5i5jFOphaUnC8qYpU9geY=; b=Fx4fkYomToP8GMfwD6PLOCGd2/xPjB4fKnGsNVG95nKRpsN7ZavrBppMDRVUkeDGip sZRdaqP8HalpC9tiQobGZo/wQSTMqr/88LVliD1vQGKEKHy03cOkxHAk1H3ML3UaGX+v mDCzC3rMVGG777QOIjcQZHK6+Z/YSKSjidzZU= 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=qNurmtfKUlD4m8MFzNyry+FKnoFYRkxPg6sn3hMMoMl8Rtn6PyIC53WZN/4zbDKjFR SEGAsvD+QeSR/isZM2+68d+jVquyVOMx0toBL7BikJzOeUeVQ2USDglfhDhwZFnsgTFk bQ89jhI4kkjfV1FvcGe3a5S1hgxXFeLPdCick= MIME-Version: 1.0 Received: by 10.220.127.2 with SMTP id e2mr4811338vcs.10.1256233790243; Thu, 22 Oct 2009 10:49:50 -0700 (PDT) In-Reply-To: <4AE01342.4000303@ish.com.au> References: <4ADE995A.8080009@ish.com.au> <1256174188.2309.22.camel@balrog.2hip.net> <4ADFCFF3.1030201@ish.com.au> <790a9fff0910220001m3d7df03j127b51d7d0696271@mail.gmail.com> <4AE01342.4000303@ish.com.au> Date: Thu, 22 Oct 2009 12:49:50 -0500 Message-ID: <790a9fff0910221049n130c5b00x66071a5a718eb6ab@mail.gmail.com> From: Scot Hetzel To: Aristedes Maniatis Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: gpart, bsdlabel and fdisk X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 17:49:52 -0000 On Thu, Oct 22, 2009 at 3:09 AM, Aristedes Maniatis wrote: > On 22/10/09 6:01 PM, Scot Hetzel wrote: >> >> http://wiki.freebsd.org/RootOnZFS >> >> If anyone notices a problem with them, either let me know or update >> the wiki page. > > That's very helpful, thanks Scot. It raises some questions: > > * you don't have the instruction to perform "echo 'a 1' | fdisk -f - > /dev/ad4" which Robert recommends > Since I had created the ZFS Root on a disk that already had partions on it, and Windows will mark it's partition active, I didn't need this step for the MBR disk. The GPT disk didn't need it either when I had set it up on a extra harddrive on my laptop. I prefer to use: # gpart set -a active -i 1 ad4 Just to make it so that only gpart is needed to setup the system. > * Robert recommends GPT as the "easiest way to get ZFS on root working". > Your instructions seem to lean more toward MBR "The advantage of using a = MBR > disk is that you can still dual boot with other Operating Systems.". Are > there any downsides of using MBR which should be explained? > It wasn't supposed to lean either way. It's just that if you need to boot multiple Operating Systems, then a MBR disk was easier to get configured. Recently, I had found ways to multi boot different Operating Systems on GPT using a Hybrid GPT/MBR scheme. I haven't had time to look to see if gpart can create this kind of disk, and if we have a pmbr, gptboot, or gptzfsboot that can be used to select which Operating System to boot. The other option would be to use GRUB. > * I've seen posts here (sorry I don't have one handy) which recommend to = not > put swap on ZFS. Apart from crash dumps are there any other reasons to > prefer one over the other? Your instructions explain both, without giving > much of a guide about why you'd choose one. Is a 'native' swap faster tha= n > one on ZFS? > The reason I choose a swap partition over a ZFS swap VOL is that problems can occur when the ZFS filesystem starts to run out of room. > * you write LOADER_ZFS_SUPPORT=3DYES to src.conf, while previous instruct= ion > in this thread had it written to make.conf > While make.conf can still be used, it is currently shared between ports and src. src.conf is the new location to place all src build options. > * In order to follow http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror > will you need to run this from the live CD rather than the first install = CD? > > * At the top of the same page you give instructions for creating boot, sw= ap > and zfs partitions. But your instructions give block sizes very specific = to > your disks. It would be helpful to have something like: > > =A0gpart add -b 34 -s 128 -t freebsd-boot ad0 =A0 (why 34? this is a diff= erent > magic number to other magic numbers I've seen suggested) Sector 34 is the first available sector after the Primary GPT Header. See http://en.wikipedia.org/wiki/GUID_Partition_Table for a diagram of the GUID Partition Table Scheme. > =A0gpart add -b 162 -s 8G -t freebsd-swap ad0 =A0 (the 8G is more readabl= e than > specifying in sectors) > All the guides I had read regarding creating partitions with gpart had used # sectors instead of specifying the size as 8G. According to Oliver Roberts ZFS guide (see http://www.keltia.net/howtos/zfsboot), in order to create a 512MB swap, you have to double the number to get 1G. > or even > > =A0gpart add -b 162 -s 8G -t freebsd-swap -l swap-ad0 ad0 =A0(the human r= eadable > label appears to be a nice feature of GPT) > Adding a label to the partition is another addition I was going to make, as I have several e-mails from the -CURRENT or -STABLE list that suggest using labels when creating ZFS pool instead of the device names, as it would make replacing drives easier. Scot