2

One of my systems has recently had its data-disks recreated on a new pool. However, after a reboot the system hangs on trying to import pools from the cache file. I'm puzzled by this, since I specifically exported the old pool and set the new pools mount property to noauto.

I need to figure out how to either tell systemctl which pools it needs to import, or somehow clear any erroneous pools from the cache file. I will be working on the former for now to get up and running again. In the meantime, is there a way to see which pools are in the cache file? Any advice on how to handle a situation like this so I won't be in a similar dilemma in the future?

Thanks!

Mark
  • 121
  • 1

1 Answers1

2

You can remove the cache file and let it rebuild on its own.

ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • That was my idea as well, but since my root-pool is on ZFS, I would have to ensure that that one has been added to the new cache file before I reboot out of my rescue environment. Since the cache file is inside the mounted pool, would I need to set the cachefile property to an alternate path, rename/remove the original then set the cachefile property back to the original? Plus, it might not help me if I import another pool into the cachefile and do a clean shutdown, since the next boot would then try to mount it. More granular control of the import would be better. A custom unit-file perhaps? – Mark Jun 02 '19 at 13:52
  • 1
    ZFS root is not a great idea. I'm sorry for that complication. – ewwhite Jun 02 '19 at 14:31
  • It works amazingly though. Check out [this advanced application](https://ramsdenj.com/2018/05/29/zedenv-zfs-boot-environment-manager.html). That said, I found that setting the cachefile property on an imported pool creates a clean cache file, overwriting if wanted. So my system is up and running again. I just need to mind that I import my other pools into their own cache file (or without one). I'll leave the question open to see if someone has a means of granular control (possibly a custom systemd unit file). Thanks for the really fast reply! – Mark Jun 02 '19 at 15:24