From owner-freebsd-jail@FreeBSD.ORG Sat Aug 2 07:28:21 2008 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEF121065676 for ; Sat, 2 Aug 2008 07:28:21 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [91.103.162.4]) by mx1.freebsd.org (Postfix) with ESMTP id AE8418FC16 for ; Sat, 2 Aug 2008 07:28:21 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id ED98C19E023; Sat, 2 Aug 2008 09:28:19 +0200 (CEST) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id B51AC19E019; Sat, 2 Aug 2008 09:28:17 +0200 (CEST) Message-ID: <48940CAB.9040001@quip.cz> Date: Sat, 02 Aug 2008 09:28:43 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: freebsd-jail@freebsd.org References: <489398AD.6000900@webanoide.org> In-Reply-To: <489398AD.6000900@webanoide.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: The best way to upgrade my FreeBSD and its jails X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2008 07:28:22 -0000 Mikhail Goriachev wrote: > Redd Vinylene wrote: > >> My dedicated server is mother, its two jails are camel and box. Is >> this the best way to upgrade all of them? > > > We probably should keep this to freebsd-jail@ only. > > Had a look at http://pastie.org/245821 and have a few notes for you: > > 1.- As Miroslav already mentioned - it is not a good idea to daisy chain > everything. You should break the procedure into two steps. Firstly > upgrade the host and make sure the upgrade went well. Once you're > certain that everything is ok, then proceed upgrading jails. > > I personally disable jails (jail_enable="NO"), then reboot (to avoid any > zombie jails), perform upgrade on all jails and then enable them back on. > > 2.- Your upgrading sequence is a bit off. Have a look at > /usr/src/Makefile for further details and correct sequence: > > # make buildworld > # make buildkernel > # make installkernel > # reboot > # mergemaster -p > # make installworld > # make delete-old > # mergemaster > # reboot > # make delete-old-libs > > 3.- You don't need kernels inside your jails. Having them won't hurt > you, but they consume space. In other words, you shouldn't execute the > following (or similar): > > # make DESTDIR=$D installkernel > > 4.- The "make distribution DESTDIR=$D" should be executed only once - > when a jail is created. Otherwise you're nuking your configurations in > jail's /etc and probably somewhere else. One thing to note - If you do delete-old delete-old-libs you probably need to recompile all installed ports because of lib dependencies. > Have a go at this, you might find some use for it: > > ----------------------- > JAILSDIR=/usr/local/jails > > cd /usr/src > > for jail in `ls ${JAILSDIR}`; do > mergemaster -pD ${JAILSDIR}/${jail} > make installworld DESTDIR=${JAILSDIR}/${jail} > mergemaster -iD ${JAILSDIR}/${jail} > done > -----------------------