Re: The ext3 way of journalling

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Valdis.Kletnieks@...>
Cc: Kyle Moffett <mrmacman_g4@...>, Andi Kleen <andi@...>, LKML Kernel <linux-kernel@...>
Date: Wednesday, January 9, 2008 - 8:49 am

On Wed, Jan 09, 2008 at 02:55:53AM -0500, Valdis.Kletnieks@vt.edu wrote:

Actually, it does better than that.  For ext3 and xfs, it will take a
snapshot of the filesystem in a quiscent state; that is, it will force
the journal transaction to close, suspend all filesystem activity,
take a snapshot of the disk as if it had been unmounted, and then
allow filesystem activity to continue.

So if you look at an ext3 filesystem taken in this way, you will see
that the NEEDS_RECOVERY flag is not set, since the ext3 journal is
empty on the snapshot.  So snapshots are also a great way of doing
stable backups.  For the purposes of stable backups, you'll also want
to quiesce your application files, particularly databases.  

For example, in the case of mysql, send the server the sql commands
"flush tables with read lock; flush logs", take the snapshot, and
then after the snapshot send the server the sql command "unlock tables".
For more information, see: 

    http://forums.mysql.com/read.php?26,185026,185302#msg-185302

If you do this, you will get a snapshot of your disk where *both* the
database and the filesystem is at a stable state, perfect for doing a
backup.

						- Ted
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: The ext3 way of journalling, Tuomo Valkonen, (Tue Jan 8, 1:01 pm)
Re: The ext3 way of journalling, Theodore Tso, (Tue Jan 8, 2:15 pm)
Re: The ext3 way of journalling, Martin Schwidefsky, (Wed Jan 9, 5:54 am)
Re: The ext3 way of journalling, Theodore Tso, (Wed Jan 9, 8:25 am)
Re: The ext3 way of journalling, Martin Schwidefsky, (Wed Jan 9, 9:53 am)
Re: The ext3 way of journalling, Martin Schwidefsky, (Wed Jan 9, 3:47 pm)
Re: The ext3 way of journalling, Michal Schmidt, (Wed Jan 9, 8:44 am)
Re: The ext3 way of journalling, Andi Kleen, (Tue Jan 8, 4:51 pm)
Re: The ext3 way of journalling, Kyle Moffett, (Tue Jan 8, 11:21 pm)
Re: The ext3 way of journalling, BuraphaLinux Server, (Wed Jan 9, 4:00 am)
Re: The ext3 way of journalling, , (Wed Jan 9, 4:21 am)
Re: The ext3 way of journalling, , (Wed Jan 9, 3:55 am)
Re: The ext3 way of journalling, Theodore Tso, (Wed Jan 9, 8:49 am)
Re: The ext3 way of journalling, Theodore Tso, (Tue Jan 8, 5:57 pm)
Re: The ext3 way of journalling, Ondrej Zary, (Tue Jan 8, 5:03 pm)