PowerPath AIX: Applications crash and LVM_IO_FAIL with ERROR CODE AS DEFINED IN sys/errno.h 22 (EINVAL)

Summary: In an NPIV configuration with two virtual HBA, when one virtual HBA goes down, and although there is one path left for the I/Os, LVM_IO_FAIL are logged in errpr with ERROR CODE AS DEFINED IN sys/errno.h set to 22 (EINVAL). Because of these LVM errors, the application using the volume crashes. The issue could also occur in a non NPIV environment. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Loss of a path

Environment:
Dell Software: PowerPath for AIX (any release)

In a multiple paths configuration managed by PowerPath, when one path goes down, and although other paths are available, the application goes down. And LVM_IO_FAIL with "ERROR CODE AS DEFINED IN sys/errno.h" set to 22 are recorded.

Decoded with "summ," errors are showing up as:

107769 Apr 12 08:57:21 LVDD       P LVM_IO_FAIL         LV 8000002C00000003 PV 800000250000001A Block 20016620 EINVAL

(real LVM_IO_FAIL resulting from errors on all the paths are normally associated with errno 5 (EIO) ... which is not the case here)

LABEL:        LVM_IO_FAIL
IDENTIFIER:    E86653C3

Date/Time:       Sun Apr 12 10:09:28 2020
Sequence Number: 108111
Machine Id:      0XXXXXXXXXXX
Node Id:         snode1
Class:           H
Type:            PERM
WPAR:            Global
Resource Name:   LVDD
Resource Class:  NONE
Resource Type:   NONE
Location:

Description
I/O ERROR DETECTED BY LVM

Probable Causes
POWER, DRIVE, ADAPTER, OR CABLE FAILURE

    Recommended Actions
    RUN DIAGNOSTICS AGAINST THE FAILING DEVICE

Detail Data
PHYSICAL VOLUME DEVICE MAJOR/MINOR
8000 0025 0000 0029
ERROR CODE AS DEFINED IN sys/errno.h
          22
BLOCK NUMBER
             392149792
LOGICAL VOLUME DEVICE MAJOR/MINOR
8000 002D 0000 0001
PHYSICAL BUFFER TRANSACTION TIME
                     0
RESIDUAL COUNT
               1048576
NUMBER OF BLOCKS
               1048576
I/O TYPE
USER DATA
SENSE DATA
0000 0000 0002 EBF7 00F6 D020 0000 4C00 0000 013D 10F0 F4AD 00F6 D020 3831 80BE
0000 0000 0000 0000

 

Cause

This error is generated when the I/O buffer at upstream (FS/LVM) is not transferred to the disk driver. (here PowerPath - but the issue could also be seen in an MPIO environment) hdiskpower).

In IBM terms: this LVM I/O error (EINVAL) is reported when PCM (powerpath) cannot process the I/O request from the LVM as there could be a mismatch of VG LTG size (LVM I/O buffer) with disk max_transfer size or adapter max_xfer_size (NPIV here).

When the Logical Track Group (LTG) is greater than the disk driver max_transfer size, the I/O cannot be processed and a LVM_IO_FAIL is generated with erno set to 22 (EINVAL)

In our case, we had (customer private data have been modified):

VOLUME GROUP:       vgdata1                  VG IDENTIFIER:  00f6d02000004c0000000145a924a9d9
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      36387 (9315072 megabytes)
MAX LVs:            512                      FREE PPs:       746 (190976 megabytes)
LVs:                3                        USED PPs:       35641 (9124096 megabytes)
OPEN LVs:           3                        QUORUM:         7 (Enabled)
TOTAL PVs:          13                       VG DESCRIPTORS: 13
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         13                       AUTO ON:        yes
MAX PPs per VG:     127000
MAX PPs per PV:     5080                     MAX PVs:        25
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no
DISK BLOCK SIZE:    512                      CRITICAL VG:    no
FS SYNC OPTION:     no                       CRITICAL PVs:   no

And

# lsattr -El hdisk25

PR_key_value   none               Persistant Reserve Key Value     True
clr_q          yes                Device CLEARS its Queue on error True
location                          Location Label                   True+
lun_id         0x0                Logical Unit Number ID           False
lun_reset_spt  yes                FC Forced Open LUN               True
max_coalesce   0x100000           Maximum Coalesce Size            True
max_retries    5                  Maximum Number of Retries        True
max_transfer   0x40000            Maximum TRANSFER Size            True
node_name      0x5000144041111111 FC Node Name                     False
pvid           none               Physical volume identifier       False
q_err          no                 Use QERR bit                     True
q_type         simple             Queue TYPE                       True
queue_depth    32                 Queue DEPTH                      True+
reassign_to    120                REASSIGN time out value          True
reserve_policy no_reserve         Reserve Policy                   True
reset_delay    0                  Reset Delay                      True
rw_timeout     30                 READ/WRITE time out value        True
scsi_id        0x72ff40           SCSI ID                          False
start_timeout  60                 START UNIT time out value        True
ww_name        0xc001448111111111 FC World Wide Name               False

Here we have max_transfer = 0x40000 (256 kB) < LTG (1024 kB) (0x100000) .. causing the issue.

In the configuration, some hdisks had been set with "max_transfer" set to 0x100000 and others had been set to 0x40000 (probably generated with different ODM releases). If all the paths were available, there was always one of the hdisks of every hdiskpower with max_transfer set to 0x100000 and the I/O could be completed. But when this hdisk was no longer usable, only the disks with max_transfer set to 0x40000 were accessible... causing the issue.

 

Resolution

To fix the issue, the "max_transfer" attribute of the hdisk must be set to a value greater or equal to the LTG size. In our case where LTG = 1024 kB, the following was run to fix the issue:

# for i in `lsdev -Cc disk |grep -i hdiskp |awk '{print $1}'`
do
chdev -l $i -a max_transfer=0x100000 -P
done
# for i in `lsdev -Cc disk |grep -i EMC |awk '{print $1}'`
do
chdev -l $i -a max_transfer=0x100000 -P
done
# reboot

 

Additional Information

This KB does not apply for LVM_IO_FAIL with errno set to 5 (EIO)

 

Affected Products

PowerPath for AIX

Products

PowerPath for AIX
Article Properties
Article Number: 000081958
Article Type: Solution
Last Modified: 04 Nov 2025
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.