On Thu, Jan 07, 2016 at 10:19:18PM -0800, Andy Grover wrote:
If you have a successful procedure for getting SRP target working,
it'd be
great for us to add it to the targetcli man page. I've been trying to follow
along and am just confused. It seems crazy that anything would require
rearranging parts of long hex values to work!
Hi Andy,
find some instructions I wrote a while ago below:
--------- snip ---------
On the target system install the following packages:
https://github.com/agrover/configshell-fb
https://github.com/agrover/rtslib-fb
https://github.com/agrover/targetcli-fb
Note they all have a "make deb" target to build .deb packages,
which is the preferred way to install them on Debian.
On the target do a:
# mkdir /etc/target
to prepare setting up the storage target.
Start the just installed "targetcli" tool and inside it
type the following commands
cd /backstores/ramdisk
create name=rd_backend size=1GB
cd /srpt
create 0xfe800000000000000002c903009f83a1
cd ib.fe800000000000000002c903009f83a1/luns
create /backstores/ramdisk/rd_backend
cd ../acls
create fe80:0000:0000:0000:f452:1403:007b:e041
create ib.0000000000000000f4521403007be041
note that the uuids above are those for the IB port that is listed
as "ACTIVE" in "ibstatus" output. It will always be listed in
the fe80:0000:0000:0000:f452:1403:007b:e041, but different targetcli
command expect it with a 0x prefix, with a ib. prefix, or with the
leading fe80 replaced with zeroes. Don't ask me why, it's inherited
from existing and documented srp behavior that we piggyback on.
On the initiator the setup is much easier:
First check that we can see a "SRP" node:
# ibsrpdm -c -d /dev/infiniband/umad0
it should list output similar to:
id_ext=0002c903009f83a0,ioc_guid=0002c903009f83a0,dgid=fe800000000000000002c903009f83a1,pkey=ffff,service_id=0002c903009f83a0
The pipe this information into systfs and we should see the nvmeof
device:
# for i in $(ibsrpdm -c -d /dev/infiniband/umad0); do
echo $i > /sys/class/infiniband_nvmeof/nvmeof-mlx4_0-1/add_target;
done
(replace the nvmeof-mlx4_0-1 with the name of the ACTIVE port if different)