From owner-freebsd-questions@FreeBSD.ORG Sun May 20 20:25:01 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F049E106566B for ; Sun, 20 May 2012 20:25:00 +0000 (UTC) (envelope-from goran.lowkrantz@ismobile.com) Received: from mail.ismobile.com (mail.ismobile.com [62.119.44.68]) by mx1.freebsd.org (Postfix) with ESMTP id 641698FC08 for ; Sun, 20 May 2012 20:25:00 +0000 (UTC) Received: from mail.ismobile.com (mail.ismobile.com [62.119.44.68]) by dkim.mail.arcticgroup.se (Postfix) with ESMTP id ECD3A1CE0D; Sun, 20 May 2012 22:24:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ismobile.com; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=selector1; bh=28y/5kV lsQqOzst1NEtl+tcHiqc=; b=JPSxb1E4cyO5aX7RZIUarbix71cqGWq2oKl7pU1 rKltJFBN9XchRz/dS10yOv2TLIYd64lWi347ErucFKB5UFbyV0FbpVqDxSFdCkCT fZ54t6OkB/UkG3i15okr021QJTtF7ugVshfL1KsAd3pGRYlpfs2KZYPVO/Tmvgx2 Y2sg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ismobile.com; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=selector1; b=K qYb4T4o4bsyNwPVMc4OSwbtPIhilAd//JpafP+n0mdzbhCKBjHtZhTfXP9mfGT+H AY0CX5QsYyEi429+raCgjpJF/r3/dCgRrENZqbfRHgWA8fW6Sw8/cqBFqpBFivvy riGu2QLAQebN0kpW8iwbBybChkKch5ojW/ijw5TRy4= Received: from [10.255.253.2] (modgunn.hidden-powers.com [213.242.135.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ismobile.com (Postfix) with ESMTPSA id 95C7F1CDEF; Sun, 20 May 2012 22:24:58 +0200 (CEST) Date: Sun, 20 May 2012 22:24:57 +0200 From: Goran Lowkrantz To: Chris Brennan Message-ID: In-Reply-To: <20120520104100.840fd1e7ddf3096c27520885@xaerolimit.net> References: <20120520104100.840fd1e7ddf3096c27520885@xaerolimit.net> X-Mailer: Mulberry/4.0.8 (Win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-questions@freebsd.org Subject: Re: ZFS mounting order X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2012 20:25:01 -0000 Hi, Assuming that you are using some version of diskless (man diskless), I build NAS boxes using NanoBSD (man nanobsd) and in that setup, I need to move the cache from /boot/zfs to /etc/zfscache so the cache can be mapped to the files copied to the cfg partision. So I added the following file to rc.d/zpool --------------------------------------------------------------------------- #!/bin/sh # # $FreeBSD: $ # # PROVIDE: zpool # REQUIRE: hostid # BEFORE: zvol # KEYWORD: nojail . /etc/rc.subr name="zpool" rcvar="zfs_enable" start_cmd="zpool_start" required_modules="zfs" zpool_start() { if [ ! -z "$zpool_cache" -a -r "$zpool_cache" ]; then zpool import -c $zpool_cache -a fi } load_rc_config $name run_rc_command "$1" --------------------------------------------------------------------------- This works very well for a disk server from USB, CF or mSATA SSD. I am not sure the BEFORE tag was required to make sure that this is the first ZFS related script run, before zvol, as zpool is sorted before zvol but I was not sure exactly how rcorder sorts. /glz --On Sunday, 20 May, 2012 10:41 AM -0400 Chris Brennan wrote: > Greetings! > > I have a FreeBSD 9 system with 3 different ZFS pools on it. I am > booting from a ro CF Card w/o any major issues, the problem I am > encountering is that zroot needs to be mounted at boot first, because > it contains /usr, zhome and tank contain other various sub-partitions > of /usr. > > Also, zroot causes me a lot of problems when I try to do "zpool > import", when zpool gets to probing zroot, I get g_vfs errors printed > to the console and the hacnine hangs till I reset it (which is > obviously not acceptable behavior.) I was able to get around this when > booting to my cf card by making / ro, which was my intention all along > for that media.) I suspect this happens because there is a on that > volume that is trying to replace something on / on either the USB boot > img or on my CF card and this might be causing either to freak out. > > So I dunno what to do to get this working the way it should and some > guidence would be greatly appreciated! > > -- >> Chris Brennan | http://xaerolimit.net | http://xaerolimit.net/forum >> A: Yes. >> > Q: Are you sure? >> >> A: Because it reverses the logical flow of conversation. >> >>> Q: Why is top posting frowned upon? >> http://xkcd.com/84/ | http://xkcd.com/149/ | http://xkcd.com/549/ >> GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8 9E4A EECD 9A84 D5B2 0C0C) > ------------------------------------------------------------------------ > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"