Dear Maintainer,
Creating a thin pool LV is allowed even when thin-provisioning-tools is not
installed. But deactivating or activating that VG fails. Since deactivating
the VG usually only happens at reboot, the user might fail to notice this
big problem until then.
Maybe the lvconvert tool, used to combine the two "thin LVs" into a thin
pool LV, should refuse to run if thin-provisioning-tools, or the needed
scripts, aren't installed.
root@debian:~# pvcreate /dev/vda1
Physical volume "/dev/vda1" successfully created.
root@debian:~# vgcreate vg /dev/vda1
Volume group "vg" successfully created
root@debian:~# lvcreate -n pool0 -l 90%VG vg
Logical volume "pool0" created.
root@debian:~# lvcreate -n pool0meta -l 5%VG vg
Logical volume "pool0meta" created.
root@debian:~# lvconvert --type thin-pool --poolmetadata vg/pool0meta
vg/pool0
WARNING: Converting logical volume vg/pool0 and vg/pool0meta to thin
pool's data and metadata volumes with metadata wiping.
THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Do you really want to convert vg/pool0 and vg/pool0meta? [y/n]: y
Converted vg/pool0 to thin pool.
root@debian:~# l /dev/mapper/
total 0
drwxr-xr-x 2 root root 120 Jun 21 14:15 .
drwxr-xr-x 20 root root 3.1K Jun 21 14:15 ..
crw------- 1 root root 10, 236 Jun 21 14:15 control
lrwxrwxrwx 1 root root 7 Jun 21 14:15 vg-pool0 -> ../dm-2
lrwxrwxrwx 1 root root 7 Jun 21 14:15 vg-pool0_tdata -> ../dm-1
lrwxrwxrwx 1 root root 7 Jun 21 14:15 vg-pool0_tmeta -> ../dm-0
root@debian:~# vgchange -a n
/usr/sbin/thin_check: execvp failed: No such file or directory
WARNING: Integrity check of metadata for pool vg/pool0 failed.
0 logical volume(s) in volume group "vg" now active
root@debian:~# vgchange -a y
/usr/sbin/thin_check: execvp failed: No such file or directory
Check of pool vg/pool0 failed (status:2). Manual repair required!
0 logical volume(s) in volume group "vg" now active
root@debian:~# l /dev/mapper
total 0
drwxr-xr-x 2 root root 60 Jun 21 14:15 .
drwxr-xr-x 19 root root 3.0K Jun 21 14:15 ..
crw------- 1 root root 10, 236 Jun 21 14:15 control
Can't get them back now, unless I install thin-provisioning-tools.