You are absolutely correct to identify the main problem: we do indeed
get a consistent snapshot, however we don't know what global transaction
ID it is consistent with.
Luckily ec2-consistent-snapshot has a --pre-freeze-cmd option. With
this option you can write a fairly simple script that would query the
server for wsrep_local_state_uuid and wsrep_last_committed status
variables and use them to fake a grastate.dat file. However, you should
not forget to invalidate it (e.g. remove) in --post-thaw-cmd.
And yes, from this snapshot you can start as many new nodes as you wish
(just make sure you clone the volume). The trick is to have gcache.size
big enough.
Speaking of gcache. By default it is placed in the MySQL datadir, i.e.
on snapshotted volume, and since it is not reusable, you may want to put
it elsewhere (e.g. on local storage) for the following reasons
1) I have not tested it yet, but there might be a possibility that more
data in the volume, the longer snapshot takes. I may be wrong about it
though and the volume is copied bit-to-bit, but I hope it is smarter
than that.
2) gcache files are constantly written to, and this can adversely
affect how long snapshot takes and how fast the filesystem runs out of
snapshot buffer.
3) spreading IO over the devices generally improves performance.
gcache.dir option is responsible for that.
Regards,
Alex
--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011