TrueNAS Core Setup

Hi
Newbee to TrueNAS. I managed to install TrueNAS Core and I am now working on the setup.

I have 2 disks mirrored in one pool (Tank 1).
I have then created one major dataset (ds1).

Under this I would like to have a structure like this

ds1
|. |
|. No Backup. (for files I do not want to back up to another NAS)
|. |
|. | - Media
|. |- Videos
|. |- Books
|. |- Music
|
|-Backup
|- Shared
|. |-Media
|. |-Video
|
|-Private
|-Backup (for Mac TimeMachine, etc. One sub… for each user only accessible to that user)
|. |-User 1
|. |-User 2
|
|-Myvault (one sub… for each user. Private files only accessible to that user)
|. |-User 1
|. |-User 2
|
|-Media
|- nnnn

I would like to back up the “Backup”-section to another NAS once a week or once every second day or something. The “No backup” I intend to use for files that I can obtain again if I lose them, for example some music, movies etc. since my second NAS doesn’t have the same size on hard drives.
If I divide these in 2 parts the backup setup will be easier I believe.

Further, I would like to create 3 user groups.
Family, Relatives, Friends
And give them different user permissions.
Friends will only be give permission to “No backup” Video and Music
Relatives will be given permission to “No backup” but also given a “MyVault” sub… so they can store their own photos etc. and access to “Backup-Shared”
Family will be given permission to everything (except of course only their own respective sub… user under “MyVault” and “Backup”

I have a couple of questions regarding this:

  1. What would be best to set as dataset and what should best be set as folders?
    I would like to be able to move files between different places. It doesn’t matter if it takes time to move but if it is possible to do in a webGUI or in a way where I do not need to use the terminal, I would appreciate it.

  2. Should I create user accounts first and Groups after that or the other way around?

  3. Does any folders/directories get created automatically when I set up users or groups, and what would that be?

Some users use Mac and some use windows.

Hope someone can help me since I haven’t understood the difference between folders and datasets completely when it comes to setting user permissions, move files between them etc.

Welcome,

I would set up a dataset for every set of data that you intend to share separately. For example, you may have a media share with all your stuff in it (i.e. video, music, etc.) or you may decide that plex should only have access to one folder (videos) while iTunes gets access to another (i.e. music).

By setting up multiple datasets, you can fine-tune permissions, snapshot ages, etc. based on how often the data changes and what your use case is. So, I would not set up a single dataset except for the most simple use cases. Instead, mounting multiple shares is trivial and users can be granted access to multiple shares, if need be.

One thing to be quite careful of is using multiple protocols (i.e. AFP, SMB, NFS, etc.) on the same dataset. Do not do this, unless its absolutely, 100% unavoidable. While TrueNAS does its best to avoid mangling files that are being accessed by two different protocols at the same time, there have been reported issues in the past and I’d simply use a single protocol for every dataset, if at all possible.

You can move things very quickly from the shell. It does so locally. Not sure how that works with permissions afterwards, I almost never need to do this.

Groups and user accounts should be thought out as you move along, it makes it easier to assign permissions to shares accordingly. For me, permissions in 12+ were among the more annoying / steep things to learn.

Whether to auto-generate user home directories really depends on use case and how granular you like your control to be.

Lastly, I found the SMB implementation in TrueNAS to be so good that I turned off AFP and only use SMB. However, when you create SMB datasets, be sure to enable the “Use Apple-style Character Encoding” option to preserve filenames - it’s a checkbox - or the names will get mangled. Good luck.

1 Like

Thank you
I’ll try to start with setting up datasets for the major data shares like Media, Myvault etc. Then I’ll create a folder structure under each of these shares.
Thank you for mentioning multiple protocol problems. I’ll start with SMB.
Regarding permissions In 12+ I have no idea what that is. Also, I will generate home directories when I create specific users but try to place all of them in the Myvault dataset.
Hope this will work

I believe it was in 12 that ACLs replaced the older UNIX permissions structures? I struggled quite a bit getting all that set up to my satisfaction vs. the older approach.

A few things might be a little different, but I hope these help.