Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2012 17:14:30 -0500
From:      Bryan Drewery <bryan@shatow.net>
To:        Peter Jeremy <peterjeremy@acm.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS with multiple boot/root pools
Message-ID:  <4F9F0EC6.1060802@shatow.net>
In-Reply-To: <20120430210711.GA50280@server.vk2pj.dyndns.org>
References:  <20120430210711.GA50280@server.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F9F0EC6.1060802>