Problem with zfsloader on 9.2-BETA2

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Fri Aug 2 06:36:16 UTC 2013


On Wed, 31 Jul 2013 12:12-0400, J David wrote:

> On Wed, Jul 31, 2013 at 5:20 AM, Trond Endrestøl
> <Trond.Endrestol at fagskolen.gjovik.no> wrote:
> > I'm curious as to why you use da?p1 as the freebsd-zfs partitions.
> 
> Those are whole-disk partitions.
> 
> > Where does the freebsd-boot partition reside? da?p2?
> 
> Only the log and cache disks have boot and swap partitions.
> 
> > What does the "gpart show" command tell you?
> 
> $ gpart show
> =>      34  63078333  da0  GPT  (30G)
>         34       128    1  freebsd-boot  (64k)
>        162   4194304    2  freebsd-swap  (2.0G)
>    4194466  58883901    3  freebsd-zfs  (28G)
> 
> =>      34  62499933  da1  GPT  (29G)
>         34       128    1  freebsd-boot  (64k)
>        162   4194304    2  freebsd-swap  (2.0G)
>    4194466  58305501    3  freebsd-zfs  (27G)
> 
> =>        34  1953525101  da2  GPT  (931G)
>           34         222       - free -  (111k)
>          256  1953508495    1  freebsd-zfs  (931G)
>   1953508751       16384    9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
> 
> da3 - da7 are identical to da2.
> 
> So maybe it's a little weird that our boot blocks are on our
> ZLOG/L2ARC devices, rather than our data devices?
> 
> But since gptloader (and the old zfsloader) handle this just fine.
> 
> > I'll let you know how well I fared.
> 
> Thanks!

Due to the limitations of VirtualBox, I had to modify my experiment 
slightly. Instead of using 8 virtual drives as I had originally 
planned, I had to cut things down to 4 disks and mirrored 
configuration rather than raidz2. VirtualBox' BIOS makes only the four 
first drives visible to the boot loaders, even on VBox 4.2.16.

I erected GPT on all four drives, all of size 20G. I made da0p1 and 
da1p1 into freebsd-boot partitions, both of size 128K, the largest 
size currently permitted by the boot loaders. da0p2 and da1p2 was made 
into freebsd-swap partitions, each of size 4G. da0p3 and da1p3 became 
freebsd-zfs partitions using the remaining free space, 16G. da{2,3}p1 
became whole-disk freebsd-zfs partitions.

The pool data was created using this configuration:

zpool create -O checksum=fletcher4 -O mountpoint=legacy -o cachefile=/tmp/zpool.cache data mirror da2p1 da3p1 log da0p3 cache da1p3

The cache file is probably superfluous by now, but out of old habit I 
sticked to it.

The pool was then filled with the ZFS layout I use nowadays:

data/ROOT (legacy)
data/ROOT/20130602-r251259 (inherited)
data/home (/home)
data/tmp (/tmp)
data/usr (inherited)
data/usr/compat (inherited)
data/usr/compat/linux (/usr/compat/linux)
data/usr/local (/usr/local)
data/usr/local/certs (inherited)
data/usr/local/etc (inherited)
data/usr/local/pgsql (inherited)
data/usr/local/www (inherited)
data/usr/obj (/usr/obj)
data/usr/ports (/usr/ports)
data/usr/ports/distfiles (inherited)
data/usr/ports/packages (inherited)
data/usr/ports/workdirs (inherited)
data/usr/src (/usr/src)
data/var (/var)
data/var/backups (inherited)
data/var/crash (inherited)
data/var/db (inherited)
data/var/db/mysql (inherited)
data/var/db/pkg (inherited)
data/var/db/ports (inherited)
data/var/empty (inherited)
data/var/log (inherited)
data/var/mail (inherited)
data/var/named (inherited)
data/var/run (inherited)
data/var/tmp (inherited)

The final mountpoints are shown in brackets, I used temporary 
mountpoints rooted at /tmp/zroot during installation from the DVD 
image.

Next, I installed 8.4-RELEASE onto data/ROOT/20130602-r251259 and used 
the boot blocks from /dist/boot on the DVD, updated the bootfs 
property, and rebooted.

I got hold of stable/8, compiled world and kernel, installed this onto 
a separate boot environment, data/ROOT/20130801-r253856, a clone of 
the previous BE. I updated the boot blocks with pmbr and gptzfsboot 
from the new BE, updated the bootfs property, and rebooted. So far, so 
good.

Next, I got hold of stable/9, nuked /usr/obj/*, compiled world and 
kernel, installed this onto a new BE, data/ROOT/20130801-r253863, a 
clone of the preceeding BE, updated the boot blocks from the new BE, 
updated the bootfs property, and rebooted. Still worked like a charm.

This experiment could be invalid as I used mirror instead of raidz2, 
and because I updated the boot blocks at every step.

I'll try the 8.4-R -> 9.2-BETA2 route later this afternoon, and avoid 
updating the boot blocks with the ones from 9.2-BETA2. That leaves the 
raidz2 configuration unexplored.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-stable mailing list