KB450118 – ZFS Pool not Importing on Startup

Last modified: February 13, 2020
You are here:
Estimated reading time: < 1 min

CentOS 7.6

  • systemctl enable zfs.target; systemctl start zfs.target
  • vim /usr/lib/systemd/system/zfs-import-cache.service
  • change line “ExecStart=” to be “ExecStart=/usr/local/libexec/zfs/startzfscache.sh”
  • mkdir /usr/local/libexec/zfs
  • vim /usr/local/libexec/zfs/startzfscache.sh and add the following in the file:
    #!/bin/sh
    sleep 30
    /sbin/zpool import –c /etc/zfs/zpool.cache –aN
    zfs mount –a
  • chmod +x /usr/local/libexec/zfs/startzfscache.sh

Ubuntu 18.04

  • sudo su (type password)
  • systemctl enable zfs.target; systemctl start zfs.target
  • vim /lib/systemd/system/zfs-import-cache.service
  • change line “ExecStart=” to be “ExecStart=/usr/local/lib/zfs/startzfscache.sh”
  • mkdir /usr/local/lib/zfs
  • vim /usr/local/lib/zfs/startzfscache.sh and add the following in the file:
    #!/bin/sh
    sleep 30
    /sbin/zpool import –c /etc/zfs/zpool.cache –aN
    zfs mount –a
  • chmod +x /usr/local/lib/zfs/startzfscache.sh
Was this article helpful?
Dislike 0
Views: 325
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access