1

I am trying to understand how to select a proper size for snapshot. As I know simple snapshot uses space which is needed for covering difference between two logical volumes. So, what size of snapshot should be if it was made of (for e.g.)30G partition on which all files had been rewritten? Just 30G? or it depends on future changes of partition?

  • If you allocate 30GB for a snapshot of a 30GB volume, then you should be able to do literally anything to the volume and not run out of space (except resize it bigger, maybe). – Tom Hunt Oct 28 '15 at 21:01
2

A snapshot will require as much storage space as changes are made to the contents in the logical volume.

So, let's say that you have a 30GB volume and you take a snapshot. Initially, no space is required. But after a week you see that the snapshot is using 4GB of storage. That means that a subset of the contents in that volume has changed enough to generate 4GB of changes.

If the changes are made over the same subset, the size will remain quite constant. But if changes are mode on different subsets, the size will start varying accordingly.

So, in short terms, the size will depend on the 'changeability' of the volume and the retention time you want to use.

For that example, a 1 month retention policy would require:

  • 4GB for a single snapshot
  • 8GB for 2 snapshots (every other week)
  • Up to 32GB for 1 weekly snapshot
  • and so on.
  • 3
    Not quite. A snapshot doesn't store multiple versions of changes, so it never needs more space than the original volume. If the original volume is 30GB, there's only 30GB of data that might possibly ever need to be copied to the snapshot. (However, I think snapshots have a slight size overhead due to the way they structure the copied data, so you might need to make the snapshot slightly larger than 30GB for that reason. But it's not related to the rate of change to the original volume.) – Wyzard Oct 29 '15 at 2:32
  • I agree, with you @Wyzard . I was actually thinking about multiple snapshots, and since I was multitasking, I guess I wrote the answer slightly mistaken :) Sorry about the confusion. Editing ;) – Jesus A. Sanchez Oct 29 '15 at 15:20
  • Regarding your edit: the size overhead in a snapshot has nothing to do with the filesystem (or any aspect of the data) in the base volume. It's just that the snapshot has to store data copied from the base volume, plus information about which storage locations in the snapshot volume correspond to which storage locations in the base volume. – Wyzard Oct 31 '15 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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