less than 1 minute read

To fully utilize the few bits of space which is provided by my SSD, I always take the following approach:

  1. Create an “as large as possible” LVM volume group to hold all my data.
  2. Create a thin_pool within the volume group for my virtual machines.
  3. Create one “base VM” which contains just a bare installation of my preferred OS (inside the thinpool).
  4. Now for each VM I need for my labs I create a snapshot from the base VM
lvcreate --snapshot --name thin_snapshot vg/thin_base
  1. Now to ensure that I can actually utilize the newly created snapshot I have to activate it first.

LVM (thin) snapshot are “by default” created in inactivated mode, but it also has the “activation skip flag”. This flag prevents the system from activing the partition with the usual commands. To active the partition use:

lvchange -ay -K vg/thin_snapshot

To remove the skip flag completely add:

lvchange -kn vg/thin_snapshot

Finally the newly added thinly provisioned snapshot is available for usage by my virtualisation tool.