Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a script to snapshot EBS volumes on AWS. One of the volumes contains the data for a mysql database. I am aware that I need to somehow stop data being written to the database while the snapshot is initiated so that the data is consistent but I cannot obtain a lock on all the tables on the database.

Will using xfs_freeze without a lock on the tables suffice for a consistent solution?


share|improve this question
up vote 0 down vote accepted

no, because mysql might still have data in it's own buffers, that the filesystem couldn't possibly know about.

the proper method is to "flush tables with read lock", THEN create a filesystem snapshot, after which you can immediately release the lock again.

why can't you obtain a lock?

share|improve this answer
@r001 I am trying to do all this in PHP ;) and its not very easy to get a lock on all tables in the database. – mrwooster Dec 21 '10 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.