New Version

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

1 1
h3. Installation Instructions (.bin format)
2 1
3 1
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
5 1
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
7 1
 
8 1
9 1
*Important note for Upgrades:*
10 1
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
12 1
# Install the .bin archive through the Frontview web management system of your ReadyNAS.
13 1
# Disconnect/Shutdown all clients currently accessing the iSCSI target on your ReadyNAS.
14 1
# Shut down the iSCSI target daemon using <code>"/etc/init.d/iscsi-target stop"</code>
15 1
# Delete the old kernel module by issuing <code>"rm -rf /lib/modules/2.6.17.8ReadyNAS/kernel/iscsi"</code>
16 1
# Recreate kernel module dependencies by running <code>"depmod"</code>
17 1
# Start the iSCSI target daemon: <code>"/etc/init.d/rfw-iscsi-target start"</code>
18 1
# 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
# 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
# That's all
21 1
22 1
 
23 1
h3. Installation
24 1
25 1
Log in to the SSH shell of your ReadyNAS and perform these steps:
26 1
27 1
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
29 1
# Install the .bin archive through the Frontview web management system of your ReadyNAS.
30 1
# 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
<pre>      Target iqn.2001-04.com.example:readyduo.iscsi.target0
32 1
              # Users, who can access this target. The same rules as for discovery
33 1
              # users apply here.
34 1
              # Leave them alone if you don't want to use authentication.
35 1
              #IncomingUser joe secret
36 1
              #OutgoingUser jim 12charpasswd
37 1
              # Logical Unit definition
38 1
              # You must define one logical unit at least.
39 1
              # Block devices, regular files, LVM, and RAID can be offered
40 1
              # to the initiators as a block device.
41 1
              Lun 0 Path=/c/iscsi_0,Type=fileio
42 1
              # Alias name for this target
43 1
              # Alias SunStorage
44 1
              # various iSCSI parameters
45 1
              # (not all are used right now, see also iSCSI spec for details)
46 1
              # MaxConnections                8
47 1
              # InitialR2T            No
48 1
              # ImmediateData         Yes
49 1
              #MaxRecvDataSegmentLength 8192
50 1
              #MaxXmitDataSegmentLength 8192
51 1
              #MaxBurstLength         262144
52 1
              #FirstBurstLength       65536
53 1
              #DefaultTime2Wait       2
54 1
              #DefaultTime2Retain     20
55 1
              #MaxOutstandingR2T      8
56 1
              #DataPDUInOrder         Yes
57 1
              #DataSequenceInOrder    Yes
58 1
              #ErrorRecoveryLevel     0
59 1
              # HeaderDigest          CRC32C,None
60 1
              # DataDigest            CRC32C,None
61 1
              # various target parameters
62 1
              #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
      these commands:
64 1
65 1
      cd /etc
66 1
      wget "http://readynasfreeware.org/attachments/download/6/ietd.conf"
67 1
# The important part is this line:
68 1
<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
# 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
<pre>
71 1
      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
# Make the iSCSI modules known to the kernel. This is done by typing
73 1
<pre>      depmod</pre>on the command line. (You only need to do this once)
74 1
# Start the iSCSI target daemon:
75 1
<pre>      /etc/init.d/rfw-iscsi-target start</pre>
76 1
# To enable autostart of the iSCSI target daemon, edit /etc/init.d/rc3 and insert
77 1
<pre>      /etc/init.d/rfw-iscsi-target start</pre>right before the last line (should be "exit 0").
78 1
# To have the iSCSI target daemon shut down cleanly on a system shutdown, edit /etc/rc6.d/S99reboot and insert
79 1
<pre>      /etc/init.d/rfw-iscsi-target stop</pre>just before the line '# Save the last 5 ecounters by date.'