From: "Joseph D. Wagner" Subject: RE: Replicating directories - Intercepting write/modify system calls Date: Thu, 12 Feb 2004 11:21:23 -0600 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <000301c3f18c$a42bb870$0201a8c0@joe> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Return-path: Received: from ssa8.serverconfig.com ([209.51.129.179]:54152 "EHLO ssa8.serverconfig.com") by vger.kernel.org with ESMTP id S266530AbUBLRVa convert rfc822-to-8bit (ORCPT ); Thu, 12 Feb 2004 12:21:30 -0500 To: "'Siddhartha Jain'" , In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org Too complicated. Too invasive. Replicating the entire partition rather than just a specific directory is more feasible. Does it need to be replicated in real-time, or would an incremental synchronization be acceptable (i.e. synced every 15 minutes or so)? Does it need to be a two-way synchronization, or is a one-way synchronization acceptable? In other words, do changes on the replica need to be synced back to the original? Are you willing to commission someone (i.e. pay them money) to do this work? 8-D Joseph D. Wagner, Underemployed www.josephdwagner.info > -----Original Message----- > From: Siddhartha Jain [mailto:sid@netmagicsolutions.com] > Sent: Thursday, February 12, 2004 6:39 AM > To: linux-fsdevel@vger.kernel.org > Subject: Replicating directories - Intercepting write/modify system calls > > Hello, > > I need a module/tool to replicate directories locally or across a network. > Locally, the master and the mirror directories may not belong to the same > FS. My immiediate need is to replicate a NFS-mounted directory to another > local/NFS directory. So here is what I figured: > > 1. A config file contains the master and mirror paths > 2. Expand the vnode structure to include two things: a bit-flag to > indicate > that the vnode has a replica and a pointer to the replica vnode. > 3. When an open() is called, > a. check if the read/modify option is set in the open() (I am not > interested in replicating access-time at the moment). > b. If yes, check the path of the file against the known masters in > the > config. > c. If it matches, copy the file to a destination specified by the > mirror's > path. > d. Set the flag in the master vnode for replica and place a pointer > to the > replica vnode in the master's structure. > e. After this replicate all write() calls for the master vnode to > the > replica vnode. > f. close() the replica vnode when the master is close()-ed. > > > Being a sysadmin and not really a C/Kernel programmer, I do not know how > much is this feasible and practical. > > Given that it is ok, how do I avoid the copy at open() and do only > incremental changes everytime a file is closed and re-opened. > > Regards, > > Siddhartha > > - > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html