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?
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.