I followed the video on how to install and boot Funtoo on ZFS+GPT. I have added a second pool for storage, but only the first pool is imported on boot.
I have the following configuration:
# zpool status pool: main state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM main ONLINE 0 0 0 sda3 ONLINE 0 0 0 errors: No known data errors pool: storage state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM storage ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 sdb ONLINE 0 0 0 sdc ONLINE 0 0 0 sdd ONLINE 0 0 0 sde ONLINE 0 0 0 errors: No known data errors
# zfs list NAME USED AVAIL REFER MOUNTPOINT main 4.23G 34.7G 136K none main/OS 2.17G 34.7G 136K none main/OS/portage 1.04G 34.7G 887M /usr/portage main/OS/portage/distfiles 84.0M 34.7G 84.0M /usr/portage/distfiles main/OS/portage/packages 94.8M 34.7G 94.8M /usr/portage/packages main/OS/root 621M 34.7G 621M / main/OS/source 533M 34.7G 533M /usr/src main/SWAP 2.06G 36.7G 76K - storage 55.1M 114G 198K none storage/HOME 599K 114G 198K none storage/HOME/root 203K 114G 203K /root storage/HOME/users 198K 114G 198K /home storage/VAR 53.3M 114G 53.3M /var
I've installed bliss-initramfs to create the inited image.
But after reboot the only pool imported is the main. How do i configure the system to automatically import all the pools?
I have searched a lot on google for this, but apparently i'm the only one in the world who want's multiple pools, all the examples i find only uses one pool.
I wanted the same thing, so you're not alone. I have two different sized drives and I wanted to use a mirror for the critical stuff at the size of the smaller drive and then use the difference between the drives to store non-critical stuff.
I found two problems with making it work. For some reason the /etc/zfs/zpool.cache file didn't survive reboots, and all pools except for the main root pool seem to think they're dirty (i.e. mismatched hostid) if they're not exported at shutdown. I found some threads claiming that the forced import requirement was caused by hostid problems but for the life of me I could never make it work and then I found another thread which suggested the hostid was never being recorded in the pool which means it would always fail, and this seems to be true based on what little I understand of the zdb command.
I have managed to get around all of these issues by editing the /etc/init.d/zfs script. I don't have a diff, but the following may be helpful enough.
Changed Definitions :
Changed In start() :
$ZPOOL import -c $ZPOOL_CACHE -afN 2>/dev/null || true
Added In stop() :
cp $ZPOOL_CACHE_LIVE $ZPOOL_CACHE
Last edited by parakleta (2013-08-13 09:54:53)