From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: how do versioning filesystems take snapshot of opened files? Date: Tue, 3 Jul 2007 13:38:30 -0400 Message-ID: <20070703133830.0e83a6bf@think.oraclecorp.com> References: <20070703090946.49e6062f@think.oraclecorp.com> <4ae3c140707030931u14119061m5d5dc69834292847@mail.gmail.com> <20070703130436.4a2f2b2c@think.oraclecorp.com> <4ae3c140707031015y6f4a461vda7c683fd8f969ce@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Bryan Henderson" , linux-fsdevel To: "Xin Zhao" Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:17196 "EHLO agminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755161AbXGCRjp (ORCPT ); Tue, 3 Jul 2007 13:39:45 -0400 In-Reply-To: <4ae3c140707031015y6f4a461vda7c683fd8f969ce@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 3 Jul 2007 13:15:06 -0400 "Xin Zhao" wrote: > OK. From discussion above, can we reach a conclusion: from the > application perspective, it is very hard, if not impossible, to take a > transactional consistent snapshot without the help from applications? You definitely need help from the applications. They define what a transaction is. > > Chris, you mentioned that "Many different applications support some > form of pausing in order to facilitate live backups. " Can you provide > some examples? I mean popular apps. Oracle, db2, mysql, ldap, postgres, sleepycat databases...just search for online backup and most programs that involve something transactional have a way to do it. > > Finally, if we back up a little bit, say, we don't care the > transaction level consistency ( a transaction that open/close many > times), but we want a open/close consistency in snapshots. That is, a > file in a snapshot must be in a single version, but it can be in a > middle state of a transaction. Can we do that? Pausing apps itself > does not solve this problem, because a file could be already opened > and in the middle of write. As I mentioned earlier, some systems can > backup old data every time new data is written, but I suspect that > this will impact the system performance quite a bit. Any idea about > that? > This depends on the transaction engine in your filesystem. None of the existing linux filesystems have a way to start a transaction when the file opens and finish it when the file closes, or a way to roll back individual operations that have happened inside a given transaction. It certainly could be done, but it would also introduce a great deal of complexity to the FS. -chris