gptzfsboot targeting wrong vdev

Allan Jude allanjude at freebsd.org
Mon Jul 13 18:50:24 UTC 2020


On 2020-07-13 14:02, Christian Kratzer wrote:
> Hi,
> 
> On Mon, 13 Jul 2020, Allan Jude wrote:
>> bootme is only used by gptboot, for UFS.
> 
> ok.
> 
>> You might want to example your disks with 'zdb -l /dev/ada0' (for each
>> disk, and each partition). It seems there is something not encrypted
>> somewhere. It may be an old label from a pool that has been destroyed,
>> and a new pool with the same name was later created or something.
> 
> let me provide the partitions up front
> 
> root at zfs1:/home/ck # gpart show /dev/ada0
> =>       40  468862048  ada0  GPT  (224G)
>          40       1024     1  freebsd-boot  (512K)
>        1064  134217728     2  freebsd-swap  (64G)
>   134218792   33554432     3  freebsd-vinum  (16G)
>   167773224   33554432     4  freebsd-vinum  (16G)
>   201327656  267534424     5  freebsd-zfs  [bootme]  (128G)
>   468862080          8        - free -  (4.0K)
> 
> root at zfs1:/home/ck #
> 
> ada1 is essentially the same.
> 
> These are the two m2 ssd I have zroot und zil on.
> 
> The two freebsd-vinum partitions used to be freebsd-zfs
> 
> Partitions 3 and 4 are used for the log device and these happen to have
> the names I was getting confused about
> 
> root at zfs1:/home/ck # zdb -l /dev/ada0p3 | head -10
> ------------------------------------
> LABEL 0
> ------------------------------------
>     version: 5000
>     name: 'zp1'
>     state: 0
>     txg: 37392274
>     pool_guid: 6725164972097052508
>     hostid: 694021601
>     hostname: 'zfs1'
> root at zfs1:/home/ck #
> 
> 
> 
> root at zfs1:/home/ck # zdb -l /dev/ada0p4 | head -10
> ------------------------------------
> LABEL 0
> ------------------------------------
>     version: 5000
>     name: 'zp2'
>     state: 0
>     txg: 21037796
>     pool_guid: 16088850666393843588
>     hostid: 694021601
>     hostname: 'zfs1'
> root at zfs1:/home/ck #
> 
> 
> It is just a name and not a label.  gptzfsboot was trying to tell me it
> cannot boot from ada0p3 which has the name zp1.
> 
> My two other pools on the sas hba happen to be called zp1 and zp2.
> 
> For some reason when I setup the system I moved stuff around and ended
> up with two zlog partitions first and the zroot last.
> 
> So now everything makes sense again.
> 
> The freebsd-vinum hack solves this for me and I have gained some more
> experience.
> 
> In the future I will ensure  to have the first partition after boot to
> be the zroot.
> 
> Greetings
> Christian
> 

So are your SLOG devices not encrypted? That seems like an oversight,
since any synchronous writes will be written to the SLOG first.

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20200713/0561c150/attachment.sig>


More information about the freebsd-fs mailing list