ec2-consistent-snapshot for MongoDB

61 views
Skip to first unread message

Eric Lubow

unread,
Mar 17, 2011, 4:55:48 PM3/17/11
to mongodb-user
All,

I'm not a subscriber to this list, so if you have any questions,
let me know off-list. I have written a patch for the perl script by
Eric Hammond ec2-consistent-snapshot. Basically this takes a set of
xfs volumes on ec2, fsyncs and locks the mongo instance that is
currently writing to them and then ec2 snapshots the volumes. After
the snapshot is done, it unlocks the mongo instance. On my 8 volume
(128G each) 1T ec2 RAID array with a 50G db, this takes approximately
1-2s to complete.

It's been a bit of time since I wrote a lot of Perl so go easy on
me. The script with patch applied is on Github here:
https://github.com/elubow/ec2-consistent-snapshot

It works for me on ec2 with CentOS 5.4 and Mongo > 1.6.5 (untested
with 1.8.*). If this works for you in other setups, please let me
know and I'll create a wiki page for the good of the order. Happy to
accept any patches if need be (just send a pull request). Thanks and
good luck.

-e
--
Eric Lubow
w: http://eric.lubow.org
Reply all
Reply to author
Forward
0 new messages