Before a configuration update, a colleague took a snapshot of the data volume and mounted it read-only at /mnt/lvm-before. After the update the service reads a wrong mode from /mnt/lvm-data/settings.conf.
Look at the group's volumes and read settings.conf through both mount points.
Compare the volume and the snapshot
Look at the volumes of the lab_vg group and read settings.conf through both mount points, /mnt/lvm-data and /mnt/lvm-before. Do not edit the files.
First, predict
What will cat print through /mnt/lvm-before?
Now start the exercise, run the command and compare your prediction with the output.
The checkpoint snapshot is 64 MiB, and the data volume is 128 MiB. How does the snapshot show the earlier state of the whole volume?
-
There is no background copy: the snapshot fills only when blocks on the volume change.
Data%forcheckpointis almost zero. -
LVM has no idea which files matter: it works with device blocks. Everything that was on the volume reads through the snapshot.
-
LVM does not compress snapshot data.
Data%forcheckpointis almost zero: the snapshot holds next to nothing so far.
The snapshot keeps the earlier versions of changed blocks and reads the unchanged ones from the volume itself.