Are you using Solaris 11 on the initiator and target?
If so, you might want to redirect this question to Oracle as we do not provide Mellanox OFED Driver for Solaris OS.
Solaris 11 is the target
Client's / initiators are both Centos 7.3
One with MLNX_OFED_LINUX-3.2-22.214.171.124 the other with MLNX_OFED_LINUX-4.0-126.96.36.199
Just looking for a clean way to disconnect the block device without rebooting the host ?
Did you hand edit the /etc/srp_daemon.conf file and remove the id of the device follow by an "/etc/init.d/srptools restart"?
Determine the IDs of presented devices
You can determine the IDs of SRP devices presented to your hosts by running the ibsrpdm -c command.
# ibsrpdm -c id_ext=50001ff10005052a,ioc_guid=50001ff10005052a,dgid=fe8000000000000050001ff10005052a,pkey=ffff,service_id=2a050500f11f0050
HI, I've given this a try
I've removed the allow statement from srp config
Restarted the service but I still see the disk
Before the restart:
[ 83.910375] sd 1:0:0:0: [sdb] 1258291200 512-byte logical blocks: (644 GB/600 GiB) [ 83.910410] scsi host1: ib_srp: new target: id_ext 0010e000XXXXXXXX ioc_guid 0010e0000XXXXXXXX pkey ffff service_id 0010e0000XXXXXXXX sgid fe80:0000:0000:0000:0002:c903:0055:e715 dgid fe80:0000:0000:0000:0010:e000 :0133:8762 [ 83.911922] sd 1:0:0:0: [sdb] Write Protect is off [ 83.911928] sd 1:0:0:0: [sdb] Mode Sense: 53 00 00 00 [ 83.912454] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 83.922401] sdb: unknown partition table [ 83.926762] sd 1:0:0:0: [sdb] Attached SCSI disk
After the restart the system still thinks it's connected:
[root@Client ~]# fdisk -l /dev/sdb Disk /dev/sdb: 644.2 GB, 644245094400 bytes, 1258291200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 8192 bytes / 8192 bytes
Any other way to do the disconnection
Originally SRP protocol doesn't designed disconnection.
Especially Solaris SRP target is don't know what host disconnect from it and reboot or shutdown.
I used ESXi host with Solaris SRP target several years.
When ESXi host reboot SRP initiator re-connection delay occurred because target don't know that ESXi was reboot.
I've seen this same issue on ESX5.5
We needed to disconnect the storage in ESX before the reboot then re-add the data-store which was a pain