Bug 1324537

Summary: lvm2: Problems when creating thin pool across whole PVS
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Czerner <lczerner>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 07:40:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Verbose output for the first case
none
Verbose output for the second case none

Description Lukáš Czerner 2016-04-06 14:49:53 UTC
Created attachment 1144239 [details]
Verbose output for the first case

Description of problem:


Version-Release number of selected component (if applicable):
  LVM version:     2.02.130(2)-RHEL7 (2015-10-14)
  Library version: 1.02.107-RHEL7 (2015-10-14)
  Driver version:  4.33.0


How reproducible:
always

Steps to Reproduce:

CASE 1
	vgcreate mypool /dev/sda
	lvcreate mypool -T -l 100%PVS -n lvol001
	Insufficient suitable allocatable extents found for logical volume lvol001.

It fails, yet it still creates a logical volume.

lvs
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol0 mypool -wi------- 100,00m                                                    
  root  rhel   -wi-ao----  17,51g                                                    
  swap  rhel   -wi-ao----   2,00g              


CASE 2

	vgcreate mypool /dev/sda /dev/sdb
	lvcreate mypool -T -l 100%PVS -n lvol001

Fails as well, creating normal logical volume as well.

lvs
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol0 mypool -wi------- 100,00m                                                    
  root  rhel   -wi-ao----  17,51g                                                    
  swap  rhel   -wi-ao----   2,00g


CASE 3

	vgcreate mypool /dev/sda /dev/sdb
	lvcreate mypool -T -l 100%PVS -n lvol001 /dev/sda /dev/sdb

This case works exactly as I need which is, I specify devices which I need to be used for the thin pool, and exactly those devices are used.

 lvs
  LV      VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol001 mypool twi-a-tz-- 199,80g             0,00   0,43                            
  root    rhel   -wi-ao----  17,51g                                                    
  swap    rhel   -wi-ao----   2,00g        

CASE 4

	vgcreate mypool /dev/sda /dev/sdb /dev/sdc
	lvcreate mypool -T -l 100%PVS -n lvol001 /dev/sda /dev/sdb

This is again the result I need.

lvs
  LV      VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol001 mypool twi-a-tz-- 199,80g             0,00   0,43                            
  root    rhel   -wi-ao----  17,51g                                                    
  swap    rhel   -wi-ao----   2,00g  


CASE 5 

	vgcreate mypool /dev/sda
        lvcreate mypool -T -l 99%PVS -n lvol001 /dev/sda

Again does what I need it to do and creates proper thin pool.

 lvs
  LV      VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol001 mypool twi-a-tz-- 99,00g             0,00   0,43                            
  root    rhel   -wi-ao---- 17,51g                                                    
  swap    rhel   -wi-ao----  2,00g 


This behavior is unexpected for me and I'd think that in all cases this will provide me with the thin pool spread across provided devices, however in first two cases it fails to do so. It may be possible that I am using lvm tools wrong, but I am not sure how to achieve what I need in a different way which does not require me to create my own default sizes for data and metadata devices, or quess lvm2 heuristics of getting those sizes.

I'll attach the -vvv output for first two cases.

Thanks!
-Lukas

Comment 1 Lukáš Czerner 2016-04-06 14:50:42 UTC
Created attachment 1144240 [details]
Verbose output for the second case

Comment 3 Zdenek Kabelac 2016-04-14 16:18:19 UTC
Pushed upstream this rather hotfix:

https://www.redhat.com/archives/lvm-devel/2016-April/msg00027.html

This should temporarily help with the issue - yet it's not ultimate fix here.
(Member of 2.02.150 release)

Comment 4 Jonathan Earl Brassow 2017-07-27 20:50:12 UTC
need to know if this is fixed or what the next steps are.

Comment 6 RHEL Program Management 2020-12-15 07:40:49 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.