Configuring TrueNAS - Create a Data-Pool
Posted on August 16, 2024 • 5 min read • 878 wordsAfter TrueNAS itself has been installed, a data pool is first created, the layout of which has a significant influence on the performance of the network storage.
Serie TrueNAS
This is an article in the series TrueNAS - a NAS for your Homelab
TrueNAS is based internally on the ZFS file system, which is why the equivalent ZFS designations are often used in the context of TrueNAS (RAID 5 <-> RAID-Z1, RAID 6 <-> RAID-Z2). However, the idea of distributing data across different disks is the same.
Raid Level (1-VDEV) | Pro | Con | Main Usage |
---|---|---|---|
RAID-0 Striping | Usable capacity is the sum of all individual disk capacities, max. high read/write speed | no redundancy | Only use if data can be lost |
RAID-1 Mirroring | high read speed | lower write speed, total number of disks need to be even, usable capacity max. 50% | Use if max. concurrent read/write operationen and redundancy is needed |
RAID-Z1 Stripping, 1 Parity | 1 defect disk can be compensated, lower read/write speed increasing with number of disks | Usable capacity (number of disks minus 1) * smallest single-disk-capacity | Compromise between usable capacity/redundancy and speed |
RAID-Z2 Stripping, 2 Parity | 2 defect disks can be compensated, lower read/write speed increasing with number of disks | Usable capacity (number of disks minus 2) * smallest single-disk-capacity | Compromise between usable capacity/redundancy and speed |
RAID-Z3 Stripping, 3 Parity | 3 defect disks can be compensated, lower read/write speed increasing with number of disks | Usable capacity (number of disks minus 3) * smallest single-disk-capacity | Compromise between usable capacity/redundancy and speed |
Notes on read/write speeds
1 GBit networks
due to the cheap components, which can therefore move data at around 100 MB/s
. In this context, it makes perfect sense to favour the higher usable capacity of a RAID-Z1 or RAID-Z2 over the higher speed of a RAID-1 layout.ZFS L2ARC read cache
is added to the system. (see below definition of the pool layout, optional cache)From TrueNAS main dashboard you can access the storage management area via -> Storage
.
Click -> Storage -> Disks
to display the list of hard disks recognised in the system. There should now be some disks here that are not yet assigned to a pool (N/A
)
A new pool can be created using the Pool Creation Wizard (-> Storage -> Create Pool
), which guides you step by step or section by section through the creation process.
In General Info
section, enter a name for the pool to be created
The layout of the pool is defined in the Data
section. At the beginning of this article, I summarised the advantages and disadvantages of a selection of layouts in a table. In this example, a RAID 5 / RAID-Z1 is to be created from all four disks, so one disk can completely fail and all data will remain available.
1
, as all disks are already assignedyou can also assign disks manually
Layout: RAID-Z1
-> Manual Disk Selection
-> Add
VDEV
The required hard disks can now be dragged and dropped into the VDEV.
The result is the same as with keyboard input
-> Save Selection
In the LOG (Optional)
section, dedicated hard disks can be added as write cache
In the Spare (Optional)
section, hard disks can be added that immediately take over in the event of the failure of another pool disk
In the Cache (Optional)
section, dedicated hard disks can be added as ZFS L2ARC read-cache
In the section Metadata (Optional)
dedicated hard disks can be added to accelerate the Meta Data and Block IO
In the section Dedup (Optional)
dedicated hard disks for de-duplication tables can be added
The Review
section summarises the entries
-> Create Pool
to create a pool
Confirm that the contents of all hard drives will be deleted
-> Continue
The pool is then created
The pool has been created and the dashboard for this pool is displayed.
In Configuring TrueNAS - Create a Samba Share we’ll finally use the data pool to expose a Samba network share in our network.