Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-16-2007, 07:49 AM
|
#1
|
Member
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105
Rep:
|
Keeping 2 drives mirrored
Hi,
I have 2 files servers and I need to keep a directory in each of them in active synchronization with
each other.
Eg) Server 1 has a directory called s1Dir
Server 2 has a directory called s2Dir
I need to keep those two directories mirrored.
The only thing I can think of is using rsync, and I suppose I could run rsync as a cron job to run every couple of seconds.
Is that the best way of doing things?
Is there a program daemon that I could run that would take care of this for me?
I'm concerened about rsync. What happens if someone is working on file1 in directory s1Dir and
someone else is working on file1 in directory s2Dir. That would cause some pretty huge problems, wouldn't it? I would need a locking mechanism to lock files, and rsync doesn't provide that (does it?).
Thanks!
|
|
|
01-16-2007, 08:25 AM
|
#2
|
Member
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121
Rep:
|
There is no easy way to keep two actively read/write filesystems in sync.
There are ways, and they are very _hard_. There are networking schemes that will handle active/active r/w block devices (on which you lay a filesystem).
Is active/active r/w what you _really_ need? Can you get away with one machine r/w, and the other read-only for emergencies?
|
|
|
01-16-2007, 09:03 AM
|
#3
|
Member
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105
Original Poster
Rep:
|
Unfortunately, no. It needs to be active/active.
Basically the two file servers are on the other side of the country from each other and there
is a vpn connection that puts them on the same network. The "managers" figure having just one
share on one of the servers will be two slow for the people on the other side of the country.
So they want to have both directories (i.e. servers) to be active.
If I understand the above response, rsync isn't the tool to accomplish this?
I am aware of some very expensive software that can do this, but I though perhaps there was
a slick tool in linux that would help me out with this.
Any thoughts?
Thanks.
|
|
|
01-16-2007, 09:16 AM
|
#4
|
Member
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121
Rep:
|
There are.
NetBD and GFS either and/or both can get this done.
Observation: If having the share on both sides of the country is too slow, then having every write written to both sides of the country will be too slow. There is some smart caching and locking that alleviates this, but there is those pesky laws regarding the speed of light and the conservation of energy.
The smart caching does the best it can but remember the gain is lost because the normal file-system caching done locally by the nearest server has to be turned off.
|
|
|
01-16-2007, 09:26 AM
|
#5
|
Member
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121
Rep:
|
After writing this I thought: . o O ( This could be done at the application layer )
Google netted this:
http://www.sambaxp.org/uploads/media...r_on_sles9.ogg
http://www.sambaxp.org/uploads/media...r_on_sles9.pdf
Volker Lendecke's presentation on HA clustering with samba at last years Samba eXPerience conference.
This would make a huge addition to the LQ wiki if you keep notes on how this progresses.
|
|
|
01-16-2007, 12:46 PM
|
#6
|
Member
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105
Original Poster
Rep:
|
Thanks for the links dgar.
Interesting stuff on HA.
|
|
|
01-16-2007, 12:56 PM
|
#7
|
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307
Rep:
|
There's also device-mapper mirror which is quite configurable.
|
|
|
All times are GMT -5. The time now is 10:13 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|