[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: how to use LVM snapshot with ext3 - VFS lock patch applicability



On Jun 06, 2003  11:36 +0200, Eric Chacron alcatel fr wrote:
> I have an ext3 file system on top of LVM and i use journaled mode.
> I would like to make a snapshot of my filesystem while the application is
> running in order to backup on another physical storage.
>
> For that i have to create an LVM snapshot and then to mount it in read-only
> for copying the content.  This is not possible as far as ext3 needs to do
> a log replay at mount time ( AFAIK).

This is exactly why you need the VFS lock patch - to give ext3 the chance
to flush the journal before the snapshot is done.

> I would like to know how do that : when is the VFS lock patch needed ?
> what does it change in the VFS behavior ? and what is the effect on my
> application (on the journal usage and the performances for instance) ?

There shouldn't be any effect on the application except for a very small
pause in writes to the disk as the journal is locked and flushed for
the snapshot to be taken.  After the snapshot is done the application
can continue to write to the filesystem without ever being aware that
anything happened.

As for performance effects, that depends on how long you have your
snapshot active, how much you write into the filesystem, and whether the
snapshot is on the same or a different disk/controller.  With any LVM
snapshot, you need to copy the data from the original disk to the snapshot
volume before you write new data there.  If your original filesystem has
a lot of writes, then you will now have 2x that many writes (1 going to
the snapshot).  Once data has been copied to the snapshot, however, it
does not need to be copied again so you only need to copy the original
superblock, inode tables, etc to the snapshot once.

> The next question will be to know whether an ext3 snapshot feature is
> planed or if i need to use EVMS rather than LVM.

There has been snapshot support in ext3 for a long time already.  What is
_still_ missing is the VFS locking patch in the standard kernel.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]