Configure iSCSI connection on FreeNAS

In continuation from previous post (Installing FreeNAS on VirtualBox), I will setup the additional storage earlier added and configure FreeNAS for iSCSI target.

Note: You need a windows machine to access the FreeNAS admin page via a web browser

– Log onto a windows machine on the network and browse the FreeNAS VM IP Address (http://). Enter the username and password used in previous post

FreeNAS

– Next is to configure the additional storage and make it available for clustering. First expand Storage >Volumes and click on Volume Manager. From the Volume Manager screen enter the volume name, select the desired storage if more than one, select ZFS and click on Add Volume

FreeNAS

– Next is to enable iSCSI. Click on Services at the top and click the iSCSI to enable it

FreeNAS

– Now expand Services >iSCSI >Portals and click on Add Portal. Enter details, select 0.0.0.0 under IP Address so it listens on all IPs, leave default port and click OK

FreeNAS

– Next expand Services >iSCSI > Initiators and click Add Initiator. Leave default and click OK

FreeNAS

– To control iSCSI access, create a user by expanding Services > iSCSI > Authorized Accesses and click on Add Authorized Access. Enter the login details and save

FreeNAS

– Next we setup the Target by expanding Services > iSCSI > Targets and click on Add Target. Enter and select details as shown below then save changes

FreeNAS

– Next expand  Services > iSCSI > Device Extents and click Add Extent. Enter name, comment and select the desired volume

FreeNAS

– Next expand Services > iSCSI > Targets / Extents and click on Add Target / Extent. Select the Target and map to associated extent and save

FreeNAS

– To conclude the configuration, expand Services > iSCSI > Target Global Configuration. Update the Base Name, Auth Method and Auth Group or leave as default (Care should be taken when updating the Base Name)

FreeNAS

We are done with the configuration of FreeNAS iSCSI target. In next is to connect a Windows machine to the storage via iSCSI initiator client.

– Log onto a Windows Server 2008 or 2008R2 machine, go to control panel and click on iSCSI Initiator

iSCSI

– Click Yes to start the iSCSI service

iSCSI

– Click Discovery Tab > Discover Portal…, enter IP Address of your FreeNAS server and leave port as default

iSCSI

– Click Advanced…, check the box ‘Enable CHAP log on‘, enter the username (This should be username configured under Authorized Access in FreeNAS) and enter the secret password used. Click OK to close the screens

iSCSI

Note: if you notice the following error below ‘CHAP secret given does not conform to the standard…,’ this is an indication that you have either entered the username and password as same or password xter length is less than 12. So to fix this go back to your FreeNAS portal and change the password for the account configured in Authorized Access to meet this requirement.

iSCSI

– When you have successfully discovered the Target, next click on Targets tab, you will notice list of discovered targets. Click on the target and click Connect. The Connect To Target screen will appear

iSCSI

– Since we enabled CHAP authentication for Target, click on Advanced, check the box ‘Enable CHAP log on’, enter the username and password selected when you configured the Initiator group ID. Click OK to close screens

iSCSI

– You should now be connected to the Target

iSCSI

– Go to Volumes and Devices tab and click on Auto Configure, all associated disks with target will be discovered and displayed here. Click OK

iSCSI

– From Server Manager, click on Storage > Disk Management and the new disk should appear in the list. At this stage, the disk is now yours to play with, initialize and format as you like 🙂

iSCSI

 
comments powered by Disqus