Antoine wrote:
> Hi,
> 
> I use LVM (Linux Volume Manager) on my box. The MySQL datadir is mounted
> on a specific ext3-formatted logical volume ; thus I am able to make live
> snapshots of the database using the LVM snapshot fonctionnality.
> Internally, LVM snapshots function by syncing the original partition to
> disk and then backing up all further modified contents onto the snapshot
> partition. So it is fast (creating the snapshot itself takes less than one
> second), does not consume much disk (only changes are written to the snapshot
> partition) and very convenient : one creates the snapshot, takes the time
> to backup its contents onto a tape (or whatever), and then removes the
> snapshot. All the while, the database is alive and can be written to by
> MySQL without disturbing the backup.
> 
> The question is : although the snapshot syncs the partition, is it sufficient
> to guarantee that the data is in a consistent state ? That is, if it occurs
> in the middle of a write by MySQL, will the MYD file be in good state or
> may it be corrupted ? If consistency is not guaranteed, then I'll just
> shutdown MySQL before creating the snapshot : this will make the database
> unavailable for a few seconds - not a really big deal ;-).
> 
> Does anyone already use this kind of setup ? Any comments about it ?
> 
> Thank you
> 
> Antoine.
> 
Hi,

According to the documentation, you can use:
FLUSH TABLES WITH READ LOCK
for that.
See http://www.mysql.com/doc/en/FLUSH.html
for details

Regards
-- 
Joseph Beuno





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to