I am fairly new to the AWS and have created some MySQL servers in Amazon EC2. Being cognizant, I have set up the DB server to store the data in an LVM mount point. Now for data retention I would like to take snapshots in regular basis (of course as a cron job). I have found that taking the snapshot of a whole disk is fairly easy. However, is there any way that would take the snapshot of the LVM as a whole. I mean is there any way of taking the snapshot of the mountpoint (like /data) instead of the volume that comprise the LVM (vol-xxxx, vol-xxxx, vol-xxxx)?
Asked
Active
Viewed 1,667 times
1 Answers
0
To take a snapshot you need the volume id. You can use what ever logic to resolve the mount point into a volume id, then issue snapshot command.
I am sure you have figured out that you need to stop disk activity before initiating the snapshot. A file system such as xfs
is more suitable for this. It allows you to freeze the disk, take a snapshot, then unfreeze it.

Tippa Raj
- 584
- 4
- 8