FreeNas 9.x on a Dell Server with PERC controller as an iSCSI device.

So you have an old Dell PowerEdge 2900 Server laying around with a few hard drives and your thinking I would really like to use this equipment as a NAS drive.  It could happen, in our case it did.  There were some stumbling blocks on the way though.  Here is how we got through them…

The goals we wanted to accomplish were creating a RAID5 array of 8 (7+1 Hot Spare) 1TB hard drives and then wanted to connect this FreeNas volume through and iSCSI channel to a file server that will present the NAS as a shared folder all of our servers could use.

We quickly found that using the factory PERC (PowerEdge RAID Controller) to create a RAID 5 Array was not going to work.  Mostly because the drivers for this device provided in FreeNas are not very stable.  Sometimes the system would boot, other times it would just hang during start up.  We found that there other drivers available for FreeBSD that some folks have had success with but we still came across some comments that made us question them.  So we opted to let FreeNas do the work instead.

FreeNas has the ability to create RAID arrays in the form of ZFS Volumes.  We chose to do a RAID 5 or ZFS1 volume.  Before you say it, we know that a ZFS2 or ZFS3 provide better redundancy.  Frankly, this NAS drive is going to be as a Backup storage unit and is not as critical as using it as a storage drive for a VM Server like Hyper-V or ESXi, therefore additional redundancy is not an issue for us. The steps that follow are not specific to the type of ZFS volume you will create, they just give the general instruction to create a ZFS volume and zvol device needed to create the iSCSI extents.

Here are the steps to create the FreeNas Server:

  1. Disable PERC controller in BIOS
  2. Load Freenas
  3. Edit Loader.conf to allow PERC driver to load
    1. choose option 9 “shell”
    2. Set file system into writeable mode “mount -rw /dev/ufs/FreeNASs1a” (or whatever the device is called)
    3. nano /boot/loader.conf
      add mfi_load=”YES” to /boot/loader.conf
  4. Enable PERC controller in BIOS
  5. Boot into PERC Controller BIOS – CTL+R
    1. Create Virtual Disks – Each Drive as an individual RAID0
  6. Reboot
  7. Configure FREENAS
    1. Login to web interface
    2. Set Root Password
    3. Setup Hostname – System Information > Hostname > Edit
    4. Configure Network
      1. Network > Interfaces > Add Interface
        1. Name NIC’s and Set IP address
      2. Network > Global Configuration
        1. Set Gateway
        2. Set DNS Servers
    5. Configure Storage
      1. Storage > ZFS Volume Manager –
        1. Create ZFS Volume
        2. Create zVol
      2. Configure iSCSI
        1. Services > iSCSI
          1. Extents > add Extent
            1. Name = Whatever
            2. Extent Type = Device
            3. Device = zVol you created
            4. Comment = Whatever
          2. Initiators > Add > use defaults and save
          3. Portals > Add > use defaults or choose IP, either will work
          4. Target > Add Target
            1. Name
            2. Set Portal ID
            3. Set Initiator Group ID
            4. Auth = None
            5. Authentication Group Number = None
          5. Target / Extents – associate Target to the Extent
            1. Lun ID: Auto
            2. Target – Match to the target you just created
            3. Extent – Match to the extent you just created
        1. Turn On iSCSI service


Some Caveats:

  1. FreeNas does not have the ability to automatically switch to the spare drive using this configuration.  If a drive fails, it must be manually changed.
  2. If a drive is physically removed, the PERC will drop it from the configuration.  It will be necessary to recreate the new virtual drive in the PERC BIOS.  Otherwise FreeNas will never see the new drive.