From owner-freebsd-questions@FreeBSD.ORG Tue Apr 16 07:14:05 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7F0FA4A0 for ; Tue, 16 Apr 2013 07:14:05 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-we0-x229.google.com (mail-we0-x229.google.com [IPv6:2a00:1450:400c:c03::229]) by mx1.freebsd.org (Postfix) with ESMTP id 1B547156 for ; Tue, 16 Apr 2013 07:14:04 +0000 (UTC) Received: by mail-we0-f169.google.com with SMTP id x43so120181wey.28 for ; Tue, 16 Apr 2013 00:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=t81aB+rPks49e7xNSjNlC3iYCaudjcRGgiRHoXYdMBU=; b=JtPfh4uzqHUdVlgNK/N9lutiuhrtLzoWAPdvJFNccNx0DSN1cK3VCiKOtxLtZ5i3rz EJzwYB5Z+9KXZrpQWBi1kqP9STa9ChOdPMcmaylF7AXYKnXUgtWRL+4bp0dNYjbMR/79 p5C3tlyp7ZzwtAXcaEOadG9wTJhSvFEmiOCuZOZJ7Vpi98dUKsNbu3aJc9ygodPXxDUz WH4e+8uEohC7mcDVPD2FeovWBFLIPgZ/ztyvB13DKWxuz/uhg6OdKOKGy9K8UEnXq6Qd 0qLGMWK2p7hDrjM+60/Y4Xx4uHg3/qhLTA2CfMiyXiCzMOWKaME2FYCa0DM5iutKCN+a fWkQ== MIME-Version: 1.0 X-Received: by 10.180.90.41 with SMTP id bt9mr1419769wib.19.1366096444332; Tue, 16 Apr 2013 00:14:04 -0700 (PDT) Received: by 10.194.76.147 with HTTP; Tue, 16 Apr 2013 00:14:04 -0700 (PDT) In-Reply-To: <1366087768996-5804167.post@n5.nabble.com> References: <1366087768996-5804167.post@n5.nabble.com> Date: Tue, 16 Apr 2013 09:14:04 +0200 Message-ID: Subject: Re: ZFS mounting failed with error 2 From: David Demelier To: Beeblebrox Content-Type: text/plain; charset=UTF-8 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 07:14:05 -0000 2013/4/16 Beeblebrox : >>> 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