[aartikel]1847194680:left:infofreund-21[/aartikel]Hi all, today i want you to show, how you can setup an iscsi-target in freenas. With an iscsi-target you can provide a cheap shared storage for your clients.
A more technical explanation from http://searchwindowsserver.techtarget.com/
"An iSCSI target is a storage resource located on an Internet Small Computer System Interface (iSCSI) server. iSCSI is a protocol used to link data storage devices over an IP network infrastructure. (Also see: IP storage.)"
For this tutorial i used the freenas version 220.127.116.11.
An unused device (can be a loop device -> here is a tutorial how to create such a device http://infofreund.de/?p=276)
1.) After login on the webinterface klick the Services-button.
2. Then enable the iscsi-optin by turning the switcher to on. After that, click on the settings-symbol.
3. Now add a portal by selecting the Portals-Tab in the menu bar. Then choose "Add Portal".
4. The comment-box is optional, you can comment the the poral here, but u dont have to. Add the portal by pressing "OK".
5. Now we add an initiator by selecting the Intitiators-Tab in the menu bar. Here choose "Add Initiator".
Check, that "ALL" is set In the "Initiators" and the "Authorized network" field. Press "OK" to Add the initiator.
6. We have to add a device or a file now. In my example i use a device.
To add a device selecting "Extends" in the menu, then "Add Extend"
Now set an extend-name, select "device" as the extend-type and select the device itself.
Press "Ok" for finish this operation.
7. Now we have to create a iscsi-target. Select "Targets" in the menu-bar, then "Add Target"
Add a target-name, then it is important, that "Portal Group ID" and "Initatior Group ID" is set to "1".
Press "OK" to add the target.
8. For finishing the setup, we have to connect the target to the extend.
To realize this, please click "Associated Targets" and then "Add Target / Extend"
Then select in the target selection your given targetname and in extend-selection-box your given selection name.
With pressing "OK" you created your freenas iscsi target. Gratiulations :)!
How to check, if it is working?
You can can simply check from a linux-shell, if the freenas iscsi target answers.
1. Open a shell.
2. Type the command: iscsiadm -m discovery -t sendtargets -p 192.168.0.106:3260 in the console.
(Replace 192.168.0.106 with your ip)
3. You should get a answer: