Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I have two servers, one running Windows Server 2003, and one running Ubuntu 10, what would be the best way to 'map' one's drive to another? Either way is fine. They are each in a different state, and each have an external IP. I just need to do some processing on the Ubuntu server, then write the file either to its own drive, and have the web server (Windows) read it, or, have it write to the Windows HDD, and have Windows read it.

share|improve this question
    
How fast is the connection between the two servers? –  Majenko Mar 15 '11 at 14:52
    
@Matt: Not sure exactly. The Windows one is a dedicated one, held at a hosting company in Texas I want to say, that one's fast I'm sure. The Ubuntu one is in-house here in Illinois, and we're on commercial internet. Both are pretty fast I suppose. –  Josh Mar 15 '11 at 14:55
    
But not reliable - not a dedicated link between the two. Ok, here comes my answer. –  Majenko Mar 15 '11 at 14:56

2 Answers 2

up vote 2 down vote accepted

The best thing you can do, as the link between the two servers isn't a 'reliable' link (i.e., dedicated connection but subject to third party outages) is to create the file locally on the Ubuntu box and then copy it across to the Windows machine when it is complete.

Mounting filesystems or shares across an unreliable link can cause many problems with systems freezing as they try to access a filesystem that isn't there, etc.

The program I would recommend for copying the data across depends on how sensitive the data is.

If you're not worried about encrypting the data, or if you already have encryption in place (say a VPN) then the smbclient program, which operates very much like FTP but on windows shares, would probably be the easiest:

$ smbclient '\\server\share' -I <ip address> -A /path/to/authentication/file -c "put myfile.dat"

Or something similar. The smbclient manual page can be found here

If you are more worried about security then I would recommend installing a SSH server on the windows machine and using scp to copy the file across.

share|improve this answer

You could setup Samba + OpenVPN and map the Ubuntu drive into the Windows. Or, you could setup an SSH channel between them and use rsync in daemon mode to monitor the data changes. I would go with the first option - it is easier to setup.

share|improve this answer
    
This is less than optimal between two remote servers - if the link goes down it can cause all sorts of problems when one server tries to access the drive of another that it can't communicate with. –  Majenko Mar 15 '11 at 15:05
    
@Matt: Thanks! Point taken. –  grs Mar 15 '11 at 15:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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