From owner-freebsd-stable Fri Aug 2 5:29:56 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D19D37B400 for ; Fri, 2 Aug 2002 05:29:52 -0700 (PDT) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id A253743E4A for ; Fri, 2 Aug 2002 05:29:51 -0700 (PDT) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.12.5/8.12.5) with ESMTP id g72CTpc9089715; Fri, 2 Aug 2002 05:29:51 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.12.5/8.12.5/Submit) id g72CTpE7089714; Fri, 2 Aug 2002 05:29:51 -0700 (PDT) Date: Fri, 2 Aug 2002 05:29:51 -0700 (PDT) From: David Wolfskill Message-Id: <200208021229.g72CTpE7089714@bunrab.catwhisker.org> To: johan.bjork@qbrick.com Subject: Re: Tracking -Stable on several machines? Cc: stable@freebsd.org In-Reply-To: <3D4A5183.2000808@qbrick.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Date: Fri, 02 Aug 2002 11:31:47 +0200 >From: =?ISO-8859-1?Q?Johan_Bj=F6rk?= >Have an idea about how to make my work of updating several >server easier. >Using a local CVSup server that take the all-source from >cvsup.XX.freebsd.org once a day(or less). >Then buildworld and installworld (or "make all install") on that the >same machine. OK... but I recommend that you do this by actually mirroring the CVS repository itself, rather than using CVSup to update /usr/src directly. If you do this, you will be able to create a /usr/src as of any branch & date/time -- you can track any such branch, all with the same CVS repo; /usr/src would just be a normal CVS "working directory" (as would /usr/ports). >To have the binaries/lib uptodate on my servers I will rsync /usr/bin >/usr/sbin /usr/lib ect.. That might work, as long as you're using the same (or close enough to the same) hardware. The approach I've used is NFS installs, but I expect that rsync could also work. >Then the servers will do cvsup from my local cvsupd to get the src-sys. >After that I just have to make/install the kernel on every server. Again, what I do is have a dedicated "build machine" that builds the world, its own kernel, and the kernels for the other machines. Then the NFS install involves: * mount build machine's /usr/src & /usr/obj on the target machine * On target machine: * cd /usr/src * make installkernel KERNCONF= * make installworld * mergemaster * reboot This isn't guaranteed to be safe; although it has worked for me for quite some time (I've been doing it regularly here at home for nearly a year now, and I had experimented with the approach on an ad hoc basis some time prior to that), you may need to reboot in single user mode after the "make installkernel". If you do, you'll need to get networking going manually, but that's certainly doable (ref. the install process from floppy/network). The other thing I do is to set up 2 boot slices for each server, and just before updating a given server, I * "clone" the active slice to the inactive one (use dump/restore to copy the / and /usr file systems, then tweak /etc/fstab on the copy). (In normal running, I generally have /usr be read-only, and very little gets updated on / -- I set up /tmp to be a separate file system, as an MFS.) * reboot from the newly-copied slice. (If there's a problem at this stage, fall back to reboot from the slice we had been running from before.) * Go through the above-listed "update" steps (mount; NFS install; reboot). * Make *sure* things are OK. (Again, fallback is to reboot from old slice.) >How will people do this? Is this possible? As noted, I've been doing this for a couple of weeks shy of a year, here at home. And the target machines don't have their own copy of /usr/src; it stays on the build machine, which also has a local copy of the FreeBSD CVS repository (as well as a local one for my kernel configs &c.) Of course, I also do things to ensure that I'm familiar with the changes -- that's one reason I track -STABLE daily on my laptop, too. Cheers, david (links to my resume at http://www.catwhisker.org/~david) -- David H. Wolfskill david@catwhisker.org To paraphrase David Hilbert, there can be no conflicts between Microsoft and the discipline of systems administration, since they have nothing in common. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message