Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2009 12:49:50 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Aristedes Maniatis <ari@ish.com.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: gpart, bsdlabel and fdisk
Message-ID:  <790a9fff0910221049n130c5b00x66071a5a718eb6ab@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 22, 2009 at 3:09 AM, Aristedes Maniatis <ari@ish.com.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0910221049n130c5b00x66071a5a718eb6ab>