Low/no-cost, cross-platform alternatives to iSCSI and Fibre Channel

(My use case is using my RAID storage on a Linux workstation to store Time Machine backups and other data)

I have investigated options for iSCSI, they are GlobalSAN and XtendSAN. Both are prohibitively expensive, at A$119.51 and A$261.85 respectively, at time of writing.

Since there are no free or reasonably priced iSCSI initiators for OS X (there is an FOSS iSCSI initiator for OS X, but it is not currently developed enough for real use), I am seeking a viable alternative.

Please don’t suggest file sharing protocols such as SMB, AFP and NFS. I’ve tried them, and they don’t work since file permissions need to be directly managed by the OS of the machine running the Time Machine service.

Answer

There is known workaround which uses an older version of Droboshare Dashboard software which includes an CLI Xtend SAN iSCSI Initiator written in Java:

Download and install Droboshare Dashboard 2.6.2 which is the last version containing the Atto iSCSI Initiator. Download and install Java.

Remove/rename the file /usr/sbin/xtendsan/.iqn.filter or replace the content/add a line with the beginning of your target name:

The content of the original file looks like this:

iqn.2005-06.com.datarobotics
iqn.2005-06.com.drobo

The main app to use is “xtendsancli” as superuser. Enter sudo xtendsancli to get a list of possible commands.

And here is a basic script to connect to your iSCSI-targets:

#!/bin/bash

serverAddress="${1:-127.0.0.1}"

if [ -x /usr/sbin/xtendsancli ] ; then
  for target in $(/usr/sbin/xtendsancli discoverTargets -address $serverAddress -verbose | grep ^iqn); do
    /usr/sbin/xtendsancli logoutTargets -verbose -address $serverAddress "$target"
    /usr/sbin/xtendsancli removeTargets -verbose -address $serverAddress "$target"
    /usr/sbin/xtendsancli addTargets -address $serverAddress "$target" -autoLogin Yes
    # works even if no security is set on server
    /usr/sbin/xtendsancli loginTargets -address $serverAddress "$target" -autoLogin Yes -security CHAP,TargetUserName=username,TargetSecret=password
  done
else
  echo "no file"
fi

Replace the x.x.x.x by the real IP-address of your server. Make the script executable with sudo chmod +x scriptname.sh and run it with sudo scriptname.sh.
If you have CHAP enabled replace “-security NONE” with “-security CHAP,TargetUserName=username,TargetSecret=password”.

Tested with 10.9.5 Mavericks/Java SE Runtime Environment 1.7.0_71/Java for OS X 2014-001.


Addendum for OS X 10.11 El Capitan

To install Droboshare Dashboard 2.6.2 and use the Atto iSCSI Initiator you have to download and install Java for OS X 2015-001 Beta.

Then you have to disable rootless mode to be able to modify /usr/sbin/ with the following command:

sudo nvram boot-args="rootless=0";sudo reboot

After the reboot install Droboshare Dashboard 2.6.2 and reboot again.

Atfer modifying /usr/sbin/xtendsan/.iqn.filter as described above you should be able to use the iSCSI Initiator like in Mavericks or Yosemite.

Tested with 10.11 El Capitan Public Beta/Java for OS X 2015-001 beta.

Attribution
Source : Link , Question Author : andonuts , Answer Author : nohillside

Leave a Comment