Multiple ZFS pools and booting

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Jan 16 19:07:25 UTC 2011


On Fri, Jan 14, 2011 at 02:31:11PM +0100, Marcus Müller wrote:
> Hi all,
> 
> I have a single harddrive with GPT partitioning:
> 
> root at muller:(~)# gpart show
> =>       34  234441581  ad10  GPT  (112G)
>          34        128     1  freebsd-boot  (64K)
>         162    8388608     2  freebsd-swap  (4.0G)
>     8388770   10485760     3  freebsd-zfs  (5.0G)
>    18874530   10485760     4  freebsd-zfs  (5.0G)
>    29360290  102540662     5  freebsd-zfs  (49G)
>   131900952  102540662     6  freebsd-zfs  (49G)
>   234441614          1        - free -  (512B)
> 
> ad10p3/ad10p4 (tank) and ad10p5/ad10p6 (muller) are two mirror zpools. The root filesystem currently resides on tank.
> 
> I wanted to migrate the root filesystem from tank to muller by changing the mountpoints accordingly and resetting the bootfs zpool propery on tank like this:
> 
> root at muller:(~)# zpool get bootfs muller
> NAME    PROPERTY  VALUE                   SOURCE
> muller  bootfs    muller/roots/8-current  local
> root at muller:(~)# zpool set bootfs= tank
> root at muller:(~)# zpool get bootfs tank
> NAME  PROPERTY  VALUE   SOURCE
> tank  bootfs    -       default
> 
> But when I reboot, BTX loader tries to access tank:/boot/kernel/kernel.
> 
> Why does the loader care about tank at all, after I "removed" the bootfs property?
> Do I have to export tank before I reboot?
> How do I tell the loader to just care about muller for booting?

There is no way to configure that at this point. The boot code just
boots off of first pool it finds - if there is no bootfs property then
it will just try to boot from the top level dataset (ie. tank).

What you could try is to add /tank/boot.config file containing:

	muller:/boot/loader

and if that doesn't work:

	muller/roots/8-current:/boot/loader

and if that doesn't work I don't know of any other solutions.

Exporting the tank pool will work (for now), but it looks like it will
be changed to accept exported pools for booting and skip only destroyed
pools.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110116/47e1853f/attachment.pgp


More information about the freebsd-fs mailing list