# 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.

Read more
https://docs.oracle.com/cd/E23824_01/html/821-1448/gbcpt.html

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).

TrueNAS Pool odin
TrueNAS Pool odin

Check that the correct disks are added and the layout is Mirror. Create the pool and confirm the warning message.

TrueNAS Pool odin
TrueNAS Pool odin

Next, create the pool loki for our media. We will encrypt this pool by default, therefore additionally select the encryption option.

TrueNAS Pool loki
TrueNAS Pool loki

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.

TrueNAS Pool loki
TrueNAS Pool loki

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.

Settings

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

Settings

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.


# 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

TrueNAS Dataset Permissions
TrueNAS Dataset Permissions


# 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:

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 select No preset or Default 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.

Create another share with the same settings for the dataset video-series.