Is this how LVM snapshots work?

Hi guys.

I'm confused how LVM snapshots work. Here is what i understood:

  1. we have a Logical Volume holding our data.
  2. we make a snap shot of it with this command:
lvcreate -L 1000M -s -n backup /dev/vg01/lv01
  1. mount the snap shot
  2. take your backup
  3. remove the snapshot --> in this step LVM will write new changes back to our main volume.? am i right?

In second step we specify the size. is that 1000MB holds the changes from the point we had created the snapshot?

No. New changes will be written to the master volume right away. However, if data is changed that existed before the snapshot was taken, the old data is copied to the snapshot area, and only then the new one is committed to disk (see Copy-on-write). The size you're setting for the snapshot is the maximum amount of data the snapshot area can hold, meaning the maximum amount of data that may change before the snapshop becomes stale.

1 Like

So if the newly changed data is written to master volume why we need to specify size to snapshot volume? what is use of it?