If the log files are being generated on the client server via the syslog
facility then the best way is to setup the clients syslog daemon to forward those logs to a seperate host. For example, if I have an internal name syslog.private
which points to the remote server that I want to receive the log entries. I can add the following line to the /etc/syslog.conf
on the client server.
*.* @syslog.private
and then restart the syslog daemon on the client
service syslog reload
This will cause every entry that passes through the clients syslog to be sent across the wire to syslog.private
and if that machine is configured correctly, the entries will be available there as well. In RedHat systems this is controlled by the /etc/sysconfig/syslog
file. Make sure the -r
option is present
% grep "SYSLOGD" /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0 -r"
and then restart the syslog daemon on the receiving server.
You can also control what is forwarded to the remote server by adding exclusions, see the example below
*.*;mail.none @syslog.private
Which says forward everything to syslog.private
with the exception of anything sent to the mail
facility.
If this solution works out for you, you may consider one of the alternate syslog implementations like rsyslog, or syslog-ng, which provide extra logging and storage options.
DRBD is great.
The good things:
- It does a magnificent job at replicating data
- DRBD has in a couple of cases prevented disaster, where it has discovered that the volume was already mounted on the other node, which the raw volumes we get from a SAN are unable to tell us.
- Heartbeat already has great support for DRBD.
The challenges:
- Remember to monitor it properly, so you discover split brains when they happen - and can deal with it.
- DRBD can't be mounted on both servers without a cluster-enabled filesystem on top - I don't have any experience with that part.
- It is easy to "DOS" the servers by configuring DRBD to use all the available bandwidth for syncing disks. Just configure for lower throughput, and you're OK.
For mounting "the same" filesystem on several nodes, we keep going back to NFS, even though we keep testing various solutions for it. A setup I have no problem with having in production is NFS on top of EXT4 on top of DRBD. I wouldn't dare to do this with the database filesystems, but it's OK for the wwwroot.
Best Answer
This worked for me: