From owner-freebsd-hackers@FreeBSD.ORG Wed May 20 19:16:16 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44953DF0; Wed, 20 May 2015 19:16:16 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 006061930; Wed, 20 May 2015 19:16:16 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yv9TQ-0006NK-AM; Wed, 20 May 2015 22:16:12 +0300 Date: Wed, 20 May 2015 22:16:12 +0300 From: Slawa Olhovchenkov To: Allan Jude Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD Boot Environments Message-ID: <20150520191612.GC21070@zxy.spb.ru> References: <20150520181006.GB21070@zxy.spb.ru> <555CD1DB.6010807@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555CD1DB.6010807@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2015 19:16:16 -0000 On Wed, May 20, 2015 at 02:26:35PM -0400, Allan Jude wrote: > On 2015-05-20 14:10, Slawa Olhovchenkov wrote: > > I am try to use Boot Environments and have some misundertanding. > > As I see beadm manage only zroot/ROOT. But base upgrade touch not only > > /{boot,etc,bin,lib,libexec,rescue,sbin} but also /usr and from time to > > time /var. And don't touch (at most) /root. > > > > What correct way to use Boot Environments? > > Rename zfs datasets as: > > > > From To > > zroot/usr zroot/ROOT/default/usr > > zroot/usr/home zroot/home > > > > create > > > > zroot/root > > > > leave (rename after moving zroot/usr) > > > > zroot/usr/ports > > zroot/usr/src > > zroot/usr/local > > > > Or somehow else? > > > > How prepare upgrades for such install? > > > > Create model setup, witch similar enviroment > > zfs snap modelroot@N > > do install{world,kernel} DESTDIR=/modelroot > > do mergemaster -I -U -D /modelroot > > zfs send -i N-1 modelroot@N | ssh host zfs recv zroot/ROOT/new > > > > Or somehow else? > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > The typical way (done by bsdinstall) is that your zroot/usr dataset, is > set 'canmount=off', and only exists for you to create child datasets. > > Any files written to /usr/bin etc, actually end up going to the > ROOT/default dataset > > you can tell by looking at 'zfs list' and your zroot/usr is only like > 200kb, instead of 100s of megabytes. It also won't be listed in the > output of 'mount'. Yes, I see. Thanks. What about creating zroot/root? What about send/recv? And how I can have localy changed /boot/loader.conf, /etc/rc.conf and other /etc/ files?