Dataset Layout

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
So I am completely new to Truenas and anything related to a nas tbh. I woke up one day and saw a video that I can use my old computer parts to build a server and now here I am. I have everything setup and I am creating the dataset layout. A lot of walkthroughs set up one dataset and then move on so its been a struggle putting together my dataset layout. I have come across some things to help me from this forum and also I have been using chatgpt. After a lot of thinking I came up with this setup. The datasets under Dataset1 will be common (a shared folder) and user 1 and user 2. I wanted to put those under dataset1 instead of directly under the tank dataset because then I can assign permissions to dataset1 and not have to mess with the tank.

The datasets labelled jails and non-jail plugins might be nonsense because I am learning as I am going and have not really gotten deep into jails and plugins. I do however want to think about those things now before I start adding data. Are jail datasets saved like this or is the datasets for the jail saved within the jail? I will research it more but that is one thing I was thinking about. Same with non-jail plugins, are there any that you would not want to run in a jail like Plex or a VM?

I appreciate any help!

Pool name: Tank

Tank

------Dataset1

------------Common

------------------Documents

------------------Books

------------------Music

------------------Movies

------------------Pictures

------------User 1

------------User 2

------Jails

------------Jail 1

------------Jail 2

------------Jail 3

------Non-Jail Plugins

------------Plex

------------VM

------------Other Program 1

------------Other Program 2
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Note, plugins are jails, so they would reside underneath the iocage dataset with jails, and don't need to be created manually. You may want to have a structure like this:

Code:
Tank - root dataset
  Common
    Documents
    Books
    Music
    Movies
    Pictures
  Users
    User1
    User2
  iocage <- daughter datasets are all managed by iocage
    .plugins
    download
    images
    jails
      Jail1
        root
      Plugin1
        root
      Jail2
        root
      Plugin2
        root
    log
    releases
    templates


You shouldn't create datasets underneath the iocage dataset, as you run the risk of either a) breaking the permissions iocage requires; or b) iocage deleting datasets in the course of business. The way to make data from other parts of the tree available to a jail or plugin is to use iocage fstabs to mount part of the tree inside the jail.

 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
Thank you for reaching out and providing me with that information. So I want to make sure I understand what I am reading so I am going to ask some things and you can judge if I am grasping what you’re saying.



1) So, datasets are where my data will be stored along with the settings I place on that data. I need to learn more about zvols. I feel like that is geared more towards the VM part of my storage so maybe it might be better to remove the non-jail plugins dataset. Then if I create a VM I can create a zvol. Again that is just a guess so I will research that more to be sure.



2) I use Windows, so I plan on using SMB for the sharing mechanism. Something that stuck out was that you say iSCSI can only use zvols and the others can only use datasets. You also say it’s not a good idea to have multiple sharing protocols on a single dataset. So I feel I will need to be careful because I want to use SMB but I need to make sure I don’t have any zvols in that dataset too. Especially because you said a dataset can contain a zvol.



The jails will create their own datasets so I do not need to create my own jail datasets in advance. So, I assume the jails dataset can go too. I just read that you said VM disks can only be zvols. The VM I want to mount using NFS so that is something I will learn more about and that goes back to what you said above about the sharing mechanisms so ill keep that in mind.



I want to learn more about permissions and ACLs, that is the next step for me. I found a post on here I am using to help me with that.



The last part of this section talks about snapshots and replication intervals. Above I said that datasets are where my data will be stored along with the setting I place on that data. I said that assuming that snapshots and replications will be stored there. I am still going to assume that but then also assume you are saying for situations where I need snapshots more often I might want to consider creating a separate dataset for those snapshots?



3) So I am going to keep everything under dataset1 the way it is. I don’t like the idea of doing something like Tank and then common, user 1, user 2 under that and then whatever else I do as I grow and add more things. The only thing I worry about is that will create an issue down the line having that extra dataset between tank and common/user1/user2.



It says create zvols on mirror pools if possible. I don’t understand that part. I have a raidz2 setup so I feel like that if possible part is important. Haha. I need to learn more about nested dataset too but does that have to do with how many datasets I have layered? Now it is making me wonder if I should get rid of that dataset1 dataset if that’s the case.



I appreciate you providing that information to help me better understand things.
 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
I just saw your second post too. Thank you for editing my layout to something that would work better. I see you took the dataset1 dataset out which has been a pain in my butt for the last week so thank you! I didnt know if I needed it or not. haha
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
TL;DR: do your research here on the forum and don't trust YouTube videos, most of them can mislead you into data loss.

If you are new I suggest reading the following resources.

You can get more links in my signature.

Do note that TrueNAS has some very specific hardware requirements, mainly the absolute incompatibility with hardware RAID controllers, bad PCIe to SATA adapters and Realtek NICs. You should also not use SMR drives.
 
Last edited:

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
Awesome Davvo thank you for providing me some additional resources to help me learn. Yea I stopped using Youtube because it was missing so many important details. I used the manual mostly and then googled as much as possible each step. This forum has been very helpful, I should have signed up sooner. I wont lie I have owned this nas for a while but I have been going so slow with it I am only at the dataset setup part.

I dont like rushing this kind of stuff and I am glad I didnt. When I first started I didnt know about ECC memory. Then I spent forever learning about that and making sure that all my hardware works with it. I unfortunately do not have ECC memory so that made me rethink what I plan on storing on this thing. I also ran hours and hours of memory tests on the memory because it is not ECC so I wanted to do that to not feel sad about not having ECC memory.

I then learned about HBAs because I didnt have enough sata ports to cover all the drives I wanted. I ended up using my 6 sata ports to run all my drives in RAIDz2 and have my boot drive on an ssd connected through USB. I dont know if that is stupid but it works for now. I also ran the short and long tests on the hard drives to make sure they were good out of the box.

Then I created my pool and the power went out while I was sleeping. Woke up and was like oh no this is a thing what do I do?? So I spent a while learning about UPS's and got one of those to deal with that issue. I ran the smart tests again just to be sure and then created my two users. I am not sure what I missed along the way but its been fun and I havent even used this thing yet. haha
 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
@Davvo I just finished reading the "is my Realtek ethernet really that bad?" article and I was wondering if the built in Intel GbE LAN Chip (10/100/1000 Mbit) is good enough to use or if you think getting a card would be the better option? I have a Gigabyte GA-Z170X-UD3 motherboard I am using and did look up getting a card early on but wanted to avoid additional costs in case I failed at this project. haha. I assumed since it gets up to 1Gbps it will be good enough for storing files and such.

Also the articles are all really great. I read the Introduction to ZFS writeup and it helped me better understand Samuel Tai's Path to Success post. Its all coming together now and showing me that I still have a lot to learn lol
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I have a Gigabyte GA-Z170X-UD3 motherboard I am using and did look up getting a card early on

I believe that's an Intel i219-V you have there. In general, Intel's support for their chipsets is very good and it would be unusual for this to be a problem with TrueNAS. However, I do not think I've actually tried an i219-V. There should be no value to adding a PCIe based ethernet card unless the onboard cannot be made to work. 1Gbps ethernet is slow enough that there should be no major differences even for an older chipset.
 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
So from the introduction to ZFS post it said a good rule of thumb is to use datasets instead of plain directories for data that is treated differently. I just want to make sure I am not misunderstanding this. So in Truenas I am creating datasets like the ones provided in the example above. Then I am going to use smb to be able to view those datasets on windows. If I create folders for additional stuff on windows does it automatically create a dataset for that folder in Truenas? Or should I be doing all my setup of folders as datasets in Truenas?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
A pretty common arrangement is to have a dataset for each share, and subdirectories as needed within that share--there wouldn't ordinarily be a need (or reason, really) for separate datasets within a share. Folders created by a client will be created as subdirectories, not as datasets.
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Datasets are shown as folders when shared with SMB, but folders are not datasets (so if you create a folder in the SMB share, you won't create a dataset under the storage tab of the webUI).
 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
Ok so would I have common as a dataset and then documents as a data set? If yes, how would I add the folders under documents? Examples like receipts, manuals, work docs, etc. Would they be subdirectories that I would setup as folders when shared with SMB or should I be creating them as datasets too under documents? I am assuming subdirectories are created in windows when I am asking that so correct me if I am wrong.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Would they be subdirectories that I would setup as folders when shared with SMB
That'd probably be the most common arrangement.
 

Adia113

Dabbler
Joined
Apr 8, 2023
Messages
12
Ok is this because in Truenas we dont care about subdirectories? Is that more for organization is Windows? If yes, does that mean all the files in each subdirectory are pooled together in Truenas under the dataset?
 
Top