Date: Sat, 2 Aug 2008 12:03:57 +0200 From: "Redd Vinylene" <reddvinylene@gmail.com> To: "Miroslav Lachman" <000.fbsd@quip.cz>, "Mikhail Goriachev" <mikhailg@webanoide.org> Cc: freebsd-jail@freebsd.org Subject: Re: The best way to upgrade my FreeBSD and its jails Message-ID: <f1019d520808020303s43297b64k1187c9d286302b70@mail.gmail.com> In-Reply-To: <48940CAB.9040001@quip.cz> References: <f1019d520808011026n6c25d047y4b04e77022f8817@mail.gmail.com> <489398AD.6000900@webanoide.org> <48940CAB.9040001@quip.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks a lot guys for your great design insight! I hope others will find this thread interesting as well. Here's the final upgrade script I decided to use (my shell is zsh): - # FreeBSD/i386 mother.naoshige.net csup /etc/cvsupfile cd /usr/src make buildworld buildkernel && \ mergemaster -p && \ make installworld installkernel delete-old delete-old-libs && \ mergemaster -i -U && \ JAILS=/usr/local/jails cd /usr/src for jail in $JAILS/*; do mergemaster -p -D $JAILS/$jail && \ make installworld delete-old delete-old-libs DESTDIR=$JAILS/$jail && \ mergemaster -i -U -D $JAILS/$jail && \ done chflags -R noschg /usr/obj/* rm -rf /usr/obj/* - Much obliged! On Sat, Aug 2, 2008 at 9:28 AM, Miroslav Lachman <000.fbsd@quip.cz> wrote: > 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 >> ----------------------- >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f1019d520808020303s43297b64k1187c9d286302b70>