understanding snapshot
i am trying to get a thorough understanding of the snapshot process. i have searched around for documentation but was unable to find detailed information. perhaps someone can point me in the right direction or tell me if my assumptions are correct.
i understand my snapshot lv only needs to be 15-20% the size of my original lv. that leads me to believe:
1. we only write to the snapshot lv when data from the original lv has changed. this copies the original version of the file to the snapshot lv so that when we backup the snapshot lv it uses the original file and not the changed version. all files that were not changed will be taken from the original lv. this process requires 2 writes and 1 read.
2. if there are numerous writes to the original lv after the snapshot has been created (and before it has been removed) we could exceed our snapshot lv size. this is because we have to copy the original versions of the file to the snapshot lv, and depending on the number of writes and the size of the files we could run out of logical extents. when this happens the snapshot is unusable.
what will happen to the backup process (tar for example) of a snapshot lv when it runs out of storage?
do chunks contain the metadata for the data in the original lv?
what is the effect of increasing/reducing the chunk size?
rich turner
On Thursday, January 15, 2004, at 03:45 PM, Rich Turner wrote:
[...]
Quoted 3 lines
what will happen to the backup process (tar for example) of a snapshot lv when it runs out of storage?
Reads from the snapshot will return I/O errors. The backup process will likely fail.
Quoted 2 lines
do chunks contain the metadata for the data in the original lv?
If metadata is written to the original lv, then yes.
Quoted 2 lines
what is the effect of increasing/reducing the chunk size?
Depending on your write pattern, smaller chunk sizes may make the snapshot use space more slowly. (If you write even 1K to a 4 MB chunk, the whole chunk will be copied.) But it will also cause there to be more physical chunks to exist in a snapshot volume of the same size. Using LVM1 I ran into problems with snapshots eating up precious vmalloc memory, so I tend to use a large snapshot chunk size. YMMV.
Dale J. Stephenson
[email protected]