** Changed in: lvm2 (Ubuntu)
Assignee: Canonical Foundations Team (canonical-foundations) =>
(unassigned)
** Changed in: ubuntu-power-systems
Assignee: Canonical Foundations Team (canonical-foundations) => Canonical
Server Team (canonical-server)
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lvm2 in Ubuntu.
https://bugs.launchpad.net/bugs/1657646
Title:
[20.04] Missing thin-provisioning-tools prevents VG with thin pool LV
from being (de)activated, but not its creation
Status in The Ubuntu-power-systems project:
Triaged
Status in lvm2 package in Ubuntu:
Confirmed
Status in lvm2 package in Debian:
New
Bug description:
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.
I think 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.
Steps to reproduce:
root@15-89:~# vgcreate vg /dev/vdb1
Volume group "vg" successfully created
root@15-89:~# vgs
VG #PV #LV #SN Attr VSize VFree
vg 1 0 0 wz--n- 40.00g 40.00g
root@15-89:~# lvcreate -n pool0 -l 90%VG vg
Logical volume "pool0" created.
root@15-89:~# lvcreate -n pool0meta -l 5%VG vg
Logical volume "pool0meta" created.
root@15-89:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log
Cpy%Sync Convert
pool0 vg -wi-a----- 36.00g
pool0meta vg -wi-a----- 2.00g
root@15-89:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 Jun 21 14:15 ./
drwxr-xr-x 20 root root 3820 Jun 21 14:15 ../
crw------- 1 root root 10, 236 Jun 21 13:15 control
lrwxrwxrwx 1 root root 7 Jun 21 14:14 vg-pool0 -> ../dm-0
lrwxrwxrwx 1 root root 7 Jun 21 14:15 vg-pool0meta -> ../dm-1
root@15-89:~# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
WARNING: Converting logical volume vg/pool0 and vg/pool0meta to pool's data
and metadata volumes.
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@15-89:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 120 Jun 21 14:15 ./
drwxr-xr-x 20 root root 3840 Jun 21 14:15 ../
crw------- 1 root root 10, 236 Jun 21 13: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@15-89:~# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log
Cpy%S
ync Convert
[lvol0_pmspare] vg ewi------- 2.00g
pool0 vg twi-a-tz-- 36.00g 0.00 0.01
[pool0_tdata] vg Twi-ao---- 36.00g
[pool0_tmeta] vg ewi-ao---- 2.00g
If you now reboot the system, all that is gone:
root@15-89:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 60 Jun 21 14:28 ./
drwxr-xr-x 19 root root 3760 Jun 21 14:28 ../
crw------- 1 root root 10, 236 Jun 21 14:28 control
The same happens if you deactivate the VG (which the reboot
undoubtedly triggers). It fails because of a missing
/usr/sbin/thin_check which is provided by the thin-provisioning-tools
package:
root@15-89:~# 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@15-89:~# ll /dev/mapper/
total 0
drwxr-xr-x 2 root root 60 Jun 21 14:29 ./
drwxr-xr-x 19 root root 3760 Jun 21 14:29 ../
crw------- 1 root root 10, 236 Jun 21 14:28 control
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1657646/+subscriptions
--
Mailing list: https://launchpad.net/~touch-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp