LVM Thin provisioning snapshots bug?

2 posts / 0 new
Last post
#1 Sat, 2015-06-13 14:00
raul
  • raul's picture
  • Offline
  • Last seen: 1 year 9 months ago
  • Joined: 2014-10-29

Hi,

I am testing LVM thin provisioning in Alpine 3.2.

Alpine fortunately has LVM2 compiled with thin provisioning support and the thin provisioning tools package is available in testing.

However when I create a thin snapshot the corresponding volume is not created in the pool.

Create the LVM Thinpool in a loopback device

fallocate -l 6G /tmp/lxc
losetup -f /tmp/lxc
pvcreate /dev/loop0
vgcreate vg0 /dev/loop0
lvcreate -l 95%FREE --type thin-pool --thinpool tp0 vg0

Create a logical volume
lvcreate -T vg0/tp0 -V 500M -n p1

Now when i create a snapshot with
lvcreate -s -n p2 vg0/p1

There is no error message but p2 does not show up in /dev/vg0/

lvdisplay shows p2 as inactive.

Any ideas how I can begin to debug this? The same thing works pretty decently in Ubuntu Trusty and Jessie where I also tested it.

Since no error message is provided, and /var/log/messages has no error I am a bit flummoxed.

Update - Problem solved below.

Sat, 2015-06-13 22:59
raul
  • raul's picture
  • Offline
  • Last seen: 1 year 9 months ago
  • Joined: 2014-10-29

1 day of of googling to discover there is a flag in /etc/lvm/lvm.conf that controls activation of thin snapshot volumes on line 1277. Its commented out by default. Its appears the thin snapshots are not activated by default. You need to set the flag like below.

auto_set_activation_skip = 0

Log in or register to post comments