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 1728149 - [RFE] lvm: disallow formatting and mounting a thinpool
Summary: [RFE] lvm: disallow formatting and mounting a thinpool
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.6
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-09 07:33 UTC by nikhil kshirsagar
Modified: 2021-09-03 12:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-14 18:16:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description nikhil kshirsagar 2019-07-09 07:33:03 UTC
Description of problem:
lvm should not allow mkfs.xfs or mounting a thinpool. This bz is created for possible approaches to avoid this. FS SBR feels that mkfs or mount is not the place to fix this. Perhaps we can avoid this by having private LV in a different /dev/private folder ?  


Version-Release number of selected component (if applicable):
lvm2-libs-2.02.180-10.el7_6.3.x86_64
lvm2-2.02.180-10.el7_6.3.x86_64
3.10.0-957.10.1.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@vm255-41 mt]# lvcreate -T -n testpool1 -L200M thin_vg
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  Logical volume "testpool1" created.
[root@vm255-41 mt]# mkfs.xfs /dev/mapper/thin_vg-testpool1
thin_vg-testpool1        thin_vg-testpool1_tdata  thin_vg-testpool1_tmeta  
[root@vm255-41 mt]# mkfs.xfs /dev/mapper/thin_vg-testpool1
thin_vg-testpool1        thin_vg-testpool1_tdata  thin_vg-testpool1_tmeta  
[root@vm255-41 mt]# mkfs.xfs /dev/mapper/thin_vg-testpool1
meta-data=/dev/mapper/thin_vg-testpool1 isize=512    agcount=8, agsize=6400 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=51200, imaxpct=25
         =                       sunit=16     swidth=16 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=768, version=2
         =                       sectsz=512   sunit=16 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

3.10.0-957.10.1.el7.x86_64

Comment 3 Zdenek Kabelac 2019-07-09 09:27:12 UTC
This bug is mostly opened against wrong component.

Bugs should be opened for  mkfs and mount tools.

There are many good reasons why there is keept accessibility of these device for user-space tools like  dd, hexdump... for close inspection by 'root'.

Yet tools like mkfs & mount should take extra step in validation eventually confirmation of proceeding with unsupported devices like multipath/raid leg and other basically protected devices.

It would be probably best to have one source of information about what is usable (be it udev/SID....)

There is nothing lvm2 can do about permission for device access for root - lvm2 purely maintains DM devices. 
We already document only ONE SUPPORTED way for using  LVs:

/dev/vgname/lvname

Whoever is using any other device paths like  /dev/mapper, /dev/dm-XXXX  is basically doing his own unsupportable work...
lvm2 makes sure - devices that are supposed to be used by users do have these correct symlinks.


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