In this post we will add disks to the FreeNAS server and configure them in to a zPool. For this post we will use a ZFS equivalent of a RAID 10 but I will demonstrate all the other RAID options.
Go to Storage and Disks to see a list of disks.
This is not very helpful because it tells me the logical disk name but not the physical port.
As my physical FreeNAS server is an old tower system I need to know what disk in FreeNAS maps to which physical port. After all it would be very embarrassing to put out the wrong disk.
On each disk, click the > on the right; this expands the disk information and gives you the option to add a description. Once done click the COLUMNS button and select Descriptions.
Now my OCD is a little happier.
So that’s the disks setup. Now we need to use those disks to create a zPool.
Click on Storage and then Pools.
Click the ADD button and the new pool window pops up.
Select Create new pool and click the CREATE POOL button.
At the disk window, name the pool, add the disks and select what RAID type.
For now select all the disks and click the arrow button to move them to the vDev window on the right hand side of the screen.
The default RAID type is a Stripe (RAID 0). The 4 x 10GB disks will make a 32GB vDev. FreeNAS allocates 20% of each disk for itself.
Click on Stripe (just above the Estimated raw capacity) to change the RAID type
RAID types are
- Raid-z (RAID5) we get 3 disks (minus 20%) with one disk as parity
- Raid-z2 (RAID6) we get 2 disks (minus 20%) with two disks as parity
- Mirror (RAID1) we get 1 disk (minus 20%) with 3 disks as mirrors
- Stripe (RAID0) we get 4 disks (minus 20%) with no redundancy
To create a RAID10 we create a 2 disk mirror (vDev) and then add 2 disks to it (another vDev).
Remove 2 of the disks so we only have 2 disks in the vDev and Select Mirror as the RAID type.
Then click CREATE
Tick Confirm and click CREATE POOL
The Pool is now displayed in the list of active pools.
Click the Cog on the right of the pool and a drop down menu will appear.
Click Extend.
We are now back at the Pool config. Select the 2 disks on the left and click the arrow to move them over to the right.
The disks are going to form a new Mirror vDev. Click EXTEND.
Tick the Confirm option and click EXTEND POOL
Once back at the Pool list click on the Cog and select status to see the disk layout of the Pool.
With the Pool configured we now need to split it up into “chunks” we can share out. There are things we can do to segment a pool.
Dataset
A Dataset is much like a folder, in that a Dataset can have a Dataset or Zvol inside it; it can have a size/quota assigned and be thick/thinly provisioned. A Dataset is used for NAS storage (NFS and SMB)
Zvol
A Zvol is the ZFS equivalent to a LUN; a Zvol is basically a “file” used for block storage and can be thick/thinly provisioned.
Note that Datasets and Zvols inherit their settings from their parent but can also be individually set.
To create a Dataset click the 3 dots on the right of the Pool and select Add Dataset
The basic Dataset settings are shown.
Name the dataset
Most of the settings will be inherited from the Dataset’s parent. If any settings are changed, those settings will be inherited by any child Dataset or Zvol.
Note: always disable deduplication unless you have a lot of RAM
Clicking on ADVANCED MODE will give more options like size limits but for now just name the Dataset and click SAVE.
Now back at the Pool we can see the Dataset within Pool1. Click on the Dataset and click the 3 dots on the right.
Select Add Zvol
The create Zvol window pops up and we name the Zvol and set a size.
The Sync setting is very important here. For iSCSI it should be set to Always. This means the write acknowledgement is sent back to the client only after the data has been written to disk.
Tick Sparse, This is the ZFS equivalent of thin provisioning.
Click SAVE
Back at the Pool list we can see the Dataset and Zvol
The Zvol is now set up and ready.
All posts in this series
FreeNas build and setup
1, Install from CD
2, IP setup
3, Basic config
4, Data NIC
5, Disks and pools (this post)
6, iSCSI setup