device-mapper multipath

|^^|

source: https://access.redhat.com/discussions/1307143

version:redhat 6.4

problem:

[root@j1 ~]#dmesg [Hardware Error]: Machine check events logged [Hardware Error]: Machine check events logged [Hardware Error]: Machine check events logged [Hardware Error]: Machine check events logged ISO 9660 Extensions: Microsoft Joliet Level 3 ISO 9660 Extensions: RRIP_1991A device-mapper: table: 253:7: multipath: error getting device device-mapper: ioctl: error adding target to table device-mapper: table: 253:7: multipath: error getting device device-mapper: ioctl: error adding target to table device-mapper: table: 253:7: multipath: error getting device device-mapper: ioctl: error adding target to table device-mapper: table: 253:7: multipath: error getting device device-mapper: ioctl: error adding target to table

[root@j1 ~]# dmsetup info -C Name Maj Min Stat Open Targ Event UUID vg00-LogVol01 253 5 L--w 1 1 0 LVM-eJV2Rjx11AacJLzet6tcb2z2O9PTUku64U1mtUXXTcl72B6Iu6W5V6Hin7uTNOkw vg00-LogVol00 253 0 L--w 1 1 0 LVM-eJV2Rjx11AacJLzet6tcb2z2O9PTUku6EJrCeqVbJoyKw44HELUYjF9N2dVlHc4Q mpathd 253 4 L--w 33 1 1 mpath-36001438009b064580000400000710000 mpathc 253 3 L--w 9 1 1 mpath-36001438009b064580000400000650000 mpathb 253 2 L--w 63 1 1 mpath-36001438009b0645800004000006b0000 vg00-LogVol03 253 1 L--w 1 1 0 LVM-eJV2Rjx11AacJLzet6tcb2z2O9PTUku6HogLq442U3F5A2Kj4PDAOm56R1Krex2j vg00-LogVol02 253 6 L--w 1 1 0 LVM-eJV2Rjx11AacJLzet6tcb2z2O9PTUku6wQS2Nd3n04mFad51Lx1Y8VBdqIxHq0KV

[root@j1 ~]# vgs VG #PV #LV #SN Attr VSize VFree vg00 1 4 0 wz--n- 558.68g 369.23g [root@j1 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 vg00 lvm2 a-- 558.68g 369.23g [root@j1 ~]# lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert LogVol00 vg00 -wi-ao--- 97.66g LogVol01 vg00 -wi-ao--- 9.77g LogVol02 vg00 -wi-ao--- 19.53g LogVol03 vg00 -wi-ao--- 62.50g [root@j1 ~]# lsmod |grep dm_multipath dm_multipath 17756 4 dm_round_robin dm_mod 82839 22 dm_multipath,dm_mirror,dm_log

root@j1 ~]# grep -v ^$ /etc/multipath.conf defaults { udev_dir /dev polling_interval 10 path_selector "round-robin 0" path_grouping_policy failover getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" prio alua path_checker tur rr_min_io 100 rr_min_io_rq 1 rr_weight uniform failback immediate no_path_retry 12 user_friendly_names yes } blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]" devnode "^hd[a-z][[0-9]]" devnode "^cciss!c[0-9]d[0-9]" devnode "^sda[0-9]" } devices { device { vendor "HP" product "OPEN-." path_grouping_policy multibus getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" path_selector "round-robin 0" path_checker tur features "0" hardware_handler "0" prio const failback immediate rr_weight uniform no_path_retry queue rr_min_io 1000 rr_min_io_rq 1 } }

source: https://access.redhat.com/solutions/38538

Why do I see "multipath: error getting device" and "device-mapper: ioctl: error adding target to table" during bootup in RHEL?

Solution Verified - Updated May 19 2014 at 7:51 PM

Environment

    • Red Hat Enterprise Linux 4

    • Red Hat Enterprise Linux 5

    • Red Hat Enterprise Linux 6

  • device-mapper-multipath

Issue

    • I see device-mapper errors while booting a system that has device-mapper-multipath enabled:

Raw

device-mapper: table: 253:26: multipath: error getting device device-mapper: ioctl: error adding target to table device-mapper: table: 253:66: multipath: error getting device device-mapper: ioctl: error adding target to table

Resolution

    • If there is a device that is not blacklisted in /etc/multipath.conf which does not have multiple paths available or is not intended to be mapped by multipath, then blacklist it. For example, if the root device /dev/sda is not a multipath target, then the blacklist may look something like:

Raw

blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" devnode "^sda$" }

    • Or using the WWID of the device:

Raw

blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" wwid "1234567890987654321" }

    • If any of multipath device not getting listed in multipath -ll and similar messages observed in /var/log/messages then to resolve this issue, first check if any path(sd device used as subpath in multipath) being mounted on system, manually or any entry in /etc/fstab. If so, unmount it, remove entry from fstab and reload multipath configuration:

Raw

# service multipathd reload # multipath -v2

    • Rebuild the initrd or initramfs image after making the changes in multipath.conf file.

Root Cause

    • This error is most often caused by multipath attempting to map a device which is already in use, such as if its mounted or mapped by an active LVM logical volume. If the blacklist in /etc/multipath.conf does not restrict multipath from mapping the device in question, then when it gets run during the boot sequence it will attempt to map it. Because the device is in use, this mapping will fail, and the errors in question are produced.

    • The device-mapper major:minor in the messages may not actually correspond to an actual device when looking at dmsetup output after boot, because the map never actually got created.

Diagnostic Steps

    • Determine if there are any devices which are not blacklisted in /etc/multipath.conf, but which would be mounted early in the boot process (this usually means the device holding /, or in the same VG as /).

    • Check blacklist section of /etc/multipath.conf. Need to blacklsit cciss device not partitions.

Raw

devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"

    • to

Raw

devnode "^cciss!c[0-9]d[0-9]*"

eof