Preface to my Situation and Motivation

I am trying to familiarize myself with Ubuntu Server edition as I set up a home server. I am setting up a small virtual network with a hypervisor for experimenting. Now, many hypervisors do have a snapshot feature, as does mine, I still would like to learn about LVM snap shots as there is no third party with a real server. My personal intent with my home server is to set up headless file server that will also function as a web server and perhaps DNS, mail, and active directory--something that will be rarely touched if ever, other than updating.

That being said,


In a server environment, how big should a snapshot be? Ideally snapshots after a mile stone; a snap shot after setting up all of the user accounts; another after configuring something like samba, etc.

In a desktop environment, how big should a snap shot be? ideally after major milestones, such as personal projects, installing and uninstalling different programs etc.

I cannot convey exactly what I am meaning, but hopefully it is clear.

Personal Thoughts

As I understand, snapshots work by tracking changes to software and not actual direct copies like mirrored-backups. That being said, I assume that something more than a gigabyte is more than perfect for the life-time or majority of the lifetime of a server that will never really be modified. I assume even a few hundred megabytes would be more than enough.

In a personal-desktop, I assume you would want a snap shot the space of a few gigabytes, or even a series of snapshots several gigabytes.

1 Answer 1


Start with what you think is a reasonable value, and then set up LVM2's snapshot auto extension feature to cover things if something goes wrong.

LVM2 has this really neat feature that will automatically extend snapshot volumes that are nearly full without requiring any user intervention. To use it, you need to edit some of the defaults in the LVM2 configuration file (usually located in /etc/lvm/lvm.conf). The relevant configuration parameters are snapshot_autoextend_threshold and snapshot_autoextend_percent, both found in the activation section of the configuration. The first one (snapshot_autoextend_threshold) controls the maximum amount of space that LVM will let the snapshot have allocated before trying to extend it as a percentage of the total size, and the second one (snapshot_autoextend_percent) controls the amount of space to add when it gets extended as a percentage of the current size.

There are a couple of caveats to using this functionality though:

  • This isn't event based, but instead polls the state of the snapshot. This means that there is some lag between when a write happens that pushes the snapshot space usage over the auto extension threshold and when the snapshot actually gets extended. Make sure and plan your threshold and extension amount accordingly.
  • Each snapshot may end up taking up a bit more space than the original volume. Unless your careful, this can quickly run you out of space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .