From owner-freebsd-fs@FreeBSD.ORG Mon Apr 30 22:14:34 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 083B8106566B for ; Mon, 30 Apr 2012 22:14:34 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1618FC0A for ; Mon, 30 Apr 2012 22:14:33 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=hpqujM snM6XmJyAZ8XAEfB44X64SWOyrj7uho8EzJX19nxitJg1e5oTWeZu+NtbhnLSksJ kNMvK8zkgtMh858v6VvVvbs7Q4aTPVcLNAXJzeDzvA2Mf4CRnJUuog49J/tmTUcq nPtD5xPKoG8SzhqsI8dbAh7/6ifWH5RHo4yUk= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=z4zByR/GxzWF HPPlTkhXo0xOuytfxwfY0bcKv3ydRW4=; b=Vj0jZD8RA9MoGhTcFOuCAd+1xYOY 0ov7pvrJYpP+9kOU6Yl7T02EJKVC7o5QucW8IvGDE3s9HwWNq4vqEgGr23klNKbA zSqv0wdMy0GyFszmfS90DrzO4Yju5Q5CmxTfF2Q9/sTNcqJNt/IPnbTS0Pt5Y/y6 urEYBdDloM2nZ+g= Received: (qmail 49474 invoked from network); 30 Apr 2012 17:14:30 -0500 Received: from unknown (HELO ?192.168.0.107?) (bryan@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 30 Apr 2012 17:14:30 -0500 Message-ID: <4F9F0EC6.1060802@shatow.net> Date: Mon, 30 Apr 2012 17:14:30 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Peter Jeremy References: <20120430210711.GA50280@server.vk2pj.dyndns.org> In-Reply-To: <20120430210711.GA50280@server.vk2pj.dyndns.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: ZFS with multiple boot/root pools X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2012 22:14:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/30/2012 04:07 PM, Peter Jeremy wrote: > I have boot/root on one ZFS pool and for recovery purposes keep a > second ZFS boot/root pool in case the first one becomes > unbootable. > > My problem is that: 1) A zpool must be imported to be bootable 2) > Most ZFS root filesystems have absolute mountpoints specified 3) > /etc/rc.d/zfs automounts all imported ZFS filesytems results in > double mounts of various filesystems. > > Can anyone suggest a way to configure a zpool or set of > filesystems so that they will only be mounted if the root > filesystem is within the zpool. > > I looked at the "zfs mount -a" in /etc/rc.d/zfs but there doesn't > appear to be a suitable alternative. A variant that mounted all > automount filesystems within a specified list of zpools would work > but doesn't exist. > > Any other suggestions? How do other people handle this? > 'zfs set canmount=noauto' on all of your non-active datasets. This will stop 'zfs mount -a' (/etc/rc.d/zfs) from mounting them. This propery is *not* inherited, so you do need to set it on *all* of them if you have set a specific mountpoint. There's also a port sysutils/beadm for managing multiple boot environments. Support for having children datasets in the environment is still a work in progress. See also: http://forums.freebsd.org/showthread.php?t=31662 Regards, Bryan Drewery -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJPnw7DAAoJEG54KsA8mwz5C4gP/1++l+ZvCnCAP8aeSDisCwy+ 8iJCTmt3ClIu2MD9ZC3Zow+vuz8R6ykjNK+wCmLNLQJ7NP0HF+tPqZWapXLPMiA+ pcke5Y6gjW3KfhoYgcjZxuKLKo+NMCa1wNCcfymratPg9JomD7/d7ULKDLaZLuFv vUcfWw59+d8yMPA6gamW+V9mVt1RlEwI2PLttwbfbw/fj3khdfAtAVYvjG2MztLQ 3vk6Y9WJ4NwU2gQ9XU1vKJ9xQY2TdSnZFEimMSgT4LIHbFk65CgW3NB87gu7JLn4 +ZVc5Ymsbf/2iABbRMzsutBSbllnVmAx20cJ2lFxMeNy+pgp2QBcM9cSiigzXF2t T+rsjhQh5+wV/60rx532uncs81arCg/ZQOEiub/BtfD5LQuezlqmDUnPIgaUmANn VAXPkVZ3x0ZXfzRxBI35Q4QecH+8j5gJJauEyAKLqMwKGJx7K+3gx4dUdERADE77 b/fBCW05XBTX8/drAwG+K2Qmp8rTCyv2VTgnbh2/VWbiBrHRVqfQVKB4bssb2r5r yk1PYroaCm4wBwrWfIOQzKdudR0D9B7sS26coK4E+8w+z5wh8QSIv5eoaQ0tHLLM 8cM9MNrrKQDSmeqQoikhlLwCeREIcxEVy5yU3IXaNWF0jfc9qVFwXmL1JM8GO05A 43g28SxOHZsy9SN299Oj =fqrH -----END PGP SIGNATURE-----