System fails to boot with zfs root on nvme mirror when not using full disks

Markus Wild fbsd-lists at dudes.ch
Sun Oct 22 13:03:17 UTC 2017


Hello Gary

thanks for your input!

> My suspicion is that you didn't make a backup of the new
> /boot/zfs/zpool.cache
> 
> From the USB live booted system, when you recreated the zpool you
> likely changed parameters that live in the cache.  You need to copy
> that to the new boot pool or ZFS can get angry

It's a possibility... new attempt from usb live system:

gpart delete -i 3 nvd0
gpart delete -i 3 nvd1
gpart add -a 4k -s 50G -t freebsd-zfs -l zfs0 nvd0
gpart add -a 4k -s 50G -t freebsd-zfs -l zfs1 nvd1
sysctl vfs.zfs.min_auto_ashift=12
zpool create -m none -o cachefile=/var/tmp/zpool.cache zroot mirror /dev/gpt/zfs0 /dev/gpt/zfs1
zfs receive -Fud zroot < zroot.zfs
zpool set bootfs=zroot/ROOT/default zroot
mount -t zfs zroot/ROOT/default /mnt
cp /var/tmp/zpool.cache /mnt/boot/zfs/zpool.cache
umount /mnt
reboot


Unfortunately, this didn't change anything. I'm still getting the

    Trying to mount root from zfs:zroot/ROOT/default []...
    Mounting from zfs:zroot/ROOT/default failed with error 6.

error :(

Any other ideas....?

Cheers,
Markus


More information about the freebsd-stable mailing list