Bug 1039953

Summary: When creating a thin pool, it produces an incorrect message about lvol0 being created
Product: Red Hat Enterprise Linux 6 Reporter: Ade Bradshaw <abradshaw>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED NOTABUG QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5CC: agk, dwysocha, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, prockai, thornber, zkabelac
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-10 12:26:25 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:

Description Ade Bradshaw 2013-12-10 12:16:45 UTC
Description of problem:
When creating a thin pool, its notifies you that the thin pool was created AND a volume called lvol0 - which isnt actually created

Version-Release number of selected component (if applicable):
lvm2-2.02.100-8.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install RHEL6.5 and yum update
2. create a thin pool
3. observe the, incorrect, additional message

Actual results:
Thin pool is created and you are notified that a lvol0 was also created, which is wasnt

Expected results:
Dont tell me lvol0 was created in addition to my thin pool

Additional info:
[root@thin-tests ~]# lvs
  LV      VG   Attr       LSize Pool Origin Data%  Move Log Cpy%Sync Convert
  rootvol myvg -wi-ao---- 7.31g                                             
[root@thin-tests ~]# lvcreate -l 46 --type thin-pool --thinpool tp_pool myvg
  Logical volume "lvol0" created
  Logical volume "tp_pool" created
[root@thin-tests ~]# lvs
  LV      VG   Attr       LSize Pool Origin Data%  Move Log Cpy%Sync Convert
  rootvol myvg -wi-ao---- 7.31g                                             
  tp_pool myvg twi-a-tz-- 1.44g               0.00                          
[root@thin-tests ~]# rpm -q lvm2
lvm2-2.02.100-8.el6.x86_64

Comment 1 Marian Csontos 2013-12-10 12:26:25 UTC
It is. See output of 'lvs -a'.

Comment 2 Zdenek Kabelac 2013-12-10 12:35:23 UTC
Created lvol0 is volume used as a 'spare' LV for a possible thin pool recovery.
It's just later renamed to  lvol0_pmspare and as such it is hidden volume.
(lvs -a is needed)

However we are considering to remove this creation message - it's not yet defined.

Anyway - it's not a bug - it's rather informational noise which needs some cleaning.

Comment 3 Ade Bradshaw 2013-12-10 12:43:04 UTC
Thanks for the additional information Zdenek. Personally Id agree that the message needs removing if its a hidden vol

Comment 4 Zdenek Kabelac 2013-12-10 12:48:25 UTC
It's not that easy to decide.

Since anywhere during creation process the machine could be turned off/crash,
it might happen you would end-up after reboot with a  'lvol0' volume
and you would have no idea who was creating it and why it is there
(thus probably reporting even bug on lvm2....)

So while we are printing info about creation of lvol0 - we make a user aware
there was this volume created and it's temporarily present.
But we do not inform about later usage of this volume as a thin pool spare LV.
Which might be another solution for this problem - to just print notice,
lvol0 is used is pool metadata spare LV.

Comment 5 Ade Bradshaw 2013-12-10 12:56:37 UTC
The behaviour in Fedora seems different. 

[root@localhost ~]# cat /etc/redhat-release 
Fedora release 19 (Schrödinger’s Cat)

[root@localhost ~]# lvcreate --size 5G --type thin-pool --thinpool tp_pool fedora
  Logical volume "tp_pool" created
[root@localhost ~]#

Comment 6 Peter Rajnoha 2013-12-10 13:02:45 UTC
Fedora 19 uses older lvm2 version (v2.02.98) which didn't have the support for spare LV iirc.

Comment 7 Ade Bradshaw 2013-12-10 13:05:45 UTC
Wow, ok then that explains it - thanks all