Closed sadboy closed 9 years ago
I'm wondering if it is possible to specify a fixed version of zpool.cache for initramfs?
Why not just go without cache file? It's almost never actually needed.
Why not just go without cache file? It's almost never actually needed.
I can? Isn't that file auto generated?
I can? Isn't that file auto generated?
Yes and yes. The default is to have one, and that's only because of "old habit". I've created a pull request to change the default, but that might not be applied until after 0.6.5 (which isn't TO far off we hope). Best case, it'll be applied before, we haven't decided (agreed on) which yet :)
zpool set cachefile=none <poolname>
and it will removed. If you notice any problems with this, just get your pool imported and run
zpool set cachefile='' <poolname>
This will generate a cache file in the default location (/etc/zfs/zpool.cache).
The only place we're SURE might (!) need, or at least benefit from, a cache file is pools with a lot of vdevs (devices). But there might be others, so if you experience any problem, please let us know!
zpool set cachefile=none
Ah, great! That solved everything, thanks! :)
I'm wondering if it is possible to specify a fixed version of zpool.cache for initramfs?
The reason is that I have numerous zpools on removable media. If, during a session when I have a removable zpool imported, the update manager triggers an update that regenerates the initramfs, the current version of /etc/zfs/zpool.cache will get packed into the initramfs image, which includes the zpool on removable media. Then, on the next reboot if the media is not plugged in, zfs will try to import the non-existing pool and the boot process takes much longer.
Since the only pool that has to be brought up in the initramfs phase is the pool containing the root filesystem, and that pool seldom changes, I think it makes sense to be able to specify a "fixed" version of zpool.cache just for initramfs. Or have something like "ZFS_INITRD_POOL = rootpool" as a configurable parameter and let the script parse zpool.cache to extract the entry for the root pool. Or am I missing something here?