Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Apr 2013 21:49:29 -0700 (PDT)
From:      Beeblebrox <zaphod@berentweb.com>
To:        freebsd-questions@freebsd.org
Subject:   ZFS mounting failed with error 2
Message-ID:  <1366087768996-5804167.post@n5.nabble.com>
In-Reply-To: <CAO%2BPfDfoGXC=UqcqYOQrssn8B_d54cEpajL-3hHs0B9neueHaQ@mail.gmail.com>
References:  <CAO%2BPfDev1L_1DcH8K8FwdAo8Sbd0-M5=j6tm6QyS%2BpixJbG9og@mail.gmail.com> <alpine.BSF.2.00.1304101040560.77823@mail.fig.ol.no> <CAO%2BPfDeeoWM08NvfEmUN0CJ-%2B6sCwpg8kxk6q_vHCPTD%2B0Ving@mail.gmail.com> <alpine.BSF.2.00.1304101153440.77823@mail.fig.ol.no> <CAO%2BPfDfoGXC=UqcqYOQrssn8B_d54cEpajL-3hHs0B9neueHaQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> one thing I'm not sure about is that some people create a dataset root but
that actually mounts at / (and not /root) and some just create others mount
points directly on the zpool

You can do this either way. A ZFS dataset is created at the same time and
with the same name as the zpool. You can use the zpool-named-dataset as root
without any problem. As I recall, the separate root dataset was a
work-around for some old problem, so it is not necessary any longer. That
said, you can place and name the zfs root dataset anywhere you want, as long
as you have the 'vfs.root.mountfrom=' path set correctly. In your example,
it is set correctly.

Now as to why you cannot boot - from my experience, the problem is your last
command:
'# zpool export tank' will leave the pool in an exported state, and when the
system tries to boot, it will not be able to locate the zpool because the
pool is in exportland. The solution is different. After you are finished
with all your settings you should
# zfs umount -a (unmount all tank & child datasets in /mnt)
# zfs set mountpoint=/ tank
# reboot

At step 2, dataset tank should not try to re-mount its self and remain
un-mounted. The older versions of ZFS did not behave this way and would
immediately mount the zpool on root. If this happens, you have to hard-reset
and such because the system will freeze up. If all goes well, before reboot
you can also check (zfs get all tank) and make sure that canmount=on is set
for tank.

The best zfs guide is FreeBSD's own docs: https://wiki.freebsd.org/RootOnZFS




-----
10-Current-amd64-using ccache-portstree merged with marcuscom.gnome3 & xorg.devel

--
View this message in context: http://freebsd.1045724.n5.nabble.com/ZFS-mounting-failed-with-error-2-tp5802786p5804167.html
Sent from the freebsd-questions mailing list archive at Nabble.com.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1366087768996-5804167.post>