Skip to content

zpool create -t fails to emit zpool history entry for create command #18102

@delan

Description

@delan

System information

Type Version/Name
Distribution Name NixOS
Distribution Version 25.11.20250830.d7600c7
Kernel Version 6.12.44
Architecture x86_64
OpenZFS Version zfs-2.3.4-1
zfs-kmod-2.3.4-1

Describe the problem you're observing

in #16408, the reporter’s pool did not have an entry for the zpool create command in zpool history, even though that was in theory a special case that should never get evicted from the history. zpool history -i entries for create pool version 5000 and set feature@... and so on were present as expected.

i ran into those exact symptoms today, just after creating a pool. zpool history was empty, with no entry for the zpool create command, but zpool history -i entries for create pool version 5000 and set feature@... and so on were present as expected.

Describe how to reproduce the problem

$ truncate -s 1G test.img

zpool create without -t works as expected:

$ zpool create test ./test.img
$ zpool history test
History for 'test':
2026-01-01.14:59:54 zpool create test ./test.img

zpool create with -t that does not rename the pool, also works as expected:

$ zpool destroy test
$ zpool create -t test test ./test.img
$ zpool history test
History for 'test':
2026-01-01.15:00:15 zpool create -t test test ./test.img

zpool create with -t that does rename the pool, fails to create the history entry:

$ zpool destroy test
$ zpool create -t test2 test ./test.img
$ zpool history test
cannot open 'test': no such pool
$ zpool history test2
History for 'test2':

zpool history -i still contains the internal entries as expected:

$ zpool history -i test2
2026-01-01.15:00:29 [txg:4] create pool version 5000; software version unknown; uts venus 6.12.44 #1-NixOS SMP PREEMPT_DYNAMIC Thu Aug 28 14:31:16 UTC 2025 x86_64
2026-01-01.15:00:29 [txg:4] set tname=test2
2026-01-01.15:00:29 [txg:4] set feature@async_destroy=enabled
[...]
2026-01-01.15:00:29 [txg:4] set feature@large_microzap=enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions