The right way to take a picture

I asked this question before, but I'm still confused. What a good and fast way to take a picture (I use only Unix and Windows machines supported by EBS, so all my interests now). Some ideas:

  • Just take a picture ... It seems that this sometimes leads to system damage.
  • Stop the car, take a picture and start the car. I guess this also means that I need to wait for the completion of each individual task, which makes the challenge difficult?
  • Take a snapshot with the "reboot machine" flag set. The documentation is very small to indicate why a reboot is required ...

I hope the experts of EC2 help you.

+6
cloud amazon-s3 amazon-ec2
source share
3 answers

Snapshot often requires downtime.

Procedure:

  • I would disconnect the drive.
  • Launch the snapshot and wait for it to complete.
  • And then mount it again.

Afaik, the only viable way for a consistent snapshot.

If you could tell more about what data relates to a snapshot (for example, a database?), I could probably expand my answer.

I cannot comment on instances of Windows, since I am not at all familiar with it, but to avoid redundancy, check out this blog post as it explains a lot:

In a nutshell, they use the xfs file system, and when they freeze it to create a snapshot, they let you update the file system. According to the comments, this works for most people.

0
source share

If the data loss bit is acceptable, just take a snapshot while the instance is running. If this is unacceptable, write a magic script to make sure that everything your application is working on is saved to disk, takes a snapshot, and then resumes your application.

For what I am doing, I believe that it is better to keep a separate EBS volume with my application and its data on it, and when I need a snapshot, I just stop the application for a moment, take a snapshot and run it back, So you don’t need to worry about what the OS does during the snapshot, and also added bonuses that allow you to quickly move your application and its data to more powerful equipment and have much smaller snapshots.

+3
source share

Quick response . Both operating systems have functions for safely unmounting a drive. Unmounted drive can be removed without fear of corruption.

Long answer An EBS snapshot is a point in time and a differential (it does not “copy” your data per se), so as long as your drive is in a stable and restored state when it starts, you will avoid corruption (since the snapshot is atomic).

As you meant, no matter what state the entire disk is in when it starts up, what your snapshot will display when it is restored (if you are a snapshot, when you are halfway recording a file, then golly, this file will be half written during recovery).

For Linux and Windows, a consistent state can be achieved by unmounting the disk. This ensures that your buffers are flushed to disk and that recording cannot occur. On Linux and Windows, there are commands to list the processes that use the drive; after you stop these processes or otherwise receive them in order to stop the labeling of the drive for use (different for each program / service), you can disable it. In windows, it is very simple by setting the drive as a “removable drive” and then using the “Safely Remove Hardware” function to unmount. On linux, you can unmount the umount command.

There are other ways to search, but the above is quite universal.

So, if you get to a restored state before you start, you can resume using your drive as soon as the snapshot begins (you do not need to wait for the snapshot to complete before you unlock (or remount) and resume using). At this point, you can restore the volume.

How AWS Snapshot Works:

Volume and a snapshot are just a set of pointers, when you take a snapshot, you simply reject all the blocks that you write from now on; they are actually new blocks associated with the volume, and the old blocks in this logical place in the volume remain valid, so that the snapshot remains the same logically.

That is why subsequent shots will tend faster (they are differential).

http://harish11g.blogspot.com/2013/04/understanding-Amazon-Elastic-block-store-EBS-snapshots.html

+2
source share

All Articles