Learn how to resolve the ZFS pool not importing at boot error in Ubuntu server. Our NFS Support team is here to help you with your questions and concerns.
ZFS pool not importing at boot error Ubuntu server | Fixed
If your ZFS pool is not visible when we restart a Linux-based machine with ZFS installed, you have come to the right place.
In this scenario, we can import our pool manually with one of the following commands:
zpool import poolname
Or
zpool import -a
Interestingly, one of our customers recently faced this error on a Raspberry Pi 4 running Ubuntu Server 20.04.1 LTS. After careful investigation, our experts tried several different tricks and solutions. This involved ensuring all ZFS related services are enabled, adding a startup delay in the ZFS config files, as well as recreating the ZFS cache file.
However, when none of the above solutions worked, our expert came up with the following solution:
In my case, the failure shows up like this, we have to check if the disks are recognised by the system when the import service starts up.
This is done by modifying the systemd service with this command.
systemctl edit zfs-import-cache.service
And adding the following contents to it:
[Service]
ExecStartPre=/usr/bin/lsblk
As a result, the lbsk command runs ahead of the command mentioned in the systemd service is executed.
We can see the output of this command in the service logs.
After that, we have to reboot the system and run this command:
journalctl -u zfs-import-cache.service
Now, we will be able to view all the connected drives on the system.
Alternatively, we can try delaying the execution systmed service by adding a sleep statement.
This will give push the service to sleep for the time specified before importing the ZFS pool.
Let us know in the comments if you need further help with the ZFS pool not importing error
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
To sum up, our Support Techs demonstrated how to resolve the ZFS pool not importing at boot error in Ubuntu server.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments