[linux-lvm] LVM thin pool advice

David Shaw dshaw at jabberwocky.com
Wed Feb 15 00:33:47 UTC 2017


I'm currently using regular non-thin snapshots for a backup project.  I'm looking for some advice on using thin snapshots, as I want to get the benefit of the performance improvements of thin snapshots.

For my usage, it's a single volume that has at most one snapshot at a time, and so plan is to have a thin pool with a single thin volume in it.  The volume virtual size will always be less than the thin pool size.

My concerns are around the behavior when/if the pool runs out of space.  The goal is to never prevent writes to the main volume.  I'm fine if the snapshot fails in some manner (I'm used to that from when the COW space runs out in the non-thin snapshots), but I don't want to ever block new writes to the main volume.

Is there some way to cap the amount of data that the snapshot can allocate from the pool?  Also, is there some way to allocate enough metadata space that it can't run out?  By way of analogy, using the old snapshot system, if the COW is sufficiently large (larger than the volume being snapshotted), it cannot overflow because even if every block of the original volume is dirtied, the COW can handle all of it.  Is there some similar way to size the metadata space of a thin pool such that overflow is "impossible"?

I'm using Centos 7.3, so:

# lvm version
  LVM version:     2.02.166(2)-RHEL7 (2016-11-16)
  Library version: 1.02.135-RHEL7 (2016-11-16)
  Driver version:  4.34.0

# uname -r

Thanks for any advice,


More information about the linux-lvm mailing list