LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 01-16-2007, 07:49 AM   #1
endfx
Member
 
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105

Rep: Reputation: 15
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!
 
Old 01-16-2007, 08:25 AM   #2
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
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?
 
Old 01-16-2007, 09:03 AM   #3
endfx
Member
 
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105

Original Poster
Rep: Reputation: 15
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.
 
Old 01-16-2007, 09:16 AM   #4
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
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.
 
Old 01-16-2007, 09:26 AM   #5
dgar
Member
 
Registered: Jun 2005
Location: Candia, NH
Distribution: Ubuntu, FC, RHE3, RHE4, CentOS
Posts: 121

Rep: Reputation: 15
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.
 
Old 01-16-2007, 12:46 PM   #6
endfx
Member
 
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks for the links dgar.
Interesting stuff on HA.
 
Old 01-16-2007, 12:56 PM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
There's also device-mapper mirror which is quite configurable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create a Raid1 Mirrored LVM? Suse 10.2 carl0ski Linux - Hardware 0 12-26-2006 03:23 AM
Solaris hard disk mirrored DarReNz Solaris / OpenSolaris 3 06-16-2006 10:14 AM
breaking the hardware mirrored disk space pudhiyavan Linux - Hardware 2 08-24-2005 08:39 PM
mounting local mirrored backup irvken Linux - Software 0 04-01-2005 06:35 AM
mirrored web servers? GuitsBoy Linux - General 1 10-29-2003 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration