Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2013 09:14:04 +0200
From:      David Demelier <demelier.david@gmail.com>
To:        Beeblebrox <zaphod@berentweb.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ZFS mounting failed with error 2
Message-ID:  <CAO%2BPfDchiBoAcxLWVzW7fayxF6VHJO653_d7TrgBMAvNNdT-Cg@mail.gmail.com>
In-Reply-To: <1366087768996-5804167.post@n5.nabble.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> <1366087768996-5804167.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2013/4/16 Beeblebrox <zaphod@berentweb.com>:
>>> 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

Thank you so much, you made my day :-) For me I thought that export
was a kind of unmounting so I should have never found if you didn't
helped me on that case :p.

>
> 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
>


--
Demelier David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAO%2BPfDchiBoAcxLWVzW7fayxF6VHJO653_d7TrgBMAvNNdT-Cg>