ZFS mounting failed with error 2

David Demelier demelier.david at gmail.com
Wed Apr 10 08:16:53 UTC 2013


Hello

I have tried to create a GPT partition scheme on my machine. I've
created some dataset like that :

tank/usr
tank/usr/ports
tank/usr/src
tank/var/
tank/var/log

(Please note that is a test on a virtual machine before applying to a
real machine).

I've tried to generate the zpool.cache like that:

zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt -f
cp /tmp/zpool.cache /mnt/boot/zfs/

And then tried to set mount point to legacy and bootfs with :

zfs set bootfs=tank tank
zfs set mountpoint=legacy tank

The following commands made a lot of warnings :

zfs set mountpoint=/usr tank/usr
zfs set mountpoint=/var tank/var
...

After, the import on the livecd shell generated the error :

cannot mount '/mnt/var': failed to create mountpoint.

I must say that it is very hard to make a ZFS working machine, there
are a lot of pages on the Wiki and most of them are a little bit
outdated..

--
Demelier David


More information about the freebsd-questions mailing list