How to mount zpool FreeBSD
How to mount a zfs disk on an installed FreeBSD system
On my FreeBSD desktop there was a system on an SSD drive, I used an HDD drive for file cleaning. All this was spinning on celerone with 512MB of RAM and naturally on ufs.
Now there is 6GB of RAM, and like many, I probably wanted to see how the system will work on zfs, how much faster it will be, but that's not the point.
I installed FreeBSD on my SSD drive using the ZFS file system and connected the drive formatted to ZFS HDD already with the created pool. The system worked perfectly, but the trouble is, the second disk was not mounted.
If someone had a similar problem and the disk with the ZFS pool created by zpool was not mounted on the installed system, then this article may be useful for you.
So run the command to view the mounted pools
You will see only one pool
In my case
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 81.5G 12.4G 69.1G - 11% 15% 1.00x ONLINE -
to see the available pools for import
At first I simply imported zpool into an alternative root directory with the command to check if it is mounted or not
zpool import -o altroot = / mnt your pool name
Yes, the pool was mounted in the / mnt directory you can check with the command
ls / mnt
When I was convinced that everything was ok exported zpool command
To mount the second disk after rebooting the system, you need to mount it with the creation of the cache command
zpool import -o ro and here is the name of your ZFS pool