[CentOS] how do i have a clone centos server

Jeff Larsen jlar310 at gmail.com
Fri Mar 28 16:44:08 UTC 2008


On Fri, Mar 28, 2008 at 9:22 AM, Mail Administrator
<mailadmin at baladia.gov.kw> wrote:
<snip>
>  now i would like to have another server like mirroring this server ..
>  so incase there is any problem with this server the other server is always
>  online and the problem server could be fixed without our users gettin
>  affected
>
>  apprecite if anybody can help giving some clues or is there any software
>  avaliable.
>  also is the hardware in both servers have to be identical or it can be
>  different

That is indeed, the holy grail of server administration and is not
easily achieved.

For DNS, you can define a master/slave server setup and have both
online at the same time. I'm not sure what MailScanner needs as far as
real-time data storage. Perhaps it can just be set up in parallel and
either machine could filter messages.

Mail message storage is your primary problem, as the data constantly changes.

The simplest way might be to house your mail store on a third server
and mount it with NFS. Then if your primary goes down, simply boot up
the secondary, mount the live data files and away you go with only a
momentary service interruption. One problem with this setup is that
whenever some configuration detail changes, you must change it on
another machine. And you need to be concerned with the redundancy of
the file server. There is also the issue of user accounts for mail.
Are they local to the mail server or do they reference an external
directory server?

You could rsync the mail files between servers to have a
near-real-time copy, but any resulting inconsistencies could be a
problem for your mail software. The only safe way to rsync a mail
server is to do it while the mail services are stopped. You could stop
the mail server, take a file system snapshot, then restart the mail
server which would only take a few seconds. Then rsync from the
snapshot to the backup and delete the snapshot when done.

More advanced options are clustering and drbd but those are toys I've
never played with. However, as search terms on Google, they will get
you started in the right direction. But they are probably overkill.

Judging by your machine specs, I'm guessing this is a pretty small
scale operation. Your best bet might simply be to do nightly backups
and have spare hardware at the ready. The most likely point of failure
is the hard disk, so get another one and set up raid 1. Other than
that, your hardware will probably run for years without issue. We all
want 100% uptime, but you have to weigh the cost against the actual
need.

--
Jeff



More information about the CentOS mailing list