ZFS pools not auto-importing at boot

Hi,

I recently upgraded (kind of) from 9.2 to 10-STABLE by creating a new ZFS dataset, extracting the tgz's into it, set the pool's bootfs option to this new dataset, copied the zpool.cache from the current /boot/zfs into the new /boot/zfs, configured loader.conf and rc.conf to include ZFS among other things, rebooted and as expected everything came up wonderfully on the new installation... Or so I thought.

To give some background my boot disk config is this:
Code:
=>       34  488397101  ada4  GPT  (233G)
         34          6        - free -  (3.0K)
         40        128     1  freebsd-boot  (64K)
        168   16777216     2  freebsd-swap  (8.0G)
   16777384   20971520     3  freebsd-zfs  (10G)
   37748904  429916160     4  freebsd-zfs  (205G)
  467665064   20732064     5  freebsd-zfs  (9.9G)
  488397128          7        - free -  (3.5K)

partition index 1 contains gptzfsroot and the ada4 holds pmbr.
index 3 contains unencrypted ZFS pool for /boot and the key for the GELI partition. We'll call this "boot."
index 4 is the GELI partition with the / (rootfs) as ZFS. We'll call this "root."

The issue is that on 9.2 and earlier, ZFS would automatically import both the boot and root pools because they had previously been imported (and not exported) and matched the hostid. On 10-STABLE once booting is complete I'm left with only the "root" pool imported and ZFS datasets mounted. I can manually import boot and when I do all ZFS datasets automatically mount as expected. I've tried importing boot with the -f switch to force the hostid rewrite, I've set the
Code:
vfs.zfs.check_hostid=0
turnable, I've tried manually specifying the cachefile on pool import and placing that in /boot/zfs and also tested it by
Code:
zpool import -c <cachefile>
to prove that the cachefile is consistent. I'm completely out of ideas and would really appreciate some help.

Thanks.
 
X-Posting from "Installing & Upgrading" and adding a bit.

gavinjs0 said:
Hi,

I recently upgraded (kind of) from 9.2 to 10-STABLE by creating a new ZFS dataset, extracting the tgz's into it, set the pool's bootfs option to this new dataset, copied the zpool.cache from the current /boot/zfs into the new /boot/zfs, configured loader.conf and rc.conf to include ZFS among other things, rebooted and as expected everything came up wonderfully on the new installation... Or so I thought.

To give some background my boot disk config is this:
Code:
=>       34  488397101  ada4  GPT  (233G)
         34          6        - free -  (3.0K)
         40        128     1  freebsd-boot  (64K)
        168   16777216     2  freebsd-swap  (8.0G)
   16777384   20971520     3  freebsd-zfs  (10G)
   37748904  429916160     4  freebsd-zfs  (205G)
  467665064   20732064     5  freebsd-zfs  (9.9G)
  488397128          7        - free -  (3.5K)

partition index 1 contains gptzfsroot and the ada4 holds pmbr.
index 3 contains unencrypted ZFS pool for /boot and the key for the GELI partition. We'll call this "boot."
index 4 is the GELI partition with the / (rootfs) as ZFS. We'll call this "root."

loader.conf looks like this so I get prompted for my passphrase, zRoot imports, zRoot/10S mounts and boot completes successfully:
Code:
kern.geom.eli.tries=2
geli_ada4p4_load="NO"
geli_gpt_geliRoot_load="YES"
geli_gpt_geliRoot_type="gpt/geliRoot:geli_keyfile0"
geli_gpt_geliRoot_name="<KEYFILE>"
geom_eli_load="YES"

vfs.zfs.debug=1
vfs.root.mountfrom="zfs:zRoot/10S"
zfs_load="YES"

rc.conf also contains:
Code:
zfs_enable="YES"

The issue is that on 9.2 and earlier, ZFS would automatically import both the boot and root pools because they had previously been imported (and not exported) and matched the hostid. On 10-STABLE once booting is complete I'm left with only the "root" pool imported and ZFS datasets mounted. I can manually import boot and when I do all ZFS datasets automatically mount as expected. I've tried importing boot with the -f switch to force the hostid rewrite, I've set the
Code:
vfs.zfs.check_hostid=0
turnable, I've tried manually specifying the cachefile on pool import and placing that in /boot/zfs and also tested it by
Code:
zpool import -ac <cachefile>
to prove that the cachefile is consistent. I'm completely out of ideas and would really appreciate some help.

Thanks.
 
gavinjs0 said:
X-Posting from "Installing & Upgrading" and adding a bit.
Please don't cross-post. It's not going to get you an answer sooner. Just edit the original post or reply to your own thread.
 
Sorry it was my first post, and after reviewing all the categories I thought putting in in Storage would be more appropriate.
 
gavinjs0 said:
after reviewing all the categories I thought putting in in Storage would be more appropriate.
Yeah, both categories can apply. But since it's more about getting an installation properly booted I think this one fits a little better. For future reference, if you think you posted in the wrong section just PM a moderator. We can move the whole thread if needed.
 
Back
Top