From owner-freebsd-fs@FreeBSD.ORG Sun Aug 17 00:34:14 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28E19162 for ; Sun, 17 Aug 2014 00:34:14 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A22832E74 for ; Sun, 17 Aug 2014 00:34:13 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id s18so3460625lam.28 for ; Sat, 16 Aug 2014 17:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=FHayqX3xM1XASYG2NawYhnoKpPUKKHwh9jQTrb2gARM=; b=oHGgi1o6Nt7GTCVP+NiqY2TqjS1mpq2tmGpvMdWX8kZv6yyj8VH4wI9KBAD0R7pjBw 2pv2K1g+fTHjq2lFhCXjcMkDINe9rIxT96qeHUIljCXi77hI5S62TlbCyLx4SV2dGV7H toxzxk3zhAA4UwqdmVIhk1KPhQvxy2cG1WaOMzghWv7yyJJVbVMCOh8OGJQ+l+C9KFqU 8nJbcWBFDoCGMhK4Cr+ll0XPcEBu//dDMcHCxgPtT9RDtywDRuJbF4ZrJXOnZ8H11VJn mGl2wjEiSG5oELiId8qc9/Cu5DpLlo4PTsX8hQyxZV1tVSNgbzVK8Bba9XmBptMAa6nY N2oA== X-Received: by 10.112.118.68 with SMTP id kk4mr8568481lbb.4.1408235651132; Sat, 16 Aug 2014 17:34:11 -0700 (PDT) Received: from [192.168.6.21] (ppp-62-216-218-181.dynamic.mnet-online.de. [62.216.218.181]) by mx.google.com with ESMTPSA id kh9sm19767150lbc.5.2014.08.16.17.34.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Aug 2014 17:34:10 -0700 (PDT) Message-ID: <53EFF87F.7080507@gmail.com> Date: Sun, 17 Aug 2014 02:34:07 +0200 From: Thomas Schweikle User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Thunderbird/34.0a1 MIME-Version: 1.0 To: Anton Sayetsky Subject: Re: zfs only mounting "root" after reboot References: <53EF3036.8050203@gmail.com> In-Reply-To: <53EF3036.8050203@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2014 00:34:14 -0000 On 16.08.2014 12:19, Thomas Schweikle wrote: > On 16.08.2014 11:12, Anton Sayetsky wrote: >> man rc.conf >> /zfs_enable > > This is allso set -- just forgot to mention it: > # cat /etc/rc.conf > [...] > zfs_enable="YES" > After digging deep into how FreeBSD boots if zfs is used as root I found the solution to this problem. It is with any special filesystem like "linproc", "fdesc", or others you might use, as long as these are mounted to someting *not* in zfs:zroot. FreeBSD mount only zfs:zroot, then, after doing some work not requiring any of /tmp, /usr or /var. Then mounts everything given in fstab with "mount -a" except those marked with option "late". After having done that all further zfs:zroot mountpoints are processed by executing "zfs mount -a". Last thing done is mounting everything marked with "late" in fstab by "mount -al". Since some of these special filesystems require /tmp, /usr or /var being mounted this fails and FreeBSD bails out into a single user shell. The solution is to move mounting these later in the boot process, after /tmp, /usr or /var are mounted. This is done by adding option "late" to these file systems, as given below # cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/acd0 /cdrom cd9660 ro,noauto 0 0 # linproc /compat/linux/proc linprocfs rw,auto,late 0 0 fdesc /dev/fd fdescfs rw,auto,late 0 0 # /dev/gpt/swap0 none swap sw 0 0 I think this shall be mentioned in the FreeBSD handbook, but couldn't find any hint to it. Is it a bug with zfs mounting? Is it intended to have zfs mounts happen before working on fstab mounts? If not, it could be useful to make more clear what happens and that you *must* mark filesystems depending on /tmp, /usr or /var to mount "late"! -- Thomas