I haven't had that exact situation, but I booted with a different kernel (kernel.old) once and the pool wasn't attached, as the cache was loaded as one of the kernel modules and was unloaded when I switched kernels. I did apalmboy5 said:If I reinstall FreeBSD for whatever reason on my server, how would I go about adding back my former zpool(s) and ZFS-formatted "partitions"? The furthest I could get when I tried was having zpool say those drives were already a member of a pool.
# zpool import -c /boot/zfs/zfs.cache ...
to get it to re-appear. I expect that some flavor of # zpool import
will work for you. (Note that this cache file is not the same as the ZFS cache device).I don't know. Perhaps someone with more knowledge of ZFS can chime in. The file's timestamp does get updated on each boot. I think that it is just a shortcut for the system to "remember" the ZFS setup between boots - I'm pretty sure that each disk / partition / whatever that is part of a ZFS zpool has complete knowledge of the entire pool's configuration.palmboy5 said:Thanks for your reply. Does that file (zpool.cache for me) become outdated over time? Assuming no hardware changes, can I back up that file now and restore it months later safely?
brisbane-1# zpool create tank raidz label/wd2tb1 label/wd2tb2 label/wd2tb3 label/wd2tb4
invalid vdev specification
use '-f' to override the following errors:
raidz contains devices of different sizes
brisbane-1# zpool create tank raidz label/wd2tb1 label/wd2tb2 label/wd2tb3 label/wd2tb4 -f
cannot open '-f': no such GEOM provider
must be a full path or shorthand device name
brisbane-1# zpool create tank -f raidz label/wd2tb1 label/wd2tb2 label/wd2tb3 label/wd2tb4
cannot open '-f': no such GEOM provider
must be a full path or shorthand device name
brisbane-1#
The zpool command arguments are position sensitive. The -f has to come between the ZFS action and the target pool / device(s). For example:palmboy5 said:"pool is in use on another system"! That's it! I couldn't remember what it said back when I tried zpool import without exporting first. Unfortunately, -f has never worked for me. Example:
Code:brisbane-1# zpool create tank raidz label/wd2tb1 label/wd2tb2 label/wd2tb3 label/wd2tb4 -f cannot open '-f': no such GEOM provider must be a full path or shorthand device name
# zpool create -f tank raidz label/wd2tb1 label/wd2tb2 label/wd2tb3 label/wd2tb4
I hope the OP was using it as an example of -f not working.phoenix said:Why are you using create? You should be doing zpool import -f <poolname> nothing more. The pool already exists.