Date: Mon, 20 Apr 2009 20:06:13 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Tom Worster <fsb@thefsb.org> Cc: freebsd-questions@freebsd.org Subject: Re: portmaster -a on a live server Message-ID: <49ECC7A5.8020002@infracaninophile.co.uk> In-Reply-To: <C6123B91.97DB%fsb@thefsb.org> References: <C6123B91.97DB%fsb@thefsb.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Tom Worster wrote:
> though all i really need is mysql/apache/php i have about 100 ports
> installed and portmaster -a takes a long time to complete (hour or two).
>
> so i'm wondering if i ought to be concerned about new binaries being
> installed over the old ones on the disk while the old images are loaded and
> running as daemons.
>
> instead of doing portmaster -a, is there any advantage to:
>
> portmaster -a -x mysql\-server -x apache
> portmaster mysql\-server apache
> reboot
>
> in order to minimize the time that the old servers are running while the new
> images are on the disk?
>
Many ports will shut down a running instance of themselves when upgraded
like this specifically to avoid the sort of complications that can occur
when the running image does not match what is on disk.
mysql does, apache doesn't.
So upgrade mysql-server last thing before you reboot. Although I know you're
not using portupgrade, this snippet from pkgtools.conf has been a blessing in
minimizing outage lengths during updates on live servers:
AFTERINSTALL = {
'*' => proc { |origin|
cmd_start_rc(origin)
},
}
Of couse, the best course of action is to plan sufficient downtime that you
can do the upgrades comfortably plus recover from any number of ways things
might go wrong, but sometimes that simply isn't possible.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEAREIAAYFAknsx6oACgkQ8Mjk52CukIzPmwCfRCqtlZmSbzOBooatJwC+utD/
uwAAnj6WoJcFnYXURSLgMP/zmHPxq0wy
=G2yq
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49ECC7A5.8020002>
