#
Pools & Datasets
#
Pools
The most common pool name is tank
. It's also the name you will find in most TrueNAS tutorials on the internet. Personally I name the pools after North Gods (vidar
, odin
, loki
,...). This is also what is used in this documentation.
Although you are relatively free, you should ensure that the chosen name conforms to the naming conventions of ZFS.
First we create the pool for all apps on our server. Go to
Storage
->
Create Pool
, enter odin
as pool name, and select the desired disks (here we use the two NVMe SSDs for that).
Check that the correct disks are added and the layout is Mirror
. Create the pool and confirm the warning message.
Creating a pool overwrites all data on the selected disks!
Next, create the pool loki
for our media. We will encrypt this pool by default, therefore additionally select the encryption option.
Check that the correct disks are added and the layout is Raid-z2
. This layout means that two disks can fail at the same time without dataloss. When everything fits, create the pool and confirm the message.
Note that rebuilding a RAID array in the event of a disk failure is a heavy process. If you select Raid-z1
and another disk fails during resilvering, all data on the affected pool is lost!
Because Kubernetes will create system-relevant datasets on our pool odin
, and these datasets can - by design - not be encrypted. If you set the option anyways, TrueNAS will raise warnings that the default encryption is broken.
To not confuse users, it's possible that iXsystems will hide this notification in the future. But the problem remains: even if you set default encryption, some datasets would not be encrypted. And that is not the expected behavior.
#
Datasets
Because we use some settings for all datasets on the pool loki
, we will first edit the default options for the datasets. If you don't want to edit the defaults, you can skip the next step and set the options individually when creating a dataset. Go to
Datasets
->
loki
->
Dataset Details
->
Edit
and adjust the following two values.
Name and Options
Compression level:
Off
Exec:
Off
I don't need compression, as my media is already compressed. And the pool is only used for storage, therefore I disabled the exec option.
Now create all the datasets we need, beginning with the dataset video-movies
. You can do it under
Datasets
->
loki
->
Add Dataset
Name and Options
Name:
video-movies
Other Options
Record Size:
1M
ACL Type:
SMB/NFSv4
Share Type:
SMB
As we store almost entirely large video files in this dataset, we set the record size to 1M for optimization.
Repeat this step and create another dataset video-series
with the same settings.
To keep your setup simple, it's absolutely fine to use shorter dataset names like movies
and series
. Naming it video-movies
and video-series
is just a personal preference, as I additionally create audio-lossless
and audio-lossy
for my music collection.
#
Permissions
Edit the permissions for the created datasets as follows and confirm the changes with Save Access Control List
:
Remove the defalt group builtin_users
Add the group media-writers
with write permission
Add the group render
with read permission
When you edit the permissions and there are already files or folders in the dataset, don't forget to set Apply permissions recursively
. Otherwise you may not see all files/folders or get permission denied errors.
#
Shares
The media is downloaded on another machine and then just copied to the server. For this, we create an SMB share under Shares -> Windows SMB Shares -> Add with these settings:
Basic
Path:
/mnt/loki/video-movies
Name:
movies
Purpose:
SMB WORM
We enabled
SMB WORM
for this share to prevent accidental file moves or deletions. Just selectNo preset
orDefault share parameters
if you don't want that.
Access
Browseable to Network Clients:
Uncheck
This is just for security reasons (hardening). You can also leave the default value.
If this is the first SMB share you create on the system, TrueNAS will prompt you to enable the service to start automatically. Confirm the dialog and start the service.
Create another share with the same settings for the dataset video-series
.