Tuesday June 27, 2006
iSCSI device reporting lots of iscsi sessions logging in and out
I just finished up reviewing a customer problem and I thought
I would post some information about it to save others some time.
In conclusion the problem was due to improperly removing iSCSI
devices from the system. When removing an iSCSI device for good
from a Solaris system. Its a good idea to issue devfsadm -C to
clean up the old /dev paths and also update the MPxIO device
cache (/etc/devices/mdi_scsi_vhci_cache).
The customer reported that in their iSCSI device log they
were seeing frequent repeating iSCSI sessions logging in and out
for no known reason. The Solaris messages log showed no iscsi
related information to explain these device messages.
First, We quickly confirmed that the iSCSI initiator was causing
sessions to login and out of the device with dtrace. To do this
I used the below script.
#!/usr/sbin/dtrace -s
sdt:iscsi:iscsi_conn_state_machine:event
{
printf("%p %s %s", arg0, (string)arg1, (string)arg2);
}
CPU ID FUNCTION:NAME 2 2303 iscsi_conn_state_machine:event 300246927c0 free T1 2 2303 iscsi_conn_state_machine:event 300246927c0 in_login T5 0 2303 iscsi_conn_state_machine:event 300246927c0 logged_in T9 0 2303 iscsi_conn_state_machine:event 300246927c0 in_logout T17 0 2303 iscsi_conn_state_machine:event 3002467f000 free T1 ...
#!/usr/sbin/dtrace -s
fbt:iscsi:iscsid_poke_discovery:entry
{
stack();
}
...
2 33609 iscsid_poke_discovery:entry poke
iscsi`iscsid_config_one+0x70
iscsi`iscsi_tran_bus_config+0x144
genunix`ndi_devi_config_one+0x9c
genunix`bus_config_one_phci_child+0x38
genunix`config_client_paths+0xbcI wease
genunix`mdi_vhci_bus_config+0x114
scsi_vhci`vhci_scsi_bus_config+0x40
genunix`ndi_devi_config_one+0x9c
genunix`resolve_pathname+0x158
genunix`e_ddi_hold_devi_by_path+0x10
genunix`e_devid_cache_to_devt_list+0x2a8
genunix`ddi_lyr_devid_to_devlist+0x10
md`md_resolve_bydevid+0xe4
md_raid`raid_check_cols+0x68
md_raid`raid_iosetup+0x12c
md_raid`md_raid_strategy+0x208
md`mdstrategy+0xd4
ufs`lufs_write_strategy+0x11c
ufs`ufs_putapage+0x308
ufs`ufs_putpages+0x2a4
...
Since a stack is reported this confirms that a tran_bus_config()
is occuring. We can also see the request was for a CONFIG_ONE and
continues on to iscsid_poke_discovery(). This means the kernel
has requested iSCSI to discover and login to a specific device.
Although that device is not found so we have to update our discovery
leading to a iSCSI login/out on the target.
fbt:iscsi:iscsid_config_one:entry
{
printf("%s %d", (string)arg1, arg2);
}
Posted at 02:24PM Jun 27, 2006 by dweibel in General |