LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-08-2010, 04:03 PM   #1
pileofrogs
LQ Newbie
 
Registered: Mar 2007
Location: Seattle
Distribution: CentOS, Fedora, Ubuntu
Posts: 17

Rep: Reputation: 0
Simple mirroring networked file system?


Hi all.

I have two web servers. One is active and one is in reserve. I keep the user data (web pages) in sync by running rsync every 10 minutes or so. This copies any changes from the active machine to the reserve machine. But, it's slow, only gets changes every 10 minutes, bogs down the disk, does strange things to files that are changing during the rsync process etc...

I want something that will automatically copy any changes from the active server to the reserve server as they are made. IE I hit 'save' on the active server, it copies the file to the reserve server. Simple!

I've been looking around and I see GFS which is really vastly more complicated than I need. I'm happy with read-only access on the reserve host, so I don't need distributed lock management.

I could theoretically implement this by setting inotify watchers on every file and running an SCP or rsync command when a file gets saved. So, it can't be that hard.

I do not need a true networked file system, as in something I mount over the network. I just want something to keep my disks in sync.

Either other people have had this problem and there's a solution or I'm thinking about this the wrong way and there's a solution.

Thanks!
-Dylan
 
Old 04-08-2010, 04:11 PM   #2
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Perhaps DRBD would do the job
 
Old 04-14-2010, 06:39 PM   #3
pileofrogs
LQ Newbie
 
Registered: Mar 2007
Location: Seattle
Distribution: CentOS, Fedora, Ubuntu
Posts: 17

Original Poster
Rep: Reputation: 0
I tried DRBD, but you can't read the contents on the inactive server. I need to be able to check the inactive server to make sure it's working and if I can't see the user data that I want to mirror, I can't test it. DRBD can do a thing called 'dual primary' where you can actually mount it on both machines, but it's the filesystem, not the block device, that tells the kernel when a file has changed, so changes on the active host don't appear on the inactive host and things can get very weird. If I wanted to run GFS, I could make it work, but that just seems like a crazy idea when I don't need both ends of the connection to be writable.
 
Old 04-14-2010, 09:44 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Actually, inotify can watch whole dirs, so shouldn't be much work. See example 1 http://linux.die.net/man/1/inotifywait
 
  


Reply

Tags
filesystem, mirror, network


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
Unioning and mirroring file system over the internet cantab Linux - Server 2 04-06-2010 05:07 PM
Creating a simple file system module Raynus Linux - Kernel 2 10-07-2008 06:39 PM
simple unix file system problem alokatzenith Programming 16 11-01-2007 06:02 PM
writing a simple file system in linux Deepthi_57 Linux - Newbie 1 05-03-2004 12:42 AM
how to implement a simple file system for linux amitchakote Linux - Newbie 8 03-17-2004 10:19 AM


All times are GMT -5. The time now is 07:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration