ZFS Pool of USB Drives causes zsf-import-cache.service to fail on boot

br flag

I setup a ZFS pool on my "home server" (Raspberry Pi 4b) that consists of various HDD and SSD drives connected over USB to the Pi. I have noticed that whenever a reboot occurs, the ZFS pool fails to be imported by the zfs-import-cache.service.

ewwhite avatar
ng flag
As much as I love ZFS, this is a poor use case for it.
Ben Turner avatar
br flag
@ewwhite - Why particularly? I mean aside from this issue in my case, of the spin up time of the drives, is there a technical issue with using a pretty simple ZFS HDD mirror + SSD cache setup? I went with ZFS as I wanted to experiment a bit with it and was also under the impression that it makes it somewhat easy to expand the pool in the future if and when the need arises.
br flag

This failure is due to the USB drives not being fully loaded by the time ZFS attempts to import the pool. This can be solved by adding some override entries to the [Unit] section of the zfs-import-cache.service:

$ sudo systemctl edit zfs-import-cache.service

### Editing /etc/systemd/system/zfs-import-cache.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file


### Lines below this comment will be discarded

This change will require the ZFS import service to wait until the drives that were setup as part of the pool <pool_name> are properly available before attempting to import the pool. You will need to replace <pool_name> with the name of the pool you have configured.

This has worked for me on my relatively simple setup and just wanted to share here in case any others encountered this issue and didn't want to resort to the brute force sleep method of waiting for the drives to be loaded.

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.