After pulling my hair out over DFS I just had this weird and potentially dangerous idea come into my head whereby, just possibly, I might be able to use HA-Proxy to load balance a file share between servers.
I've done some remedial packet traces and it does appear that TCP port 445 is the only thing involved in using Windows file sharing. I've always thought for many years that UDP 139, 135 etc were also involved in at least establishing the connection - but apparently not!
So I setup a basic test:
listen SMBTest *:445
server Smb1 172.16.61.201:445
server Smb2 172.16.61.202:445
And you'll never guess what... it works??? (!)
Now obviously there is the whole concern about synchronisation between the file servers (of course). That could easily be taken care of with a little bit of Robocopy script.
And considering I only need a HA read-only file share there wouldn't be any issues with regard to file locking etc.
- Can anyone tell me if what I'm playing with here is fire? I really didn't think it would work at all and now I'm a little shocked.
- What would be the downsides?
- Could this be relied upon for a production environment?