The Linux kernel has been enhanced to enable userspace to respond to certain SCSI Unit Attention conditions received from SCSI devices via the udev event mechanism. The FlashArray using version 5.0 and later supports the following SCSI Unit Attentions:
|
Description |
ASC |
ASCQ |
|---|---|---|
|
|
0x2A |
0x09 |
|
|
0x2A |
0x06 |
|
|
0x3F |
0x0E |
With these SCSI Unit Attentions, it is possible to have the Linux initiator auto-rescan on these storage configuration changes. The requirement for auto-rescan support in RHEL/Centos is the libstoragemgmt-udev package. On installing this package a udev rule is installed, 90-scsi-ua.rules. Uncomment the supported Unit Attentions and reload the udev service to pick up the new rules:
[root@host ~]# cat 90-scsi-ua.rules
#ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="INQUIRY_DATA_HAS_CHANGED", TEST=="rescan", ATTR{rescan}="x"
ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="CAPACITY_DATA_HAS_CHANGED", TEST=="rescan", ATTR{rescan}="x"
#ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="THIN_PROVISIONING_SOFT_THRESHOLD_REACHED", TEST=="rescan", ATTR{rescan}="x"
#ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="MODE_PARAMETERS_CHANGED", TEST=="rescan", ATTR{rescan}="x"
ACTION=="change", SUBSYSTEM=="scsi", ENV{SDEV_UA}=="REPORTED_LUNS_DATA_HAS_CHANGED", RUN+="scan-scsi-target $env{DEVPATH}"
The following udevadm command will cause the following will cause all of the rules in the rules.d directory to be triggered immediately. The customer needs to take extreme caution when running this command because it may crash the host or have other unintended consequences. We recommend the customer reboots when they have a change control windows if at all possible.
[root@host ~]# udevadm control --reload-rules && udevadm trigger