Solved openZFS 2.0 on Freebsd 12.2-p1, data's zpool not imported automatically.

#openZFS 2.0 on #Freebsd 12.2-p1, zpool forget to import automatically my database's pgpool. I have to do a manual import with :
zpool import pgpool
Then I do a painful task to start manually my services.
Any suggestions or solution for this bug.
 
Pools are never automatically imported. That's left up to the system's administrator, i.e. you. What if that pool came from some other system and had the same mount points as your currently running system? Would you want that to be automatically imported and completely hose your system?
 
Pools are never automatically imported. That's left up to the system's administrator, i.e. you. What if that pool came from some other system and had the same mount points as your currently running system? Would you want that to be automatically imported and completely hose your system?
The zpool is installed with same machine and same system, I created my database's pgpool just after finishing the installation and updating the FreeBSD 12.2-p1.

zpool create pgpool /dev/ada1
zfs create pgpool/postgres
zfs set mountpoint=/var/db/postgres pgpool/postgres

when I reboot, the zpool database's pgpool don't show in the "zpool list" instruction
I have to import it my self with "zpool import pgpool". The zpool is not from an other system.
 

Attachments

  • openZFS 2.0 on Freebsd 12.2-p1,data's zpool not imported automatically.png
    openZFS 2.0 on Freebsd 12.2-p1,data's zpool not imported automatically.png
    54.2 KB · Views: 161
With the "old" ZFS that came with the OS?
No with the new OpenZFS project, compiled and installed from latest port tree.
zfs --version
zfs-2.0.0-rc1
zfs-kmod-v2020120100-zfs_aa2778d10

After a reboot and verification, I installed the zpool data's.
 

Attachments

  • My success setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Instructions.png
    My success setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Instructions.png
    53.5 KB · Views: 132
  • My sucess setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Sammary show.png
    My sucess setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Sammary show.png
    41.1 KB · Views: 186
Do you have to import the pool every time you restart the machine? Because that shouldn't happen. Once a pool is imported it's known to the system and thus always available from that point onward. Pools are not imported when the system boots, only initially do you have to import a pool to make it known to the system.
 
Do you have to import the pool every time you restart the machine? Because that shouldn't happen. Once a pool is imported it's known to the system and thus always available from that point onward. Pools are not imported when the system boots, only initially do you have to import a pool to make it known to the system.
Yes this is the problem, I have to import the pool every time I restart or shutdown the machine properly.
 
This is a known issue, we had this discussed here already.

If You are somehow familiar with shell scripting and the rc.d system, I would advise you to grab the startup script from 13-CURRENT, adapt it if necessary, and place it into your rc.d. Otherwise, wait until R.13 becomes available, as there the issue should be solved.
 
The solution for #openZFS 2.0 on #Freebsd 12.2-p1, zpool don't import the data's pool.
Check the /etc/rc.d/zpool script, if your zpool.cache needs an update with :
zpool import poolname
zpool set cachefile=/etc/zfs/zpool.cache poolname
Then you have to copy the /etc/rc.d/zpool script from:
Reboot, check "zdb" and you will find your missing pools.??
Thanks a lots to the Xman and the "Doctor Strange" of ZFS and FreeBSD, I hope you know him.?
 
Back
Top