English 中文(简体)
How to accomplish a Windows share failover system?
原标题:

I have a primary and a backup windows 2008 server, and a bunch of windows XP clients that map a drive to a share on the primary server. If the primary server goes down, I want those client machines to automatically re-map their drive to the backup server, so they can continue to access the files.

Should I try to write a vbscript or python script or something that detects if the primary server is down and issues the appropriate "net use m: servershare ..." but I need that script to run every minute, no matter who is logged in. Can I do that with windows "scheduled tasks" ?

I m a Unix guy, and could use any tips you have to offer on accomplishing this. Is there a better solution?

many thanks, -Ian

最佳回答

That sounds like you need a client side solution then, unfortunately. Something along the lines of the following, in a .cmd file in each machine s startup folder or otherwise placed so that upon failure to connect, this file is executed:

if not exist \server1sharename goto mapsecondserver 
net use z: \server1sharename 
goto end 

:mapsecondserver 
net use z: \server2sharename 
goto end 

:end 
问题回答

You could use DFS and have clients map to that for their share. Then they d be redirected to one server or the other. This assumes that your DFS server stays up, of course.





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签