Bug 1551155

Summary: [RFE] Provide a general listing of all currently open crypt volumes.
Product: Red Hat Enterprise Linux 7 Reporter: Corey Marthaler <cmarthal>
Component: cryptsetupAssignee: Ondrej Kozina <okozina>
Status: CLOSED WONTFIX QA Contact: Storage QE <storage-qe>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.5CC: agk, jbrassow, mbroz, okozina, prajnoha
Target Milestone: rcKeywords: FutureFeature, ImprovesTestability
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1733345 (view as bug list) Environment:
Last Closed: 2021-02-15 07:35:37 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:
Bug Depends On:    
Bug Blocks: 1733345    

Description Corey Marthaler 2018-03-02 23:13:22 UTC
Description of problem:
[root@host-086 ~]# vdo list
vPV4
vPV5
vPV6
vPV7
vPV1
vPV2
vPV3
vPV8

[root@host-086 ~]# pvcreate /dev/mapper/vPV[123456789]
  Physical volume "/dev/mapper/vPV1" successfully created.
  Physical volume "/dev/mapper/vPV2" successfully created.
  Physical volume "/dev/mapper/vPV3" successfully created.
  Physical volume "/dev/mapper/vPV4" successfully created.
  Physical volume "/dev/mapper/vPV5" successfully created.
  Physical volume "/dev/mapper/vPV6" successfully created.
  Physical volume "/dev/mapper/vPV7" successfully created.
  Physical volume "/dev/mapper/vPV8" successfully created.

[root@host-086 ~]# pvs
  PV               VG            Fmt  Attr PSize   PFree  
  /dev/mapper/vPV1               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV2               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV3               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV4               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV5               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV6               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV7               lvm2 ---  <25.95g <25.95g
  /dev/mapper/vPV8               lvm2 ---  <25.95g <25.95g

# Is there an equivalent to 'vdo list' or 'pvs', like 'cryptsetup list' or something that can show me all the crypt volumes, besides playing around with dmsetup?

[root@host-083 ~]# dmsetup status | grep crypt
cPV5: 0 62898096 crypt 
cPV4: 0 62898096 crypt 
cPV3: 0 62898096 crypt 
cPV2: 0 62898096 crypt 
cPV1: 0 62898096 crypt 
cPV8: 0 62898096 crypt 
cPV7: 0 62898096 crypt 
cPV6: 0 62898096 crypt 

# Our test tools need to clean up from old runs that may not have completed properly and it would be nice to have a simple list of what is currently open. Maybe something already exists but it didn't pop out at me from reading the man page.


Version-Release number of selected component (if applicable):
cryptsetup-libs-1.7.4-4.el7.x86_64
cryptsetup-1.7.4-4.el7.x86_64

Comment 3 Milan Broz 2018-03-03 11:26:49 UTC
Why you cannot use lsblk? The TYPE is actually parsed from the DM-UUID field (if set), is is set to crypt here.

(For now it prints crypt even for integrity devices, maybe that need to be fixed though.)

Comment 4 Corey Marthaler 2020-10-12 16:09:58 UTC
Couldn't the same argument be made for lvm, vdo, or mdadm volumes? 

Use the appropriate lvm or vdo or mdadm userspace utilities to create, remove, and alter your devices, but, if you want to display or list your devices, just use "lsblk" or "dmsetup status". The answer is because it's cumbersome. If a utility can create, delete, or alter storage, in my opinion it should be able to display/list those same devices and their attributes.

Comment 8 RHEL Program Management 2021-02-15 07:35:37 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.