Overriding the zpool bootfs property from the loader?
krad
kraduk at gmail.com
Sat Mar 24 13:11:12 UTC 2012
On 23 March 2012 14:01, Florian Wagner <florian at wagner-flo.net> wrote:
> On Fri, 23 Mar 2012 13:12:45 +0000
> Matthew Seaman <matthew at FreeBSD.org> wrote:
>
>> On 23/03/2012 12:15, Florian Wagner wrote:
>> > I've recently discussed more or less the same on this list. The
>> > thread is called "Extending zfsboot.c to allow selecting filesystem
>> > from boot.config" and available in the mailing list archives of
>> > October, November 2011 and Januar 2012.
>> >
>> > Summary: Andriy Gapon has a bunch of changes against head in his
>> > avgbsd repository [1] which implement something like this. With his
>> > help I've backported these to stable 8.
>> >
>> > I've just recently gone over the work and put together a culminating
>> > patch, which I've tested as extensively as possible in my at-home
>> > environment. This is available as a Mercurial patch queue at [2] or
>> > directly at [3].
>>
>> Yes, this looks like pretty much what I was asking for. So, if I
>> understand this correctly, given a root zpool named 'zroot' and a
>> number of ZFSes with different boot environments ( zroot/ROOT/FOO,
>> zroot/ROOT/BAR, etc.) I could interrupt the boot before the menu
>> screen and just type at the boot: prompt --
>>
>> zfs:zroot/ROOT/FOO:boot/zfsloader
>>
>> or
>>
>> zfs:zroot/ROOT/BAR:boot/zfsloader
>>
>> to select different environments. Is that right? I'll give your
>> patches a go over the weekend -- I'm on stable/9 though.
>
> Actually the format is <POOL>:<DATASET>:<FILE> and <FILE> is optional
> and defaults to /boot/zfsloader. So examples would zroot:ROOT/FOO: or
> zroot:ROOT/BAR:/boot/zfsloader.
>
> I think this is documented incorrectly in one of the commits in the
> avgbsd repository. Obviously boot(8) should be updated correctly...
>
> For reference, setup on my fileserver looks link this:
>
> $ zpool get bootfs root
> NAME PROPERTY VALUE SOURCE
> root bootfs root/boot-config local
> $ mount | grep root/boot-config
> root/boot-config on /boot/config (zfs, local, nfsv4acls)
> $ cat /boot/config/boot.config
> root:stable8-r232838:
>
>
> Regards
> Florian
This is really good and i have been wanting something like this for
ages. Would it be possible to configure baestie to utilize this or is
that to late in the boot process? Any idea of time scales to commit to
head/9-stable?
More information about the freebsd-fs
mailing list