Package pyanaconda :: Package storage :: Package devicelibs :: Module mpath
[hide private]
[frames] | no frames]

Module mpath

source code

Classes [hide private]
Functions [hide private]
Parse output from "multipath -d" or "multipath -ll" and form a topology.
source code
flush_mpaths() source code
Variables [hide private]
  log = logging.getLogger("storage")
Function Details [hide private]


source code 

Parse output from "multipath -d" or "multipath -ll" and form a topology.

Returns a dictionary:
{'mpatha':['sdb','sdc'], 'mpathb': ['sdd', 'sde'], ... }

The 'multipath -d' output looks like:
create: mpathc (1ATA     ST3120026AS                                         5M) undef ATA,ST3120026AS
size=112G features='0' hwhandler='0' wp=undef
`-+- policy='round-robin 0' prio=1 status=undef
`- 2:0:0:0 sda 8:0  undef ready running
create: mpathb (36006016092d21800703762872c60db11) undef DGC,RAID 5
size=10G features='1 queue_if_no_path' hwhandler='1 emc' wp=undef
`-+- policy='round-robin 0' prio=2 status=undef
|- 6:0:0:0 sdb 8:16 undef ready running
`- 7:0:0:0 sdc 8:32 undef ready running
create: mpatha (36001438005deb4710000500000270000) dm-0 HP,HSV400
size=20G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=-1 status=active
| |- 7:0:0:1 sda 8:0  active undef running
| `- 7:0:1:1 sdb 8:16 active undef running
`-+- policy='round-robin 0' prio=-1 status=enabled
|- 7:0:2:1 sdc 8:32 active undef running
`- 7:0:3:1 sdd 8:48 active undef running

(In anaconda, the first one there won't be included because we blacklist
"ATA" as a vendor.)

The 'multipath -ll' output looks like (notice the missing 'create' before

mpatha (3600a0b800067fcc9000001694b557dd1) dm-0 IBM,1726-4xx  FAStT
size=360G features='0' hwhandler='1 rdac' wp=rw
`-+- policy='round-robin 0' prio=3 status=active
  |- 2:0:0:0 sda 8:0  active ready running
  `- 3:0:0:0 sdb 8:16 active ready running