From owner-freebsd-questions@FreeBSD.ORG Wed Jun 11 03:21:45 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC096824; Wed, 11 Jun 2014 03:21:44 +0000 (UTC) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.dweimer.local", Issuer "webmail2.dweimer.local" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B4AEF2105; Wed, 11 Jun 2014 03:21:43 +0000 (UTC) Received: from www.dweimer.net (webmail [192.168.5.2]) by webmail.dweimer.net (8.14.7/8.14.7) with ESMTP id s5B2xHMG080058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jun 2014 21:59:18 -0500 (CDT) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 10 Jun 2014 21:59:17 -0500 From: dweimer To: freebsd@fongaboo.com Subject: Re: beadm basics Organization: dweimer.net Reply-To: dweimer@dweimer.net Mail-Reply-To: dweimer@dweimer.net In-Reply-To: References: Message-ID: <9957bd5a6d6a0ebbe0c0c3300a4737ea@dweimer.net> X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/1.0.1 Cc: questions@freebsd.org, owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jun 2014 03:21:45 -0000 On 06/10/2014 6:42 pm, freebsd@fongaboo.com wrote: > Nevermind I realized there needs to be a reboot between the first > creation/activation and the installation/upgrade you are performing. > > > On Tue, 10 Jun 2014, freebsd@fongaboo.com wrote: > >> >> I'm trying to learn ZFS and beadm. I wanted to do a proof-of-concept, >> so I ran 'beadm create ', then ran 'beadm activate >> '. >> >> I then installed something from ports (in this case, zfs-stats). I >> reactivated the default instance in beadm and rebooted. BUt I am still >> seeing zfs-stats installed. >> >> In my understanding of beadm, shouldn't the machine be in the state it >> was prior to the zfs-stats install? >> >> >> >> ------------------------------------------------------------------------- >> shot through the heart ooh baby do you know what that's >> worth >> and you're to blame ooh heaven is a place on >> earth >> darling you give love they say in heaven love comes >> first >> a bad name we'll make heaven a place on >> earth >> ORBITAL "Halcyon >> Live" >> _______________________________________________ >> 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" >> > _______________________________________________ > 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" I have been using this quite extensively since I learned it, the shorter down times with updates, and the ability to go back if something went wrong quickly has been a huge sleep saver, as I can all the work with the server live during normal work hours. Then just reboot then test applications at night time from home after hours. ### method 1, installing ports or port updates beadm create beadm mount /jails/devel/ROOT ## Have a jail configured with /jails/devel/ROOT as its ROOT ## With scripts that mount /usr/ports & distfiles under jail jail -c devel jexec tcsh install new ports or updates etc... exit jail jail -r devel beadm umount beadm activate reboot ### Method 2, building world, installing ports and updates. ### Note: works great from P1, P2... but if going from say 9.2 to 10, gets a little tricky beadm create beadm mount /jails/devel/ROOT setenv MAKEOBJDIRPREFIX /jails/devel/ROOT/usr/obj setenv DESTDIR /jails/devel/ROOT setenv __MAKE_CONF /jails/devel/ROOT/etc/make.conf setenv SRCCONF /jails/devel/ROOT/etc/src.conf mount -t nullfs -o ro /usr/src /jails/devel/ROOT/usr/src cd /jails/devel/ROOT/usr/src Do buildworld/install/mergemaster ## IF port updates are also necessary see steps above to start jail & update ports unsetenv MAKEOBJDIRPREFIX unsetenv DESTDIR unsetenv __MAKE_CONF unsetenv SRCCONF umount /jails/devel/ROOT/usr/src beadm umount beadm activate reboot I can provide more detailed jail configurations, and some scripts I have setup to simplify the process if your interested. -- Thanks, Dean E. Weimer http://www.dweimer.net/