Tag Archive : FreeNAS

/ FreeNAS

Yesterday a security advisory was announced for vulnerability in SAMBA. Read more at ZDNet.

Today FreeNAS released version 8.0.4-p1, which contains a patch to fix the SAMBA vulnerability.  In the release notes, FreeNAS states that all versions prior to this one may be affected by this critical SAMBA vulnerability.   If you're running an earlier version of FreeNAS, it is important that you upgrade to this release ASAP.  

Download FreeNAS 8.0.4-p1 32 bit here.

Download FreeNAS 8.0.4-p1 64 bit here.

Download Upgrades from here.

How To: Install FreeNAS 8 to a USB key.

September 22, 2011 | Uncategorized | No Comments

Installing FreeNAS to a USB key is the preferred method when setting up a FreeNAS system.   The installer even makes a point of telling you this.  Booting from a USB key is becoming quite popular.  In fact, many modern servers come with an internal USB port, designed specifically for plugging a USB key containing an operating system into it.  This allows you to design a FreeNAS based storage system around a chassis with more hard drive bays for maximum storage.

There are several ways to go about installing FreeNAS to a USB key, some of them can seem quite complicated, especially if you’ve never done it before.   Others may only work on one Operating System, or another, and some may require hardware you don’t have handy.  I’m going to show you and easy method that is platform independent (i.e. works on Windows, Linux, or MAC).  You don’t even need an optical drive to do it!

You will need:

*I’m using VMware Workstation 8 for this tutorial.  The steps are pretty much the same on earlier versions of Workstation, as well as on Player and Fusion.

**Make sure you have the right image for the hardware you’ll be using the USB key on.

***8 GB is the smallest size of USB key that a lot of places carry these days.  I found these great little PNY Attache Micro Sleek 8 GB USB keys at Best Buy for $12 each.  Most USB keys of this size are in the $9 to $15 range.  I like these because of their compact size.

Step 1: Setup a Virtual Machine for the install.

Open Workstation, Player, or Fusion, and start the “New Virtual Machine WIzard” (hit “CTRL+N” from the home screen).

Click “Next”.

The hardware compatibility level really isn’t important for what we’re doing, so accepting the default is fine here, click “Next”.

Browse to and select the .iso for your FreeNAS installer, then click “Next”.

Select “Other” and either “FreeBSD” if you’ll be installing 32-Bit FreeNAS 8, or “FreeBSD 64-Bit” if you’ll be installing FreeNAS 8 64-bit, then click “Next”.

Give the VM a name, and click “Next”.


These next 8 screens really aren’t important for what we’re doing, we’ll be removing most of what they create in the next step, so just accept the defaults and click “Next” on each one.

Make sure that “Power on this virtual machine after creation” is NOT checked and click “Finish”.


Step 2: Remove hardware from Virtual Machine.

We want it to detect the hardware on physical machine we’ll be using the USB key on, so lets remove as much of the virtual hardware as possible to avoid any issues.

Remove the Hard Disk, Floppy, Network Adapter, and Sound card.

After you’ve removed everything it should look like the screen shot above, click “Ok”.


Step 3: Install FreeNAS 8.

Now we can power on the VM.

When the VM powers up, you’ll need to connect the USB key to it.  The PNY USB Key I’m using shows up as a “Freiya Removable Disk”.

You may see a bunch of text like in the screen shot above when you attach the USB key. It’s nothing to be worried about, it’s just telling you that it detected it.  Select #1 and hit “Enter”.

The USB key should be your only choice of destination media, hit “Enter”.

Hit “Y” for Yes.

It will take approximately 5 minutes to install, the progress will be shown at the bottom of the screen as in the screen shot above.

You’ll see this screen when the installation is done, hit “Enter”.

Select #4 and hit “Enter” to shutdown the VM.


That’s it!  You can now plug the USB key into your physical storage system and power it on.  You’ll want to have monitor plugged in when you do so you can see what DHCP address it picks up.

If your storage system is headless (i.e. no video capabilities), you can boot FreeNAS from the USB key inside the VM you created to install it, and configure a static IP prior to transferring the USB key over.   That way you will know exactly what IP to connect to for the web interface. To do so, you will need a boot manager .iso, like Plop.


For Part 4 of the "Budget Laboratory" series, we're going to connect the ESXi 4.1 server we installed in Part 3, to the Virtual SAN we created using FreeNAS 8 in Part 2, using the vSphere client.

*If you haven't already, open the IP you've configured for your ESXi server in a web browser to download and install the vSphere client.

Step 1: Open vSphere and login to your ESXi server.

Enter the username and password for your ESXi server, then click "Login".


We aren't worried about SSL certificates for a lab environment, so we can just click "Ignore".
Note: For a production environment, you should obtain a valid SSL cert from a trusted Root Certificate Authority.


Click "OK".
Note: ESXi 4.1 is fully featured for 60 days. After that you need to enter a license key to continue using the free version. You should have received a license key via e-mail from VMWare when you registered to download ESXi 4.1. If you want to learn how to use the features that are only available in the paid version, you should use the evaluation mode for the duration of the trail, before switching over to the free version.

Step 2: Configure the Storage Adapter

Click the "Configuration" tab.
Click "Storage Adapters".
Select the iSCSI Software Adapter.
Click "Properties".


Click "Configure…".


Check the "Enabled" box, then click "OK".


Click the "Dynamic Discovery" tab, then click "Add…"


Type in the IP address of your iSCSI SAN, thenc lick "CHAP…"
Note: If you followed Part 2 of this series, the default port number should be the same as shown in the screen shot above. Otherwise enter the correct port number for your iSCSI SAN here as well.


Uncheck the "Inherit from parent" box.
Select "Use CHAP" from the "Select option:" drop down box.
Enter the name and secret, then click "OK".
Note: If you followed Part 2 of this series, this should match what you set in the "Add iSCSI User" box. If your iSCSI SAN is configured to use a different authentication method, or does not use authentication, you should configure this accordingly.


Click "Yes" to rescan the HBA.


You should now see any available disks from your SAN, as shown in the screenshot above.
Note: If you followed Part 2 of this series and do not see anything after rescanning the drives, make sure the iSCSI service is running on FreeNAS, and that you did not miss any steps. If it is running, you can try turning the service off and then back on again. Then go back to vSphere and click "Rescan All…". If you still do not see anything here, verify the network settings are correct on both your FreeNAS VM and your ESXi VM. Make sure they can communicate with each other over the network.

Step 3: Add Storage
Now that the connection has been established to our SAN, we can add the storage.

Click "Storage" then "Add Storage…"


Select "Disk/LUN" then click "Next".


Select the disk you want to use, then click "Next".


We're going to use this whole drive, that's why we created it, and it is the only option available to us, so just click "Next".


Here we can name our datastore. We'll be using this one just to store the virtual drives that will contain the OS for our VMs, so I called mine "OS". Give yours a name, and click "Next".


Here you can change the block size used when formatting the drive. Since we aren't using a very big drive for this lab, I just left the default. Click "Next".


Click "Finish".


That's it! Our ESXi server is now using storage on our SAN.

In Part 5 of this series, I'll show you how to create OS templates that will allow you to quickly deploy VMs on your ESXi server.

Storage Area Networks (SANs) are used in most Enterprise class networks, you’ll also find them at a lot of small and medium businesses. A lot of systems rely on SANs to provide high availability features. A SAN is great to have for setting up shared storage for any type of cluster. Fiber used to be dominant for SAN connectivity. You’d need Fiber Host Bus Adapters (HBAs) in every server you wanted attached to your SAN, and a Fiber switch to connect everything. Then came iSCSI, which works with much cheaper Network Interface Cards (NICs), and can use regular network switches, as well us much cheaper copper cables. At first iSCSI wasn’t as fast as Fiber, topping out at gigabit speeds, so if speed was important, you’d stick with Fiber. Now with 10Gigabit Ethernet being readily available, you can get iSCSI SANs that are both cost effective and high performance.

A full blown hardware SAN is still very expensive, so you’re probably not going to buy one for a Lab. Luckily there are a few ways you can create Virtual SANs for FREE! For Part 2 of my Budget Laboratory series, I’m going to show you how to create an iSCSI Virtual SAN with FreeNAS 8. FreeNAS is another great open source product based on FreeBSD.

This portion of the lab build can be done at absolutely no cost, assuming you already have the required hardware.

*If you followed Part 1 of this series, you should already have VMWare Workstation, which has a free trial, and you will need to use it. VMWare Player is completely free, you should be able to setup your Virtual SAN using it if you so choose, however I’m using VMWare Workstation for the creation of this article.

**I’m using the 64-bit version for this article.

Step 1: Create a Virtual Machine for your Virtual SAN
If you haven’t already, open VMWare Workstation.




From the “Home” screen, click the “New Virtual Machine” button, or hit “CTRL+N”.





Select “Custom (advanced)” and click “Next”.





Accept the defaults and click “Next”.





Select “Installer disc image file (iso):”, browse to the location where you saved your FreeNAS .iso at, then click “Next”.





Select “Other”, then select “FreeBSD 64-Bit” from the drop down list, then click “Next”





Give your VM a name, then click “Next”.





Accept the defaults for the CPU and click “Next”.





Accept the defaults for RAM and click “Next”.
UPDATE: The recommended minimum RAM for FreeNAS 8 is 512MB, so you should probably change your RAM to 512MB here. However, I have been running it with 256MB without issues. You can always increase the RAM on your VM later.





We’ll be changing the Network settings later, so this page doesn’t matter, click “Next”.





Accept the defaults for I/O Controller types, and click “Next”.





Select “Create a new virtual disk”, then click “Next”.





Select “SCSI”, then click “Next”.





Accept the defaults of 8 GB and “Store virtual disk as a single file”, then click Next.





Accept the default and click “Next”.





Make sure “Power on this virtual machine after creation” is NOT checked, and click “Finish”.





BEFORE powering on the Virtual Machine, we need to edit the hardware settings. Click the “Edit virtual machine settings” link on your FreeNAS Virtual SAN Virtual Machine, or hit “CTRL+D”.





If you followed Part 1 of this series, you’ll need to select “Network Adapter”, then select “Custom: Specific virtual network”, and choose the VMNet that is bridged to the LAN side of your network. For me this is VMNet3. Otherwise you can just choose “Bridged: Connected directly to the physical network”.
After that we need to add another “Hard Disk”, click the “Add…” button.





Select “Hard Disk” and click “Next”.





Select “Create a new virtual disk” and click “Next”.





Select “SCSI” and click “Next”.





Set the “Maximum disk size (GB):” to 300, select “Store virtual disk as a single file”, and click “Next”.
Note: Originally I used ten 30GB drives to sort of mimic a physical disk array. Since the virtual drives are all stored on the same physical drive, there’s no real benefit to doing it that way. So in the interest of keeping things simple, a single 300GB drive works fine. If you were going to setup a Virtual SAN for any sort of production use, you’d want to give the VM direct access to several physical drives.





Accept the default and click “Next”.

Click “OK” on the Virtual Machine Settings page.

Your Virtual Machine is now ready to power on.

Step 2: Install FreeNAS.
Power on the Virtual Machine.





Hit 1 to start the install.





Select the 8 GB drive as the destination, then hit “Enter”.





Hit “Y” to continue.





The installation completes, hit “Enter” to continue.





Hit 3 to Reboot.





When FreeNAS boots, hit 1 to configure the network, then 1 to select the interface, n, then y, give the interface a name, enter a static IP. Hit “n” for “Configure IPv6”.

Step 3: Configure FreeNAS through the web interface.
Open a web browser and browse to the IP you assigned to your FreeNAS Virtual Machine in Step 2.




You’ll see a flashing “Alert” in the upper right corner letting you know that you need to set a password, so lets take care of that first. Expand “My Account”.





Click the “Change Password” link, set and confirm a password, then click “Change Admin Password”.

Next we need to create a volume. Click the “Storage” icon at the top of the page.




Give the volume a name, I named my “SAN1”. Check the disk, and select “ZFS” as the “Filesystem type” then click “Add Volume”.
Note: If you used multiple drives, you’d have a few more options here. Depending on the number of drives selected, different RAID types would become available. With ZFS you’d see RAID-Z and RAID-Z2. For more information on RAID-Z, check out Jeff Bonwick’s blog post over at Oracle. Jeff Bonwick is the inventor of RAID-Z. For more information on RAID-Z2, check out Adam Leventhal’s blog post over at Oracle.

Next we need to create a ZFS Volume, click on the “Create ZFS Volume” button from the Storage page.




I named this volume “ESXi” since we will be using it for an iSCSI LUN to be attached to ESXi in a later lesson. We’ll make the size 150GB by putting “150G” as the size. The rest of of the space will be used in later lessons. Click “Add ZFS Volume” when you are done.
Note: ZFS is a file system with a lot of cool features that started in Solaris. Solaris, like the FreeBSD that FreeNAS is based on, is a flavor of Unix. For more information on ZFS, check out the ZFS page at opensolaris.org.

Next we need to turn the iSCSI service on.




Click the “Services” button at the top of the page, then click the switch next to “iSCSI” to turn the service on.

Now lets configure iSCSI. We’ll start by setting up Authentication, so we can have a little security for our Virtual SAN.




Expand “ISCSI” click “Target Global Configuration” then click “Authentication”, then click “Add iSCSI User”





I used “vsan” as my User, you can call it whatever you want, just remember what it is. Set and confirm a “Secret”, you can leave the bottom 3 fields blank, and click “OK”.

Next we need to create a Portal.




Select “Portals”, then click “Add Portal”





Here we can just accept the default and click OK. This means it will listen on port 3260 on all IPs for this portal.

Next we need to create a device extent.




Click “Device Extents” then “Add Extent”





Give the Extent a name, I named mine “ESXi”, because we’ll be assigning this LUN to ESXi in a later lesson. Select “SAN1/ESXI (150G)” (or whatever you named your ZFS volume earlier) from the drop down for “Disk device” then click “OK”.

Now we’ll setup the Target Global Configuration.




Click “Target Global Configuration”, change the base name if desired (I just changed example.org to fixtheexchange.com for mine), select “CHAP” from the drop down for the “Discovery Auth Method”, and “1” as the “Discovery Auth Group”. Everything else can be kept as-is. Click “Save”.

The last thing we need to do is add a target.




Click “Targets” then “Add Target”.





Give your target a name, and an alias. Again, I used ESXi here because that is what this LUN will be used for later on.
Select “Disk” from the drop down for “Type”.
Select “1” from the drop down for “Portal Group ID”.
Select “1” from the drop down for “Initiator Group ID”.
Select “1” from the drop down for “Authentication Group number”.
Click “OK”.

The last thing we need to do is add the Extent to the Target.




Click “Associated Targets.”
Click “Add Extent to Target”.
Select the Target you created earlier in the “Target” drop down.
Select the Extent you created earlier in the “Extent” drop down.
Click “OK”.

That’s it! Your Virtual SAN has been configured. We now have an iSCSI LUN that we will use with ESXi in a later lesson. In Part 3 of the “Budget Laboratory” series, we’ll be installing VMware ESXi 4.1 inside of VMware Workstation 7.