Bug 1400060 - blkid is unable to detect filesystem on thinly provisioned lvm member
Summary: blkid is unable to detect filesystem on thinly provisioned lvm member
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1400135 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-30 11:47 UTC by James Hogarth
Modified: 2017-01-06 11:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1400135 (view as bug list)
Environment:
Last Closed: 2016-12-01 12:36:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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. ***


Note You need to log in before you can comment on or make changes to this bug.