UPDATE: Instead of writing ever new blog posts, an always up-to-date page for the iSCSI Target Support for ReadyNAS is now available.

As much as I like the ReadyNAS, there’s one feature I’ve been missing since day one: Being able to define an iSCSI target. Well, since the code is out there, I set about to make it work on the ReadyNAS. Luckily, there’s now some sort of development kit available, and for I had a spare ReadyNAS unit to break, there was nothing to stop me. To cut a long story (with many gory details) short: Mission accomplished.
(Disclaimer: If you break your ReadyNAS using the modules and scripts from the archive mentioned below, you own the parts. In short: Works for me. Ymmv. Use at your own risk.)
If you want to try for yourself, just download iSCSI Kernel Modules and Utilities for ReadyNAS directly to your ReadyNAS. You should have the EnableRootSSH addon installed and to make that one work, you might also need to install the ToggleSSH addon first. For the sake of brevity I assume you downloaded or copied the file to the /root directory of your ReadyNAS. If not, you’ll have to adapt the following commands accordingly:
- Change to the root directory and unpack the archive:
cd /
tar xzf /root/iscsitarget-0.4.15-ReadyNAS.tar.gz
- Edit /etc/ietd.conf. The important part is this line:
Lun 0 Path=/c/iscsi_file,Type=fileio
This will tell the iSCSI daemon to use the file /c/iscsi_file. If that’s fine with you, leave the line untouched. Otherwise change to your liking.
- Create the file for the iSCSI daemon. Since the iSCSI daemon cannot create the file that’ll later become our virtual SCSI drive, we’ll have to manually do that:
dd if=/dev/zero of=/c/iscsi_file bs=10485760 count=4096
As given above, the command will create a 40 GB file. If you need a smaller/larger file, just change the count parameter. Depending on the size of the file to be created, this will take from some minutes to some hours. So don’t wait for the command to finish but do something else in the meantime.
- Make the iSCSI modules known to the kernel. This is easily done by typing
depmod
on the command line. (You only need to do this once)
- Start the iSCSI target daemon:
/etc/init.d/iscsi-target start
That’s it. But now what? What is it good for to have an iSCSI target sitting around in the network? Well, for me it’s the ideal place to put TimeMachine backups onto. Instead of using an (officially unsupported) SMB share, an iSCSI target to my Mac looks like just another hard drive. And as such, it can be used as a regular TimeMachine backup volume. All that’s needed in addition to the modules for the ReadyNAS is the globalSAN iSCSI initiator, provided free of charge by Studio Network Solutions. It will allow you to connect to any iSCSI target on your network. Although it’s still in beta, it’s working remarkably well for me since months now.

Sorry for asking but: what version of the iSCSI target support did you install and what’s the command you’re using when trying to start it?
@Ashley – please excuse me if I’m teaching you to suck eggs but the current instructions go through the post-installation configuration but they don’t actually tell you to install the latest .bin (linked by Stefan in comment 45) from the Update page in FrontView – I guess you worked that step out yourself?
Mark, thank you. I didn’t think about that possibility. If I weren’t too tired right now, I’d fix the instructions right away.
Pingback: markwilson.it » Creating an iSCSI target on a Netgear ReadyNAS
Stefan, thank you for all your work on this. I said I’d report back when I have it working and I installed on RAIDiator 4.1.6 on a ReadyNAS Duo this evening and successfully connected with the Microsoft iSCSI initiator. More details at http://www.markwilson.co.uk/blog/2009/09/creating-an-iscsi-target-on-a-netgear-readynas.htm
Thanks again for all your work on this. Mark