#865463 lvm2: VG with thin pool LV can be created without thin-provisioning-tools

Package:
lvm2
Source:
lvm2
Description:
Linux Logical Volume Manager
Submitter:
Andreas Hasenack
Date:
2017-11-08 09:48:03 UTC
Severity:
normal
#865463#5
Date:
2017-06-21 17:28:00 UTC
From:
To:
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.

#865463#10
Date:
2017-09-20 14:52:54 UTC
From:
To:
Hi

If thin/cache tools are not installed (or user wish to not use them),
user can configure  lvm.conf  to be using "" empty strings.

While this is surely not recommended way how to use thin-p, technically it's
possibly to bypass presence of these tools on a system.


Regards


Zdenek

#865463#15
Date:
2017-11-08 09:44:01 UTC
From:
To:
Ahoj drahý,
Jmenuji se Susan Helmsová. Jsem velitel leteckých sil Spojených států. Rád bych, abyste mi odpověděl zde, protože mám něco velmi důležitého, s kterým bych rád diskutoval s vámi.
dík
Generála Susan Helmsová.