I have a Windows 2008 R2 failover cluster server. I am going to move one of our window services onto this new server. The service writes some trace information to a log file on the local harddrive. This will become a problem when it is moved to cluster server when cluster A become unavailable and cluster B takes over and now there are 2 places where I need to look for log files. Is there a way to make sure regardless of which cluster is on, I get one complete log file?

I have been researching this and there is something called DFS replication but i was wondering if there is something better that works with failover cluster...

I prefer not having to update my code. I can specify it to write log files to a different location by changing app.config file but no code change...

  • Can the log not be written to shared storage? Oct 31 '13 at 0:12
  • That is a good point. Assume there are only 2 machines total. Putting it on a traditional windows file share on one of the 2 machines would defeat purpose of using failover cluster
    – user156144
    Oct 31 '13 at 0:14
  • Assuming that you're implementing the service in an active/passive fashion and that it will be running on only one node in the cluster at a time then I don't see how this is an issue. If node A is the active node then you know the current log file is on node A. If node B is the active node then the current log file is on node B. I don't see why you need to "look" for the log file. You'll always look for it on the active node. Is there some logic that is escaping me?
    – joeqwerty
    Oct 31 '13 at 0:44
  • you are right that log files will be written to the active node. What I want is to have one log file that shows contents of both log files so each time i need to anaylze them, i don't have to merge those 2. Merging is more difficult than you think if you want chronological order
    – user156144
    Oct 31 '13 at 1:16

Normally a failover cluster will have some type of external shared storage like SAN or DAS. If your service is a clustered service, you should associate a shared volume with it and write your data to that. This way there is only a single copy of the data, and if your service fails over to the other node, the volume goes with it.

This is generally how clustered services work.

  • thank you for the answer. Our set up is to have 2 nodes in different buildings in case one of the lose power. Our SAN is per building specific so we don't have external shared storage. Is there a way to do this with 2 servers and no external storage?
    – user156144
    Oct 31 '13 at 18:40
  • @user156144 If you have another server you could expose some storage over iSCSI to the two servers, or you could have the service write to an external location like a file share. Note that in order to properly run a two-node cluster you will need some kind of external quorum witness such as a shared disk or file share, so you could use whatever storage that sits on.
    – phoebus
    Oct 31 '13 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.