Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1506702 - Have 'dmsetup status' provide "Device does not exist." like info does
Have 'dmsetup status' provide "Device does not exist." like info does
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.5
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Alasdair Kergon
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-26 11:19 EDT by Corey Marthaler
Modified: 2018-04-10 11:23 EDT (History)
7 users (show)

See Also:
Fixed In Version: lvm2-2.02.176-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 11:22:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 None None None 2018-04-10 11:23 EDT

  None (edit)
Description Corey Marthaler 2017-10-26 11:19:51 EDT
Description of problem:

[root@host-005 ~]# dmsetup info raid_luksvolume
Name:              raid_luksvolume
State:             ACTIVE
Read Ahead:        8192
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 7
Number of targets: 1
UUID: CRYPT-LUKS1-9d6097bf347241458a6208ee29eb5b6d-raid_luksvolume

[root@host-005 ~]# dmsetup info foobar
Device does not exist.
Command failed

[root@host-005 ~]# dmsetup -v status raid_sanity-open_LUKS_fsadm_resize
Name:              raid_sanity-open_LUKS_fsadm_resize
State:             ACTIVE
Read Ahead:        8192
Tables present:    LIVE
Open count:        1
Event number:      2
Major, minor:      253, 6
Number of targets: 1
UUID: LVM-xm7k9a6xRfg8Tndqt3rdAHgpHUFFsjmjb3rBeXnTFq868cP9YEu724T3VPwmpdqS

0 12582912 raid raid1 2 AA 12582912/12582912 idle 0 0 -
[root@host-005 ~]# dmsetup status  raid_sanity-open_LUKS_fsadm_resize
0 12582912 raid raid1 2 AA 12582912/12582912 idle 0 0 -

[root@host-005 ~]# lvs foobar
  Volume group "foobar" not found

# It would be more user friendly to provide a "does not exist or "not found" 
[root@host-005 ~]# dmsetup -v status foobar
Command failed
[root@host-005 ~]# dmsetup status foobar
Command failed


Version-Release number of selected component (if applicable):
lvm2-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
lvm2-libs-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
lvm2-cluster-2.02.175-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-libs-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-event-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-event-libs-1.02.144-3.el7    BUILT: Wed Oct 25 02:03:21 CDT 2017
device-mapper-persistent-data-0.7.3-2.el7    BUILT: Tue Oct 10 04:00:07 CDT 2017
Comment 3 Alasdair Kergon 2017-10-26 12:44:24 EDT
before:
# dmsetup status fffff
Command failed

after:
# ./dmsetup status fffff
Device does not exist.
Command failed


Compare:
# dmsetup table fffff
device-mapper: table ioctl on fffff  failed: No such device or address
Command failed


The library treats INFO and STATUS the same way, not as an error, so the dmsetup calling code should handle the two the same way as each other too.
Comment 7 Corey Marthaler 2017-11-14 11:22:48 EST
Fix verified in the latest rpms.

3.10.0-772.el7.x86_64
lvm2-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-libs-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-cluster-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-lockd-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-python-boom-0.8-3.el7    BUILT: Fri Nov 10 07:16:45 CST 2017
cmirror-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-libs-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-event-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-event-libs-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-persistent-data-0.7.3-2.el7    BUILT: Tue Oct 10 04:00:07 CDT 2017




[root@host-116 ~]# dmsetup info foobar
Device does not exist.
Command failed
[root@host-116 ~]# dmsetup -v status foobar
Device does not exist.
Command failed
[root@host-116 ~]# dmsetup status foobar
Device does not exist.
Command failed
Comment 10 errata-xmlrpc 2018-04-10 11:22:16 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0853

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