Bug 740341 - inconsistent output of dmsetup table
inconsistent output of dmsetup table
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Milan Broz
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F16Betas390x
  Show dependency treegraph
 
Reported: 2011-09-21 13:22 EDT by Dan Horák
Modified: 2013-02-28 23:10 EST (History)
13 users (show)

See Also:
Fixed In Version: lvm2-2.02.86-6.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-11 17:02:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dan Horák 2011-09-21 13:22:45 EDT
Description of problem:
The output of "dmsetup table" differs when used with device name and with  major/minor pair. This breaks bootloader installation on s390x.

bash-4.2# dmsetup table /dev/dm-1
0 1048576 linear 94:5 2048

bash-4.2# dmsetup table -j 253 -m 1
vg_devel4-lv_boot: 0 1048576 linear 94:5 2048

bash-4.2# dmsetup table            
vg_devel4-lv_boot: 0 1048576 linear 94:5 2048
vg_devel4-lv_swap: 0 983040 linear 94:5 1050624
vg_devel4-lv_root: 0 4784128 linear 94:9 2048
vg_devel4-lv_root: 4784128 4784128 linear 94:13 2048
vg_devel4-lv_root: 9568256 4784128 linear 94:17 2048
vg_devel4-lv_root: 14352384 4784128 linear 94:21 2048
vg_devel4-lv_root: 19136512 4784128 linear 94:25 2048
vg_devel4-lv_root: 23920640 4784128 linear 94:29 2048
vg_devel4-lv_root: 28704768 2752512 linear 94:5 2033664
live-rw: 0 4194304 snapshot 7:1 7:2 P 8


Version-Release number of selected component (if applicable):
lvm2-2.02.86-5.fc16.s390x

Additional information:
same commands on F-15 return following

[root@devel1 ~]# dmsetup table
vg_devel1-lv_swap: 0 3735552 linear 94:2 2048
vg_devel1-lv_swap: 3735552 393216 linear 94:5 4392960
vg_devel1-lv_root: 0 4784128 linear 94:13 2048
vg_devel1-lv_root: 4784128 4784128 linear 94:17 2048
vg_devel1-lv_root: 9568256 4784128 linear 94:21 2048
vg_devel1-lv_root: 14352384 4784128 linear 94:25 2048
vg_devel1-lv_root: 19136512 4784128 linear 94:9 2048
vg_devel1-lv_root: 23920640 4784128 linear 94:29 2048
vg_devel1-lv_root: 28704768 4390912 linear 94:5 2048

[root@devel1 ~]# dmsetup table /dev/dm-1
0 3735552 linear 94:2 2048
3735552 393216 linear 94:5 4392960

[root@devel1 ~]# dmsetup table -j 253 -m 1
0 3735552 linear 94:2 2048
3735552 393216 linear 94:5 4392960

[root@devel1 ~]# rpm -q lvm2
lvm2-2.02.84-3.fc15.s390x
Comment 1 Milan Broz 2011-09-21 13:32:20 EDT
Shoold be just one line fix. 

--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
 -3478,7 +3478,8 @@ int main(int argc, char **argv)
        #endif
 
       doit:
-       multiple_devices = (argc != 2 && cmd->repeatable_cmd);
+       multiple_devices = (cmd->repeatable_cmd && argc != 2 &&
+                        (argc != 1 || (!_switches[UUID_ARG] && !_switches[MAJOR_ARG])));
        do {
Comment 2 Dan Horák 2011-09-21 14:09:04 EDT
(In reply to comment #1)
> Shoold be just one line fix. 
> 
> --- a/tools/dmsetup.c
> +++ b/tools/dmsetup.c
>  -3478,7 +3478,8 @@ int main(int argc, char **argv)
>         #endif
> 
>        doit:
> -       multiple_devices = (argc != 2 && cmd->repeatable_cmd);
> +       multiple_devices = (cmd->repeatable_cmd && argc != 2 &&
> +                        (argc != 1 || (!_switches[UUID_ARG] &&
> !_switches[MAJOR_ARG])));
>         do {

yes, this patch fixes my problem
Comment 3 Milan Broz 2012-01-26 16:08:19 EST
Fixed in lvm2-2.02.86-6.fc16.
Comment 4 Fedora Update System 2012-01-26 16:10:20 EST
lvm2-2.02.86-6.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/lvm2-2.02.86-6.fc16
Comment 5 Fedora Update System 2012-01-27 22:30:04 EST
Package lvm2-2.02.86-6.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lvm2-2.02.86-6.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0984/lvm2-2.02.86-6.fc16
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2012-02-11 17:02:37 EST
lvm2-2.02.86-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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