There should be a way to exclude a pool from import at boot
I'd like to exclude a pool from import on every boot, even after an unclean shutdown. Exporting the pool before shutdown is not an option.
A pool-property might be a good way to implement it.
The point is that this pool takes > 10 minutes to import and I want to get it out of the boot process.
Updated by Gary Mills over 9 years ago
You can accomplish this by specifying a private cache file when you import or export the zpool. That way, it won't be included in the normal cache file that's used to do imports at boot time. Here's an example:
# zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT rpool 136G 8.66G 127G 6% ONLINE - # ll /etc/zfs/*.cache -rw-r--r-- 1 root root 1704 Jul 18 13:29 /etc/zfs/zpool.cache # ll /etc/zfs/clust.cache /etc/zfs/clust.cache: No such file or directory # zpool import -o cachefile=/etc/zfs/clust.cache space # zpool list NAME SIZE ALLOC FREE CAP HEALTH ALTROOT rpool 136G 8.66G 127G 6% ONLINE - space 278G 212M 278G 0% ONLINE - # ll /etc/zfs/*.cache -rw-r--r-- 1 root root 1824 Jul 18 17:51 /etc/zfs/clust.cache -rw-r--r-- 1 root root 1716 Jul 18 17:51 /etc/zfs/zpool.cache
Updated by Richard PALO over 9 years ago
Arne Jansen wrote:
great, works as described, thanks!
If I understand what you would like to do, I've been using the syntax
'zpool import -R <root> <pool>' which seems to work ok. Apparently
this is a shortcut for "-o cachefile=none,altroot=root"
If the pool is another "rpool", use 'zpool import -R <root> <id> <newpool>'
with the id indicated in the "zpool import" command, which lists the available pools.