There are a million guides on setting up FreeNAS. This is yet another one of them. Your storage should always be on real hardware!  Note, any hard-drives/flash-drives used in this guide will be erased.  Make sure you have good backups of any data on them you wish to keep.

  1.  Download the ISO from https://www.freenas.org/download-freenas-release/ In this case I am using 11.3-U3.2
  2.  Burn the CD to a CD, USB, etc. If using something like iLO, just set it to network mount. Additionally, attach another USB key to your freenas server. We are going to be using it the root storage pool. FreeNAS does not allow you to use the drive it installs to for actual pool sharing, so loosing a full drive to the OS is just not the way to go. Have another spare USB ready, as later in the guide we will be mirroring the root pool for redundancy.
  3. Remove all other disks from the system. Just makes it easier overall.
  4. Insert your media into the storage server, and boot from is using whatever method your box support to boot from it.
  5. Select “1 Install/Upgrade” from the main menu
  6. Pick your install media. If you only have the one disk attached it should be obvious, if not use your best judgement
  7. Select “yes” from the next menu
  8. Enter a long complex password and pick “ok”
  9. Depending on your hardware, you need to pick uEFI or bios. This depends on your hardware. If its new go uEFI, if its older go bios. If after the install it wont boot… do it again and pick the other one!
  10. Wait for install to complete, and allow the system to reboot
  11. After your system boots up, insert another blank USB key (of the same size as the one you installed onto) into your server.
  12. In my case I use link-aggregation across multiple network cards so this config may be a little different from yours, but bear with me. Select “Configure Link Aggregation” from the menu
    1. Select “Create Link Aggregation”
    2. Select “lacp”
    3. Select the first interface attached to your main network
    4. Select your second interface
    5. Select “quit”
  13. Select “Configure Link Aggregation”
    1. Select “Create Link Aggregation”
    2. Select “lacp”
    3. Select the first interface attached to your data network
    4. Select your second interface
    5. Select “quit”
  14. Select “Configure Network Interfaces”
    1. Pick lagg0 (the main network)
    2. Pick “n” for deleting interface
    3. Pick “n” for remove current settings
    4. Pick “n” for configure with DHCP
    5. Pick “y” for configure with IPv4
    6. Put in a name to help you identify it, I left the default “lagg0”
    7. Put in your network information. In my case im using the 10.0.100.0/23 subnet, so I placed this server at 10.0.100.130/23
    8. I am not using IPv6, so select “n” for it
  15. Select “Configure Network Interfaces”
    1. Pick lagg1 (the data network)
    2. Pick “n” for deleting interface
    3. Pick “n” for remove current settings
    4. Pick “n” for configure with DHCP
    5. Pick “y” for configure with IPv4
    6. Put in a name to help you identify it, I left the default “lagg0”
    7. Put in your network information. In my case im using the 10.0.100.0/23 subnet, so I placed this server at 10.0.100.130/23
    8. I am not using IPv6, so select “n” for it
  16. At this point you should be able to access the web-ui via the address you configured. Log in with “root” and whatever password you set during setup.  The web-ui is needed for this point forward as FreeNAS does not save most CLI changes and they are lost on reboots
  17. From here navigate to “System” -> “Boot” From the “Actions” menu select “Boot Pool Status”
  18. Click the 3 dots at the end of the line next to the disk and pick “Attach”
  19. From the drop-down select the USB key. If you just have it attached, ther should only be one item. Make sure to check the “Use all disk space” option and click “Save”
  20. Navigate to “System” -> “Boot” From the “Actions” menu select “Boot Pool Status” It should now show the mirror (looking something like this)
  21. From the main bar on the top select the power button icon and pick “Shut Down” ; confirm the shutdown and click “Shut Down”
  22. Wait for your system to power down, and once it is, insert the main storage drives. After which power up the system and wait for the web-ui to be avaliable
  23. After logging in, navigate to “Storage” -> “Pools” and click the big “Add” button on the top.
    1. From the next menu select “Create new pool” and click “Create Pool”
    2. Give the pool a name. Normal default name is “Tank” but im going with Tohka for the rest of this guide
    3. There is an art/science to ZFS stripe sizes/layouts, but im going to ignore all that and go with what gets me the most space and makes expansion in the future easy. Since I have 16 SSD drives to add, I am going to select the first 8 and press the “->” button to add them to the vdev. From the drop-down under the “Data VDevs” selection, set the raid level to “Raid-z” It should look something like this:
    4. Next click the “Add Data” button along the bottom, and repeat the selection/raid level. Make sure to click the second “->” button of you will add the drive to the original stripe. In my case I have some slightly different disk sizes so I need to select the “Force” button at the bottom. This is NOT best practice but its what I had, and im not loosing 6 SSDs simply due to a 30Gb difference. When complete, your setup should look like:
    5. Click “Create” and wait for it to complete. This takes roughly long enough for you think something has gone wrong and start to look for it to complete.
  24. From the next menu, click the three buttons to the right of your new pool select “Add zVol”
    1. Add a descriptive name and comment. In my case I went with “ESX iSCSI”
    2. Give it a size, since I plan to use the disk for other things, I went with “4TiB”
    3. Select “Spare” as we will be making heavy use of thin provisioning
    4. I left everything else at it default settings, but turned Dedup on. (This option tends to lead to a holy war among ZFS users, but I have more than enough ram and since its going to be VM storage the saving are real)
    5. Click “Save”
  25. Click the three buttons to the right of your pool (Not the zvol we just created) and pick “Add Dataset”
    1. Set a name of “Service-Backups”
    2. Click “Advanced Mode”
    3. Under the “This Dataset and Child Datasets” set a quota of 1TiB. Everything else can be left as default. We are not de-duping on this volume as 99% of what will live on it is going to be tarballs and they don’t dedupe worth a damn.
    4. Click “Save”
  26. Click the three buttons to the right of the “Service-Backups” dataset and click “Add Dataset”
    1. Set the name of “Chef”
    2. Click “Advanced Mode”
    3. Set a quota of “50 GiB”
    4. Click create.
  27. Repeat step 26 for volumes with name/size
    1. “GitLab/500GiB”
    2. “Jira/250G”
    3. “vCenter/250G”
  28. At this point your Service-Backups dataset should look something like this. (Note, I have existing data, so your sizes will look slightly different)
  29. Navigate to “Services”
    1. click the “Running” slider next to “iSCSI” and “NFS”
    2. click the “Start Automatically” checkbox next to “iSCSI” and “NFS”
  30. Navigate to “Sharing” -> “NFS” and click the “Add” button on the top.
    1. For the path you can navigate to the folder, or just paste in “/mnt/Tohka/Service-Backups/vCenter”
    2. Click “Advanced Mode”
    3. Set the “Authorized Hosts and IP Addresses” to be whatever you plan to use as an IP for your vCenter instance.
    4. Set the Maproot User to “root”
    5. Set the Maproot Group to “wheel”
    6. Click Save
  31. Create more shares for the other Service-Backup volumes that were setup earlier, changing the path/host accordingly.
  32. Navigate to “Sharing” -> “Block Share (iSCSI)”
    1. Select the “Portals” menu and click “Add”
    2. Set the “Discovery Auth Method” to “CHAP”
    3. Set the “IP Address” to the storage net address you set on initial install, in my case 10.0.210.130
    4. Click “Save”
    5. Select “Authorized Access” and click “Add”
    6. Set a user name of “vcenter”
    7. Set a secret. Ideally a long random password. Totally don’t make it “Password101”
    8. Click “Save”
    9. Select “Targets” and click “Add”
    10. Set a target name of “vcenter”
    11. Set a “Portal Group ID” of 1, an “Initiator Group ID” of 1, an “Auth Method” of CHAP, and an “Authentication Group Number” of 1
    12. Click “Save”
    13. Select “Extents” and click “Add”
    14. Set an “Extent Name” of “vCenter – SSD”
    15. Set an “Extent Type” of “Device” and pick the volume we created. (Tohka/ESX iSCSI)
    16. Set the “Avaliable Space Threshold” to “80” and make sure “Enabled” is checked
    17. Click “Save”
    18. Select “Associated Targets” and click “Add”
    19. Set a “Target” of “vcenter”, a LUN ID of 1, and an “Extent” of “vCenter – SSD”
    20. Click “Save”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>