Need to update the running attributes of a virtual SCSI adapter on
an AIX system? Try these steps.

I want to change value for the vscsi_err_recov attribute
to fast_fail.
I can’t do this if the adapter is busy i.e. has open/available paths to a disk device.

#
lsattr -El vscsi2

vscsi_err_recov
delayed_fail
N/A
True

vscsi_path_to
0 Virtual
SCSI Path Timeout True

#
chdev -l vscsi2 -a vscsi_err_recov=fast_fail

Method
error (/usr/lib/methods/chggen):

0514-029 Cannot perform the requested function because a

child device of the specified device is not in a correct state.

I have two paths to my disk devices. This will allow me to take
one path offline while I change the attributes of the adapter.

#
lspath | grep vscsi2

Enabled
hdisk4 vscsi2

Enabled
hdisk5 vscsi2

#
rmpath -l hdisk4 -p vscsi2

path
Defined

#
rmpath -l hdisk5 -p vscsi2

path
Defined

#
lspath | grep vscsi2

Defined
hdisk4 vscsi2

Defined
hdisk5 vscsi2

With the path offline, I can now change the attributes of the
device and then bring the path online again.

#
chdev -l vscsi2 -a vscsi_err_recov=fast_fail

vscsi2
changed

#
lsattr -El vscsi2 -a vscsi_err_recov

vscsi_err_recov
fast_fail N/A True

#
cfgmgr<
Bring the path online.

#
lspath | grep vscsi2

Enabled
hdisk4 vscsi2

Enabled
hdisk5 vscsi2

Now I can do the same for the other VSCSI adapter.

#
lsattr -El vscsi3 -a vscsi_err_recov

vscsi_err_recov
delayed_fail N/A True

#
chdev -l vscsi3 -a vscsi_err_recov=fast_fail

Method
error (/usr/lib/methods/chggen):

0514-029 Cannot perform the requested function because a

child device of the specified device is not in a correct state.

#
lspath | grep vscsi3

Enabled
hdisk4 vscsi3

Enabled
hdisk5 vscsi3

#
rmpath -l hdisk4 -p vscsi3

path
Defined

#
rmpath -l hdisk5 -p vscsi3

path
Defined

#
lspath | grep vscsi3

Defined
hdisk4 vscsi3

Defined
hdisk5 vscsi3

#
chdev -l vscsi3 -a vscsi_err_recov=fast_fail

vscsi3
changed

#
lsattr -El vscsi3 -a vscsi_err_recov

vscsi_err_recov
fast_fail N/A True

#
cfgmgr

# lspath
| grep vscsi3

Enabled
hdisk4 vscsi3

Enabled
hdisk5 vscsi3

All paths are available again and the adapters have been updated.
All of this was done without taking an outage.

#
lspath

Enabled
hdisk4 vscsi2

Enabled
hdisk4 vscsi3

Enabled
hdisk5 vscsi2

Enabled
hdisk5 vscsi3

#
lsattr -El vscsi2 -a vscsi_err_recov

vscsi_err_recov
fast_fail N/A True

# lsattr
-El vscsi3 -a vscsi_err_recov

vscsi_err_recov
fast_fail N/A True

If I’d chosen not to take the paths offline, one at a time, I
would have needed to change the adapters attributes by specifying the –P flag
with the chdev command. Then I would need to reboot the system.

-P

Changes
the device's characteristics permanently in the Customized Devices object class
without actually changing the device. This is useful for devices that cannot
be made unavailable and cannot be changed while in the available state. The
change is made to the database, and the changes are applied to the device when
the system is rebooted. This flag cannot be used with the -T flag. Not all
devices support the -P flag.