[Bug 282832] makefs zfs creates images with the same guid

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 19 Nov 2024 01:24:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282832

--- Comment #12 from Mark Johnston <markj@FreeBSD.org> ---
(In reply to Pat Maddox from comment #11)
If I use your makefile, but modify the bhyve/bhyveload invocation to boot the
official 14.2-BETA2 zfs image[1], it boots fine.  I verified that all three
pools have the same guid, per zdb -u it's 4116862866898151352.  So I suspect
that there's something else going on, and that importing one of the pools has
some side effect which fixes the problem.

In particular, if I generate zdata.zfs using your script, then boot the 14.2
image into single user mode (so reguid hasn't run), I can see that both pools
have the same GUID and yet the kernel was able to mount root successfully.  So
something else is going on.

root@:/ # zdb -l /dev/ada0p4
------------------------------------
LABEL 0 
------------------------------------
    txg: 4
    version: 5000
    state: 1
    name: 'zroot'
    pool_guid: 4016146626377348012
    top_guid: 100716240520803340
    guid: 100716240520803340
    vdev_children: 1
    features_for_read:
    vdev_tree:
        type: 'disk'
        ashift: 12
        asize: 5363990528
        guid: 100716240520803340
        id: 0
        path: '/dev/null'
        whole_disk: 1
        create_txg: 4
        metaslab_array: 2
        metaslab_shift: 29
    labels = 0 1 2 3 
root@:/ # zdb -l /dev/ada1
------------------------------------
LABEL 0 
------------------------------------
    txg: 4
    version: 5000
    state: 1
    name: 'zdata'
    pool_guid: 4016146626377348012
    top_guid: 100716240520803340
    guid: 100716240520803340
    vdev_children: 1
    features_for_read:
    vdev_tree:
        type: 'disk'
        ashift: 12
        asize: 100139008
        guid: 100716240520803340
        id: 0
        path: '/dev/null'
        whole_disk: 1
        create_txg: 4
        metaslab_array: 2
        metaslab_shift: 24
    labels = 0 1 2 3 

I tried booting with all three pools, and that works too.

[1]
https://download.freebsd.org/releases/VM-IMAGES/14.2-BETA3/amd64/Latest/FreeBSD-14.2-BETA3-amd64-zfs.raw.xz

-- 
You are receiving this mail because:
You are the assignee for the bug.