From owner-freebsd-fs@FreeBSD.ORG Fri Feb 20 21:50:01 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2408635E for ; Fri, 20 Feb 2015 21:50:01 +0000 (UTC) Received: from smtp.atelo.org (atelo.org [198.100.144.64]) by mx1.freebsd.org (Postfix) with ESMTP id EF46CE89 for ; Fri, 20 Feb 2015 21:50:00 +0000 (UTC) Received: from coyotlan (cpe-76-88-16-9.san.res.rr.com [76.88.16.9]) by smtp.atelo.org (Postfix) with ESMTPSA id A137C759D27; Fri, 20 Feb 2015 13:50:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=atelo.org; s=mail; t=1424469044; bh=m1MXp6jvwKPPbM8eKDs+DpkljFnjYlCzVG2OM2v6L2w=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JRdCrDbzlnig3Bsc9P63lg2h0RGK7uREfjdKOBNWWEK8T+PMzcI5v7j9lBytv+9ya bH08LCAgBMbuLyQ2ZaYUwizIAeoEkV9cyQev7ulf6Fa0KUX4Sil4jNeGEe6JSxV4o3 ZP9xwzBMjUIrMegJeEKmrxc7EGB/Eh3zulTfTGAo= Received: from localhost (coyotlan [local]); by coyotlan (OpenSMTPD) with ESMTPA id 8db773f6; Fri, 20 Feb 2015 21:49:52 +0000 (UTC) Date: Fri, 20 Feb 2015 13:49:52 -0800 From: =?utf-8?B?WMSrY8Oy?= To: krad Subject: Re: ZFS root set to readonly=on temporary at boot Message-ID: <20150220214952.GA13839@coyotlan.Tlalpan> References: <20150218191345.GA31812@coyotlan.Tlalpan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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: Fri, 20 Feb 2015 21:50:01 -0000 On Thu, Feb 19, 2015 at 12:12:54PM +0000, krad wrote: > Check your bootfs and the / file system actually match up. Its quite easy > to get odd things happening if you have the bootfs set to a filesystem that > then has an fstab which then tells / is on another fs. Also check the > loader.conf on the bootfs. In my experiance its safer to have clean fstabs, > and nothing in the loader.conf (in relation to this) and just relay on the > bootfs pool property Thanks for the tips. I still could not figure it out though. My partition scheme is as follows: # gpart show => 34 3907029101 ada0 GPT (1.8T) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 3898640365 3 freebsd-zfs (1.8T) with a bootcode installed by: # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 The bootfs property of the zpool seems to be set to the correct root: # zpool get bootfs zroot NAME PROPERTY VALUE SOURCE zroot bootfs zroot local # zfs list zroot NAME USED AVAIL REFER MOUNTPOINT zroot 2.16G 1.75T 509M / The /etc/fstab only lists the swap partition (and there are no other fstab files, nor any unmounted snapshot/partitions): # cat /etc/fstab /dev/label/swap none swap sw 0 0 My loader.conf appears to be required for the server to boot: # cat /boot/loader.conf zfs_load="YES" vfs.root.mountfrom="zfs:zroot" Also, the root is mounted in read/write when manually imported from another system: # zpool import -R /mnt zroot # zfs get readonly zroot NAME PROPERTY VALUE SOURCE zroot readonly off temporary Anyway, it is not that huge a problem, but it is quite inconvenient not to understand what could be the reason behind that. As far as I can tell, it may be related to the fact that my root was not created in its own dataset: # zfs list NAME USED AVAIL REFER MOUNTPOINT zroot 2.16G 1.75T 509M / zroot/ezjail 984M 1.75T 27K /usr/jails zroot/var 284M 1.75T 10.6M /var […] I might check that later on. Best, Xīcò