Skip to content

iscsi

How to Create an iSCSI Target & Extent / Share on FreeNAS 9 (and previous versions)

Today, I’m going to guide you through the process of creating an iSCSI target / extent on FreeNAS-9. This will also work on previous versions of FreeNAS, such as version 7 and 8. There are a few different ways you can go about creating an iSCSI share. You can dedicate an entire device (Hard drive, or RAID array) to the iSCSI share, or you can simply create a Volume, and create multiple iSCSI shares and each is simply a file on the volume. This approach works well because you can use part of a volume as an NFS share, part of it as a CIFS share for Windows, and if you want a few separate iSCSI targets you can just create a single file for each. Lets get started.

How to create an iSCSI Target / Share on FreeNAS

 

First, we need to add a volume using your hard drive or RAID array that is connected to your FreeNAS server. If you have already done this, you can skip this step.  Let’s get started with the rest.

Log into your FreeNAS web interface, and go to Storage > Volumes > Volume Manager.  Fill in a volume name (make sure it starts with a letter, and NOT a number, otherwise you will get an error).  Add one or more of your Available Disks (by clicking the + sign).  Select a RAID type if you wish to do so.  In my case, I’m using hardware RAID, so I will leave the default (single drive stripe, IE, JBOD).  Now click Add Volume.

 

freenas-1

 

Now that we have added a volume, we can begin the process of creating an iSCSI share.  This process required multiple steps, in the following order:

  1. Add a Portal
  2. Add an Initiator
  3. Add a Target
  4. Create an Extent (the file that corrasponds to the iSCSI share)
  5. Link the Target and the Extent together
  6. Start the iSCSI service

Click Here to Continue Reading!

Need to recover a FreeNAS server? How to import an existing FreeNAS iSCSI target that existed on a prior installation

Last night I noticed a new version of FreeNAS 9.3 was released. Just two days earlier I built this FreeNAS server, so I wanted everything to be up to date. When I tried to update FreeNAS via the web GUI, it errored out. As I came to find out, this was one of the bugs addressed in the update I was trying to install. It was a catch-22. So, I downloaded the installation disc, burnt it to CD, and booted the FreeNAS server from it. That errored out as well. I had no choice but to blow away the existing installation and do a fresh FreeNAS load. All of my shares and iSCSI targets were stored on a 4 disk RAID-Z array, and FreeNAS itself is installed on an 8GB USB Thumb drive. So, I expected my data to stay in tact.

When I booted the fresh installation for the first time, it automatically imported the zpool stored on the RAID array. I was able to re-create the SMB shares and point them to the /mnt folders those shares pointed to before, everything was going well. Until I got to work trying to bring my iSCSI target volumes back online. In Storage > Volumes, I could see all of the volumes that matched up with my previous ISCSI targets, but I couldn’t import them. I couldn’t figure out how to do anything with them. All of my virtual machines were stored on these volumes so I was desperate to find a solution. I did.

Have you lost your FreeNAS installation? Just recovered from a catastrophe? Recently reinstalled FreeNAS and need to get your iSCSI and other shares back? Going through a FreeNAS recovery? You’ve come to the right place.

How to import an iSCSI target volume from an old FreeNAS installation

First, let’s make sure the volumes that previously correlated to iSCSI targets are visible. Navigate to Storage > View Volumes. Here is what mine looks like.

Screen Shot 2015-05-27 at 3.08.37 PM

Click Here To Read The Rest Of This Post!

How To Add An iSCSI Target To Proxmox VE 3.4 And Create LVM Group

I’ve been digging into Proxmox VE 3.4 quite a bit lately. I have a FreeNAS server on my network that I use for VM storage in my lab. When I went to add an iSCSI target on Proxmox for virtual machine and image storage, it was a bit confusing. So, I thought I would put a quick step by step guide together to help other folks in the same boat. Here goes.

How to add an iSCSI target in Proxmox

First, log into your Proxmox VE 3.4 server via the web interface. Make sure Datacenter (top level) is selected in the left pane, and make sure you are on the Storage tab on the right pane. It should look like this.

Screen Shot 2015-05-23 at 9.08.23 PM

Now, click on the Add pull down menu, and select iSCSI.

Screen Shot 2015-05-23 at 9.10.31 PM

Click Here To Read The Rest!