Bug 740341 - inconsistent output of dmsetup table
Summary: inconsistent output of dmsetup table
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Broz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F16Betas390x
TreeView+ depends on / blocked
 
Reported: 2011-09-21 17:22 UTC by Dan Horák
Modified: 2013-03-01 04:10 UTC (History)
13 users (show)

Fixed In Version: lvm2-2.02.86-6.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-11 22:02:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan Horák 2011-09-21 17:22:45 UTC
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 17:32:20 UTC
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 18:09:04 UTC
(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 21:08:19 UTC
Fixed in lvm2-2.02.86-6.fc16.

Comment 4 Fedora Update System 2012-01-26 21:10:20 UTC
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-28 03:30:04 UTC
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 22:02:37 UTC
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.