Wednesday, April 20, 2011

[Guide] How to Create iSCSI Storage Disks in FreeNAS 0.8

Create iSCSI Storage Disks in FreeNAS 0.

FreeNAS is a great open source Operating System to make a physical or virtual computer as a full fledged network storage.  That could be easy for testing and learning purpose at your home or office testing lab. The latest version of FreeNAS is having totally different interface to manage and create iSCSI disks than earlier versions. This guide shows how to create iSCSI storage disks in FreeNAS 0.8 and connect from other hosts.

Sysprobs already covered a guide on how to install FreeNAS 0.8 on virtualbox as a virtual machine. This can be used to serve as a iSCSI server for the testing purpose on Network Access Storage (NAS), install Operating Systems in network drives, failover clustering and live migrations etc.

1) Download and install FreeNAS as explained in earlier guide.

2) You must add the second hard disk (or partition) to use as iSCSI storage disk. I have added one more virtual hard disk to my virtualbox virtual machine.

Create iSCSI Storage Disks in FreeNAS 0.

Here we will create two iSCSI disks ( each 4GB) from this 8GB added disk.

3) Add the volume as shown below.

Create iSCSI Storage Disks in FreeNAS 0.

Storage –> Add Volume –> Provide a volume name –> Select the disk you want to add to Volume pool –> File System.

Press Add Volume and make sure its listed in volumes list.

storage virtualization

For some reasons, my 8GB disk detected as 6.3GB only. So, we can create 2 iSCSI disks with 3GB size.

4) If you like you can change the ‘Target Global Base Name’ under iSCSI settings. Otherwise, leave with existing example name. I changed as below.

storage virtualization

5) Add portal in next step. You can leave the default or provide the IPv4 address of FreeNAS virtual machine. In my case it is 10.10.27.41, so I can add 10.10.27.41:3260 in portal filed, but I left if with default 0 values.

storage virtualization

6) Add the Authorized Initiator now. You can go with default option ‘ALL’, if more security is required then insert the particular network in Authorized network, like 10.10.27.0/24

nas on desktop virtualization software

7) Now we need to create Targets, Extends and match them in Associated Targets. We have to repeat the same steps for each iSCSI disks we are going to create.

Create a target first,

nas on desktop virtualization software

Do the same step again for second target, I gave the name ‘disk2’.

two targets

8.) Add extends now. ‘Path to the extend’ filed should contain mounted storage name (Created in Step 3) with extended name. I have allocated 3GB as below.

extend

Do it again for second extend because we are creating two iSCSI disks in FreeNAS 0.8. ‘extend2’ is my second name.

extend2

9) Go to ‘Associated Targets’ and match the targets and extends we have created earlier.

associated targets

Repeat the same step again for other targets and extends.

associated targets all

10) We are almost done, but the important part is still pending, which is enabling iSCSI service in FreeNAS 0.8, it was disabled by default. Go to ‘Services’ and Click on OFF to make it ON in iSCSI.

enable iscsi

Now your iSCSI storage disks in FreeNAS 0.8 is ready to connect from other hosts. Here are the connected iSCSI disks from my physical host Windows XP.

connected iscsi disks

If you are looking to make Windows 2008 R2 failover cluster by FreeNAS iSCSI disks, then I suggest to read the below guide.

Windows 2008 R2 Failover Cluster with FreeNAS

There are more guides available here at Sysprobs on FreeNAS, VMWare and VirtualBox.

Its really great to have a NAS (Network Access Storage) setup in testing or production environment without buying physical hardware and software.

I’m hoping the final release of FreeNAS 0.8 will not have major interface changes, therefore this guide will be suitable for final release too.

As usual, if this guide is useful and you face any issues on this method, feel free to drop a comment.

No comments:

Post a Comment