]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: improve mpath devices reporting 47169/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 19 Jul 2022 11:13:31 +0000 (11:13 +0000)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 19 Jul 2022 12:31:31 +0000 (12:31 +0000)
commite892f02a1a9126cbb520c90aeef0afb3590ddbbb
tree15c00455e92c723ef22da93b590a6fe413d07c0f
parentdab3364f179167df026128a0d51a1dbe52d1f820
ceph-volume: improve mpath devices reporting

An environment with mpath devices looks like following:

`lsblk` output:

```
sdy        65:128  0    6G  0 disk
`-mpathm  252:8    0    6G  0 mpath
sdz        65:144  0    6G  0 disk
`-mpathm  252:8    0    6G  0 mpath
```

`multipath -ll` output:

```
mpathm (3600140575bbe2d3c0c6493fb6e6ed84c) dm-8 LIO-ORG,TCMU device
size=6.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 2:0:0:30 sdz  65:144 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  `- 3:0:0:30 sdy  65:128 active ready running
```

`ceph-volume inventory` output:
```
Device Path               Size         rotates available Model name
/dev/mapper/mpathm        6.00 GB      True    True
/dev/sdy                  6.00 GB      True    False     TCMU device
/dev/sdz                  6.00 GB      True    False     TCMU device
```

ceph-volume shouldn't report devices `/dev/sdy` and `/dev/sdz`, they will never be
available in such a scenario. Considering this, in a host with a bunch of mpath devices
it will pollute the inventory output.

Fixes: https://tracker.ceph.com/issues/56621
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
src/ceph-volume/ceph_volume/util/disk.py