Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1400060

Summary: blkid is unable to detect filesystem on thinly provisioned lvm member
Product: Red Hat Enterprise Linux 7 Reporter: James Hogarth <james.hogarth>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: agk, lpol, prajnoha
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1400135 (view as bug list) Environment:
Last Closed: 2016-12-01 12:36:05 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:
Embargoed:

Description James Hogarth 2016-11-30 11:47:16 UTC
Description of problem:
When using a thinly provisioned LVM member blkid is unable to detect the filesystem and report data such as UUID

Version-Release number of selected component (if applicable):
libblkid-2.23.2-33.el7.x86_64
util-linux-2.23.2-33.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. lvcreate -n full -l 10%FREE vg_myvg
2. lvcreate -n tp -T -l 10%FREE vg_myvg
3. mkfs.xfs /dev/vg_myvg/full
4. mkfs.xfs /dev/vg_myvg/tp
5. blkid /dev/vg_myvg/full
6. blkid /dev/vg_myvg/tp

Actual results:
Nothing returned by blkid

Expected results:
UUID and type to be returned by blkid, so no difference in behaviour between thinly provisioned and full

Additional info:
This also behaves the same with other filesystems such as ext4 so is not an xfs issue specifically.

Using xfs_admin or dumpe2fs against the TP LVM member does display the expected data.

Comment 2 James Hogarth 2016-11-30 15:47:33 UTC
[root@c7-multidisktest ~]# mount /home/jenkins/
mount: can't find UUID=a99a213f-6af6-4707-a597-6fee02bd2b31
[root@c7-multidisktest ~]# lsblk
NAME                         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                            8:0    0   20G  0 disk 
├─sda1                         8:1    0  500M  0 part /boot
└─sda2                         8:2    0 19.5G  0 part 
  ├─centos_c7--template-root 253:0    0 17.5G  0 lvm  /
  └─centos_c7--template-swap 253:1    0    2G  0 lvm  [SWAP]
sdb                            8:16   0   20G  0 disk 
└─sdb1                         8:17   0   20G  0 part 
  ├─vg_data-jenkins_tmeta    253:2    0   12M  0 lvm  
  │ └─vg_data-jenkins        253:4    0   10G  0 lvm  
  ├─vg_data-jenkins_tdata    253:3    0   10G  0 lvm  
  │ └─vg_data-jenkins        253:4    0   10G  0 lvm  
  └─vg_data-testdata         253:5    0    5G  0 lvm  /mnt/testdata1
sdc                            8:32   0   60G  0 disk 
└─sdc1                         8:33   0   60G  0 part /mnt/testdata2
[root@c7-multidisktest ~]# lvs
  LV       VG                 Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root     centos_c7-template -wi-ao---- 17.47g                                                    
  swap     centos_c7-template -wi-ao----  2.00g                                                    
  jenkins  vg_data            twi-a-tz-- 10.00g             0.00   0.62                            
  testdata vg_data            -wi-ao----  4.98g                                                    
[root@c7-multidisktest ~]# xfs_admin -u /dev/vg_data/jenkins 
UUID = a99a213f-6af6-4707-a597-6fee02bd2b31
[root@c7-multidisktest ~]# blkid /dev/vg_data/jenkins 
[root@c7-multidisktest ~]#

Comment 3 James Hogarth 2016-11-30 15:48:37 UTC
argh bad copy paste overwrite ... comment 2 shows that this bug prevents mounting a thin provisioned LVM member via UUID as well

Comment 4 Peter Rajnoha 2016-12-01 11:36:10 UTC
(In reply to James Hogarth from comment #0)
> Description of problem:
> When using a thinly provisioned LVM member blkid is unable to detect the
> filesystem and report data such as UUID
> 
> Version-Release number of selected component (if applicable):
> libblkid-2.23.2-33.el7.x86_64
> util-linux-2.23.2-33.el7.x86_64
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. lvcreate -n full -l 10%FREE vg_myvg
> 2. lvcreate -n tp -T -l 10%FREE vg_myvg
> 3. mkfs.xfs /dev/vg_myvg/full
> 4. mkfs.xfs /dev/vg_myvg/tp

This is not correct. To create thin LV, you need to create thin pool first and then you need to allocate thin LV out of that pool, for example:

lvcreate -n thin_pool -L <pool_size_here> -T vg_myvg
lvcreate -n thin_lv -V <virtual_thin_lv_size_here> -T vg_myvg/thin_pool

Comment 5 Peter Rajnoha 2016-12-01 11:37:11 UTC
(In reply to James Hogarth from comment #0)
...
> 2. lvcreate -n tp -T -l 10%FREE vg_myvg
...
> 4. mkfs.xfs /dev/vg_myvg/tp

(Here, you wrote directly to thin pool device - you can't do that - thin pool is only for LVM to allocate thin LVs from.)

Comment 6 Karel Zak 2016-12-01 12:36:05 UTC
Note that libblkid explicitly ignores private LVM devices (e.g. pool metadata etc.) -- this is reason why blkid may returns nothing.

Comment 7 Karel Zak 2017-01-06 11:35:58 UTC
*** Bug 1400135 has been marked as a duplicate of this bug. ***