Create iSCSI Share via FreeNAS - Step by Step



Step 1: Create Volume


Click Storage

You will see:



Now Click Volume Manager:


Enter Volume Name, and Click “+” button next to available disks:


Click “Add Volume” Button to Proceed.

This is what you got in the end:






Step 2: Create ZVolume

Click the newly created volume under “Storage” tab.



Click “Create zvol” button.
A new windows popup:


Enter the required info as below:



Click “Add zvol” button to start creating zvol. You will get the following screen:
 



Step 3: Start iSCSI Service
Go to Services Tab, and start iSCSI service as mentioned below:



Step 4: Configure iSCSI Portal

Once Enabled Click the Wrench icon besides iSCSI service status:


You will get the following screen:



Now Click the Portals tab:


Click “Add Portal” button as mentioned above. You will get:



just press ok to proceed.



Note: If you have to add another volume, you need to change the port number to any other value (lets say 3261, 3262... and so on).

Step 5: Configure Initiators

Click “Initiators” tab to proceed



Click “Add initiator”, You will get the following window:


Just press “ok” to proceed further.
You will get the following:

 

Step 6: Configure Authorized Access
Click “Authorized Access”


Then Click “Add Authorized Access” button:


Enter user / Secret and press ok to proceed







Step 7: Create iSCSI Target
Click Targets:

 


Click “Add Target” button. A new Window Popup:







Enter the values as mentioned below:

Press ok to proceed. You will get the following screen:



Step 8: Add iSCSI LUN Extent
Click “Extents” Tab



Click “Add Extent” button as mentioned above.



The above info is automatically filled. You just have to enter the name of Extent and Threshold (optional):



Click ok to proceed. You will get the following screen:




Step 9: Add iSCSI LUN “Associated Targets”
Click “Associated Targets”.


Click “Add Target / Extent” button:



Select the relevant values and press ok to proceed.



You will get the following screen further:




>>>>> All configurations for iSCSI on FreeNAS has been completed at this point <<<<
You now have to Install & configure “iSCSI initiator” on Windows Machines to proceed further.

Step 10: Install iSCSI Initiator (in Windows)
Install “iSCSI Server Service” in windows 2012.


After completion of installation, you have reboot the server.

Step 11: Configure iSCSI Initiator (in Windows)
From Win 2012 Server Manager, Click Tools from Top Right Corner >> iSCSI Initiator.



 If its prompting that iSCSI service is not running, Press “Yes” to start it automatically everytime, as mentioned below:



Then iSCSI initiator Config Dialog Box will be opened:




Enter IP Address of your FreeNAS iSCSI storage in the “Target” field in “Targets” tab.


Click “Quick Connect” to proceed further.
A Dialog box will appear, showing the Discovered Targets as mention below:


Click “Done”.
On next screen Click “Connect” as shown below:


On Next Screen:



Click “Advanced”


Click “Enable CHAP log on” check mark to enable CHAP Authentication. Enter CHAP username/pass previously configured in FreeNAS.
Note: Only use the same user created in FreeNAS for this purpose.


Press “ok”.


Also, click “Enable multi-path” check mark (optional), as shown above.
If all goes well, The Status will now change to “Connected”, showing success.


Click “ok” to exit.


Step 12: “Auto Configure” iSCSI Volume
Click “Volumes and Devices” Tab. Click “Auto Configure” button.


Volume List will now automatically add a mount point link, as shown below:

 Press “ok” to exit.

Step 13: Check for iSCSI storage in Disk Management
Open Disk Management.
Newly added iSCSI LUN should now automatically appears as a partition as shown below:


If the iSCSI LUN does not appears, “Rescan Disks” as shown below:



Don’t forget to do the following to these LUN disks in windows:
- Create Fixed size disks (not Dynamic) of these LUNs
- make them “Online” status
- Initiallize them with MBR or GPT partition.
- Format them with NTFS only (not FAT or FAT32)
- Assign them a Drive Letter



====================================================
Step 10 to 13 for Linux OS only
====================================================
Debian iSCSI Setup
  1. Install open-iscsi
    apt-get install open-iscsi multipath-tools
  2. Enable CHAP and automatic startup
    /etc/iscsi/iscsid.conf
1
2
3
4
node.startup = automatic
node.session.auth.authmethod = CHAP
node.session.auth.username = USERNAME
node.session.auth.password = PASSWORD
  1. Restart open-iscsi
    systemctl restart open-iscsi
  2. Discover iSCSI targets
    iscsiadm -m discovery -t sendtargets -p IP_ADDRESS
  3. Log into all possible iSCSI targets
    iscsiadm -m node --login
You should now be able to see a new block device show up in fdisk -l.
Logging out of all iSCSI targets:
iscsiadm -m node -u


Benchmarks
These benchmarks are from inside a KVM virtual machine with an LV on the FreeNAS server. Writeback caching is disabled and it is connected via 1Gb Ethernet.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
root@:~# ioping -R .
--- . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593) ioping statistics ---
9559 requests completed in 3000.1 ms, 4051 iops, 15.8 mb/s
min/avg/max/mdev = 0.2/0.2/2.2/0.0 ms

root@:~# ioping -c 10 .
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=1 time=0.5 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=2 time=0.5 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=3 time=0.7 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=4 time=0.7 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=5 time=0.8 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=6 time=0.9 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=7 time=0.6 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=8 time=0.6 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=9 time=0.5 ms
4096 bytes from . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593): request=10 time=0.6 ms

--- . (ext4 /dev/disk/by-uuid/646d39c1-bc59-40ad-9048-ea79d04de593) ioping statistics ---
10 requests completed in 9009.1 ms, 1565 iops, 6.1 mb/s
min/avg/max/mdev = 0.5/0.6/0.9/0.1 ms

root@:~# dd if=/dev/zero of=test bs=8k count=128k conv=fdatasync
131072+0 records in
131072+0 records out
1073741824 bytes (1.1 GB) copied, 10.5501 s, 102 MB/s


=============================================================
Help taken from Blog Source: https://ryanclouser.com/2015/07/16/FreeNAS-9-3-iSCSI/
=============================================================

Comments

Post a Comment

Popular posts from this blog

Huawei - eNSP (Enterprise Network Simulation Platform)

Useful Websites & Forums (Non-IT)

Useful Websites & Forums (IT/Technical/Educational)

Internet Traffic Generators

Network/Telecom Vendors (National & International)

Cisco Simulator: Cisco IOS-On-UNIX (Cisco IOU)

Cisco IOS Collection