[SOLVED] Long boot time due to ZFS mount error

j.io

Member
Mar 16, 2021
98
7
13
38
Hi all,

my PVE needs a very long time to boot. It tries to mount some ZFS filesystems / drives, that are not existing anymore, which results in some error messages on boot. After a couple of minutes and timeouts, PVE boots naturally and works as expected. How can I get around that issue?

Thanks!
 
hi,

It tries to mount some ZFS filesystems / drives, that are not existing anymore, which results in some error messages on boot.
probably your zfs cachefile is outdated, so it's looking for the old disks from the cache.

you can try

Code:
systemctl disable zfs-import-cache.service
systemctl enable zfs-import-scan.service
reboot

if this fixes your problem, you can reactivate the cache:
Code:
zpool set cachefile=/etc/zfs/zpool.cache <poolname>
update-initramfs -k all -u
after that you can enable zfs-import-cache again (and disable import-scan)
 
hi,


probably your zfs cachefile is outdated, so it's looking for the old disks from the cache.

you can try

Code:
systemctl disable zfs-import-cache.service
systemctl enable zfs-import-scan.service
reboot

if this fixes your problem, you can reactivate the cache:
Code:
zpool set cachefile=/etc/zfs/zpool.cache <poolname>
update-initramfs -k all -u
after that you can enable zfs-import-cache again (and disable import-scan)
Great, that worked. After the first code block, the reboot took around 30sec.

The second code block made it persistent. Could you explain the difference between the two services, just that I know for the future? Thanks a lot!
 
The second code block made it persistent. Could you explain the difference between the two services, just that I know for the future? Thanks a lot!
zfs-import-cache will use the cachefile (that we just remade), this way the boot is faster since it already knows which disks to mount.
zfs-import-scan will scan all attached disks and automatically mount the found zfs, but doing this at every boot takes longer than the cachefile option.

glad it was helpful, you're welcome! you can mark the thread [SOLVED] by editing the title prefix
 
  • Like
Reactions: j.io
zfs-import-cache will use the cachefile (that we just remade), this way the boot is faster since it already knows which disks to mount.
zfs-import-scan will scan all attached disks and automatically mount the found zfs, but doing this at every boot takes longer than the cachefile option.
Thanks. :)

glad it was helpful, you're welcome! you can mark the thread [SOLVED] by editing the title prefix
It was. :) I marked the thread solved.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!