Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2002 05:29:51 -0700 (PDT)
From:      David Wolfskill <david@catwhisker.org>
To:        johan.bjork@qbrick.com
Cc:        stable@freebsd.org
Subject:   Re: Tracking -Stable on several machines?
Message-ID:  <200208021229.g72CTpE7089714@bunrab.catwhisker.org>
In-Reply-To: <3D4A5183.2000808@qbrick.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>Date: Fri, 02 Aug 2002 11:31:47 +0200
>From: =?ISO-8859-1?Q?Johan_Bj=F6rk?= <johan.bjork@qbrick.com>

>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=<machine-specific kernel name>
  * 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208021229.g72CTpE7089714>