New Version
Version 4 (Who Cares, 11/01/2010 03:21 pm)
| 1 | 1 | Who Cares | h3. Installation Instructions (.bin format) |
|---|---|---|---|
| 2 | 1 | Who Cares | |
| 3 | 3 | 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. |
| 4 | 1 | Who Cares | |
| 5 | 3 | Who Cares | So you still have to have the "EnableRootSSH":http://www.readynas.com/download/addons/4.00/EnableRootSSH_1.0.bin addon installed. |
| 6 | 1 | Who Cares | |
| 7 | 1 | Who Cares | |
| 8 | 1 | Who Cares | *Important note for Upgrades:* |
| 9 | 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: |
| 10 | 1 | Who Cares | |
| 11 | 1 | Who Cares | # Install the .bin archive through the Frontview web management system of your ReadyNAS. |
| 12 | 1 | Who Cares | # Disconnect/Shutdown all clients currently accessing the iSCSI target on your ReadyNAS. |
| 13 | 1 | Who Cares | # Shut down the iSCSI target daemon using <code>"/etc/init.d/iscsi-target stop"</code> |
| 14 | 1 | Who Cares | # Delete the old kernel module by issuing <code>"rm -rf /lib/modules/2.6.17.8ReadyNAS/kernel/iscsi"</code> |
| 15 | 1 | Who Cares | # Recreate kernel module dependencies by running <code>"depmod"</code> |
| 16 | 1 | Who Cares | # Start the iSCSI target daemon: <code>"/etc/init.d/rfw-iscsi-target start"</code> |
| 17 | 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" |
| 18 | 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" |
| 19 | 1 | Who Cares | # That's all |
| 20 | 1 | Who Cares | |
| 21 | 1 | Who Cares | |
| 22 | 1 | Who Cares | h3. Installation |
| 23 | 1 | Who Cares | |
| 24 | 1 | Who Cares | Log in to the SSH shell of your ReadyNAS and perform these steps: |
| 25 | 1 | Who Cares | |
| 26 | 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. |
| 27 | 1 | Who Cares | |
| 28 | 1 | Who Cares | # Install the .bin archive through the Frontview web management system of your ReadyNAS. |
| 29 | 2 | Who Cares | # As the .bin installer doesn't include the main configuration file you'll have to create <code>/etc/iet/ietd.conf</code> manually. A minimal version could look like this (example version should have been installed with the add-on as /etc/iet/ietd.conf.sample): |
| 30 | 1 | Who Cares | <pre> Target iqn.2001-04.com.example:readyduo.iscsi.target0 |
| 31 | 1 | Who Cares | # Users, who can access this target. The same rules as for discovery |
| 32 | 1 | Who Cares | # users apply here. |
| 33 | 1 | Who Cares | # Leave them alone if you don't want to use authentication. |
| 34 | 1 | Who Cares | #IncomingUser joe secret |
| 35 | 1 | Who Cares | #OutgoingUser jim 12charpasswd |
| 36 | 1 | Who Cares | # Logical Unit definition |
| 37 | 1 | Who Cares | # You must define one logical unit at least. |
| 38 | 1 | Who Cares | # Block devices, regular files, LVM, and RAID can be offered |
| 39 | 1 | Who Cares | # to the initiators as a block device. |
| 40 | 1 | Who Cares | Lun 0 Path=/c/iscsi_0,Type=fileio |
| 41 | 1 | Who Cares | # Alias name for this target |
| 42 | 1 | Who Cares | # Alias SunStorage |
| 43 | 1 | Who Cares | # various iSCSI parameters |
| 44 | 1 | Who Cares | # (not all are used right now, see also iSCSI spec for details) |
| 45 | 1 | Who Cares | # MaxConnections 8 |
| 46 | 1 | Who Cares | # InitialR2T No |
| 47 | 1 | Who Cares | # ImmediateData Yes |
| 48 | 1 | Who Cares | #MaxRecvDataSegmentLength 8192 |
| 49 | 1 | Who Cares | #MaxXmitDataSegmentLength 8192 |
| 50 | 1 | Who Cares | #MaxBurstLength 262144 |
| 51 | 1 | Who Cares | #FirstBurstLength 65536 |
| 52 | 1 | Who Cares | #DefaultTime2Wait 2 |
| 53 | 1 | Who Cares | #DefaultTime2Retain 20 |
| 54 | 1 | Who Cares | #MaxOutstandingR2T 8 |
| 55 | 1 | Who Cares | #DataPDUInOrder Yes |
| 56 | 1 | Who Cares | #DataSequenceInOrder Yes |
| 57 | 1 | Who Cares | #ErrorRecoveryLevel 0 |
| 58 | 1 | Who Cares | # HeaderDigest CRC32C,None |
| 59 | 1 | Who Cares | # DataDigest CRC32C,None |
| 60 | 1 | Who Cares | # various target parameters |
| 61 | 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 |
| 62 | 1 | Who Cares | these commands: |
| 63 | 4 | Who Cares | <pre> mkdir -p /etc/iet |
| 64 | 4 | Who Cares | cd /etc/iet |
| 65 | 4 | Who Cares | wget "http://readynasfreeware.org/attachments/download/6/ietd.conf"</pre> |
| 66 | 1 | Who Cares | # The important part is this line: |
| 67 | 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. |
| 68 | 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: |
| 69 | 1 | Who Cares | <pre> |
| 70 | 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. |
| 71 | 3 | Who Cares | # In case the iSCSI target daemon is already running, shut it down first: |
| 72 | 3 | Who Cares | <pre> /etc/init.d/rfw-iscsi-target stop</pre> |
| 73 | 1 | Who Cares | # Start the iSCSI target daemon: |
| 74 | 1 | Who Cares | <pre> /etc/init.d/rfw-iscsi-target start</pre> |