Re: main-n254654-d4e8207317c results in "no pools available to import"

From: Dennis Clarke <dclarke_at_blastwave.org>
Date: Mon, 11 Apr 2022 21:59:20 UTC
On 4/11/22 17:50, Tomoaki AOKI wrote:
> On Mon, 11 Apr 2022 20:18:48 +0200
> Ronald Klop <ronald-lists@klop.ws> wrote:
> 
>> On 4/11/22 17:17, Dennis Clarke wrote:
>>>
>>> Did the usual git pull origin main and buildworld/buildkernel but after installkernel the machine will not boot.
>>>
>>> The rev seems to be main-n254654-d4e8207317c.
>>>
>>> I can boot single user mode and get a command prompt but nothing past
>>> that. Is there something borked in ZFS in CURRENT ?
>>>
>>>
>>>
>>
>>
>> Up until now you are the only one with this error on the mailinglist today. So I doubt something is borked.
>> You could consider to share more details about your setup to help people to think along with you.
>>
>> Regards,
>> Ronald.
>>
> 
> I have main at git c79331a42c308139828c1117f49224bb83617a53 booting
> fine, and no commits relatd with ZFS exists within git d4e8207317c.

I was just looking at that and there is one :

root@phobos:/usr/src #
root@phobos:/usr/src # /usr/local/bin/git --no-pager log -n 32 
--pretty=oneline --abbrev-commit --graph
* d4e8207317c (HEAD -> main, origin/main, origin/HEAD) 
vmm_instruction_emul.c: fix bhyve build
* be0d16b0b05 bsdinstall: filter out disks that are unavailable from the 
list of options in ZFS
* 5580e5bd716 nfscl: Clean up the code by removing unused arguments
* 5a17f489d58 vmm: fix set but not used warning
* 5241577a223 vmm: fix set but not used warning
* 3587bfa797c vmm: fix set but not used warning
* 5c272efaba2 vmm: fix set but not used warnings
* f877977a034 vmm: fix set but not used warnings
* 893a3dd697e vmm: fix set but not used warning
* f3ef799f564 Only return a mapped address from efi_phys_to_kva
* 57e47ae514b Include the EFI Runtime Code in the DMAP
* bde57090337 UPDATING: Fix a few typos
* c79331a42c3 bhyve: use linker set for ipc commands
* 38c3cf6aede nfscl: Clean up the code by removing unused arguments
* c45d934f6b7 nfscl: Ansify a function header
* bd8701dede1 Document procstat(1) advlock command
* a5229a255ea Implement procstat(1) advlocks command
* e79866ddf1c procstat(1): add ability to specify subcommands not 
requiring pid lists
* 50d3c72558f libprocstat: document procstat_getadvlock(3)
* 039d1496b07 libprocstat: add procstat_getadvlock(3)
* eca39864f70 Add sysctl KERN_LOCKF
* 6ead1379fd4 sys/user.h: Add kinfo_lockf structure to report advisory locks
* 147e4fe3f1f kern_lockf.c: remove no longer neeeded UFS headers
* 59e85819be6 lockf: remove lf_inode from struct lockf_entry
* 5c075d64049 ufs/acl.h: forward-declare struct inode
* 8cc19b1e47d Style.
* a3214fbe7ff mount: use pidfile_signal
* 287451fd019 pidfile: add pidfile_signal
* ecbdfbfd18d netgraph(3): Remove a double word in a source code comment
* d048e8c6196 ofed: Fix a typo in a source code comment
* 299fcf402dc fsck_ffs(8): Fix a typo in a source code comment
* 009727ed577 routed(8): Remove a double word in a source code comment
root@phobos:/usr/src #

I see be0d16b0b05 bsdinstall: filter out disks that are unavailable from 
the list of options in ZFS

Not sure what that does however.

I am looking at :

root@phobos:/usr/src # git pull origin main
remote: Enumerating objects: 100, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 100 (delta 13), reused 13 (delta 13), pack-reused 84
Receiving objects: 100% (100/100), 189.37 KiB | 1.38 MiB/s, done.
Resolving deltas: 100% (57/57), completed with 12 local objects.
 From git.freebsd.org:src
  * branch                    main       -> FETCH_HEAD
    d4e8207317c..673bce11ced  main       -> origin/main
Updating d4e8207317c..673bce11ced
Fast-forward
  lib/libc/sys/getdirentries.2     |  2 ++
  sbin/ifconfig/ifconfig.8         |  5 +++--
  stand/man/loader_lua.8           | 47 
+++++++++++++++++++++++------------------------
  sys/compat/linprocfs/linprocfs.c | 20 ++++++++++++++++++++
  sys/compat/linux/linux_socket.c  | 38 
+++++++++++++++++++++++++++++---------
  sys/compat/linux/linux_socket.h  |  1 +
  sys/dev/axgbe/if_axgbe_pci.c     | 65 
++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
  sys/kern/vfs_subr.c              |  1 +
  sys/kern/vfs_syscalls.c          |  4 ++++
  sys/netinet/ip_mroute.c          | 26 ++++++++++++++++++++------
  sys/netinet/ip_output.c          |  2 +-
  sys/netinet6/ip6_output.c        |  2 ++
  sys/netpfil/ipfw/ip_fw2.c        | 27 ++++++++++++---------------
  sys/netpfil/ipfw/ip_fw_log.c     |  7 +++++--
  sys/netpfil/pf/pf_ioctl.c        |  2 ++
  sys/sys/vnode.h                  |  2 +-
  sys/vm/swap_pager.c              |  4 ++--
  17 files changed, 180 insertions(+), 75 deletions(-)
root@phobos:/usr/src # /usr/local/bin/git --no-pager log -n 32 
--pretty=oneline --abbrev-commit --graph
* 673bce11ced (HEAD -> main, origin/main, origin/HEAD) linux(4): Copyout 
actual size of addr to the user space in accept().
* bb0f644cd68 linux(4): Limit user-supplied sockaddr length in recvfrom().
* 68bfaefb3d9 linux(4): Remove unnecessary PTRIN().
* cf312f799a8 linux(4): Handle SO_DOMAIN in getsockopt syscall.
* c6487446d7e getdirentries: return ENOENT for unlinked but still open 
directory.
* bb46e9b5107 linux(4): Prevent an attempt to copy an uninitialized 
source address.
* 6ca0ca7b4cb IPv4 multicast: fix LOR in shutdown path
* 8e458a431eb Clean up some grammos I left behind.
* 67f5810e07c Correct typos and more precise wording.
* 632ea8ea984 ifconfig.8: Note that -l accepts -g in addition to -d and -u
.
.
.
.


So again nothing from yesterday until today that says a word about ZFS.


> So the info at which commit was running before update would be needed.
> 
> I've encountered the situation like that, but it was far before OpenZFS
> was introduced into base. If it's the same issue, /sbin/zfs SHALL be
> updated in conjunction with kernel.
> 

Right. I have seen it also but that was a long long time ago. Relatively
speaking and OpenZFS has never been an issue. I wish I had a serial
interface on the little laptop to boot to single usermode with and then
can look around and capture the output.


> If you can boot with any emergency environment (memstick or another
> installation) and import now-non-bootable pool with e.g. `zpool import
> -R /mnt -f ZPOOL`,

I have been through that before and usually it was just to import a
strange zpool from some other storage array onto some other machine.
I don't think that is needed here.


> Beware! If other updated components are mandatory for /sbin/zfs, the
> above procedure is not at all enough. But would crash before actually
> the pool is imported.

Yep. Let's avoid that.

I am going to see if I can build to commit 3587bfa797c on some other
hardware and have a look. Just because I am curious.

-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional