New Version

Version 1 (Who Cares, 09/10/2009 07:01 pm)

1 1 Who Cares
h3. Installation Instructions (.bin format)
2 1 Who Cares
3 1 Who Cares
Although the new version of the iSCSI target support installs through the web interface you have to make some manual changes to your ReadyNAS to make it actually work. That's because I consider this an interim version before the release of the full version which will include a complete web interface.
4 1 Who Cares
5 1 Who Cares
So you still have to have the "EnableRootSSH":http://www.readynas.com/download/addons/4.00/EnableRootSSH_1.0.bin addon installed. And to make that one work, you might also need to install the "ToggleSSH":http://www.readynas.com/download/addons/4.00/ToggleSSH_1.0.bin addon first.
6 1 Who Cares
7 1 Who Cares
 
8 1 Who Cares
9 1 Who Cares
*Important note for Upgrades:*
10 1 Who Cares
If you are currently running version 0.4.16 of the iSCSI target support, some file locations and names have changed. To upgrade cleanly, after installing the new version perform the following steps:
11 1 Who Cares
12 1 Who Cares
# Install the .bin archive through the Frontview web management system of your ReadyNAS.
13 1 Who Cares
# Disconnect/Shutdown all clients currently accessing the iSCSI target on your ReadyNAS.
14 1 Who Cares
# Shut down the iSCSI target daemon using <code>"/etc/init.d/iscsi-target stop"</code>
15 1 Who Cares
# Delete the old kernel module by issuing <code>"rm -rf /lib/modules/2.6.17.8ReadyNAS/kernel/iscsi"</code>
16 1 Who Cares
# Recreate kernel module dependencies by running <code>"depmod"</code>
17 1 Who Cares
# Start the iSCSI target daemon: <code>"/etc/init.d/rfw-iscsi-target start"</code>
18 1 Who Cares
# Edit <code>"/etc/init.d/rc3"</code> and replace "/etc/init.d/iscsi-target start" with "/etc/init.d/rfw-iscsi-target start"
19 1 Who Cares
# Edit <code>"/etc/rc6.d/S99reboot"</code> and replace "/etc/init.d/iscsi-target stop" with "/etc/init.d/rfw-iscsi-target stop"
20 1 Who Cares
# That's all
21 1 Who Cares
22 1 Who Cares
 
23 1 Who Cares
h3. Installation
24 1 Who Cares
25 1 Who Cares
Log in to the SSH shell of your ReadyNAS and perform these steps:
26 1 Who Cares
27 1 Who Cares
Note: If you're unfortunate enough to use Windows, you'll need to install an SSH client first. A good choice would be "PuTTY":http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html, other commercial tools are available, too. How to use the SSH client is beyond the scope of this document.
28 1 Who Cares
29 1 Who Cares
# Install the .bin archive through the Frontview web management system of your ReadyNAS.
30 1 Who Cares
# As the .bin installer doesn't include the main configuration file you'll have to create <code>/etc/ietd.conf</code> manually. A minimal version could look like this:
31 1 Who Cares
<pre>      Target iqn.2001-04.com.example:readyduo.iscsi.target0
32 1 Who Cares
              # Users, who can access this target. The same rules as for discovery
33 1 Who Cares
              # users apply here.
34 1 Who Cares
              # Leave them alone if you don't want to use authentication.
35 1 Who Cares
              #IncomingUser joe secret
36 1 Who Cares
              #OutgoingUser jim 12charpasswd
37 1 Who Cares
              # Logical Unit definition
38 1 Who Cares
              # You must define one logical unit at least.
39 1 Who Cares
              # Block devices, regular files, LVM, and RAID can be offered
40 1 Who Cares
              # to the initiators as a block device.
41 1 Who Cares
              Lun 0 Path=/c/iscsi_0,Type=fileio
42 1 Who Cares
              # Alias name for this target
43 1 Who Cares
              # Alias SunStorage
44 1 Who Cares
              # various iSCSI parameters
45 1 Who Cares
              # (not all are used right now, see also iSCSI spec for details)
46 1 Who Cares
              # MaxConnections                8
47 1 Who Cares
              # InitialR2T            No
48 1 Who Cares
              # ImmediateData         Yes
49 1 Who Cares
              #MaxRecvDataSegmentLength 8192
50 1 Who Cares
              #MaxXmitDataSegmentLength 8192
51 1 Who Cares
              #MaxBurstLength         262144
52 1 Who Cares
              #FirstBurstLength       65536
53 1 Who Cares
              #DefaultTime2Wait       2
54 1 Who Cares
              #DefaultTime2Retain     20
55 1 Who Cares
              #MaxOutstandingR2T      8
56 1 Who Cares
              #DataPDUInOrder         Yes
57 1 Who Cares
              #DataSequenceInOrder    Yes
58 1 Who Cares
              #ErrorRecoveryLevel     0
59 1 Who Cares
              # HeaderDigest          CRC32C,None
60 1 Who Cares
              # DataDigest            CRC32C,None
61 1 Who Cares
              # various target parameters
62 1 Who Cares
              #Wthreads               8</pre>If you're uncomfortable with copy'n'paste, you can get the file while on the command line of your ReadyNAS using
63 1 Who Cares
      these commands:
64 1 Who Cares
65 1 Who Cares
      cd /etc
66 1 Who Cares
      wget "http://readynasfreeware.org/attachments/download/6/ietd.conf"
67 1 Who Cares
# The important part is this line:
68 1 Who Cares
<pre>      Lun 0 Path=/c/iscsi_0,Type=fileio</pre>This will tell the iSCSI daemon to use the file /c/iscsi_0. If that’s fine with you, leave the line untouched. Otherwise change the file name to your liking.
69 1 Who Cares
# Create the file from the config line above 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:
70 1 Who Cares
<pre>
71 1 Who Cares
      dd if=/dev/zero of=/c/iscsi_0 bs=10485760 count=4096</pre>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.
72 1 Who Cares
# Make the iSCSI modules known to the kernel. This is done by typing
73 1 Who Cares
<pre>      depmod</pre>on the command line. (You only need to do this once)
74 1 Who Cares
# Start the iSCSI target daemon:
75 1 Who Cares
<pre>      /etc/init.d/rfw-iscsi-target start</pre>
76 1 Who Cares
# To enable autostart of the iSCSI target daemon, edit /etc/init.d/rc3 and insert
77 1 Who Cares
<pre>      /etc/init.d/rfw-iscsi-target start</pre>right before the last line (should be "exit 0").
78 1 Who Cares
# To have the iSCSI target daemon shut down cleanly on a system shutdown, edit /etc/rc6.d/S99reboot and insert
79 1 Who Cares
<pre>      /etc/init.d/rfw-iscsi-target stop</pre>just before the line '# Save the last 5 ecounters by date.'