A few newbie questions about data/shares

Status
Not open for further replies.

BigLeo

Dabbler
Joined
Oct 25, 2018
Messages
12
Hi,

I've installed FreeNAS on an HP N54L with 5x4TB drives and mirrored USB sticks for FreeNAS. All seems to be good but I'm lost on how to use the disks. So far I have configured one pool with RaidZ2 using the entire space but I'm not sure if that is the right thing to do? If it is, then I'm lost as to whether I should be creating datasets under this or zvols?

My requirements are quite simple. I want to store my reference info (e.g. ebooks, pdf files, magazines etc.), my music library, videos, photos, documents etc. I plan to serve the videos to Kodi players using Plex and I would like to create a small virtual machine to run Logitech Media Server (or whatever it is called these days) for my Squeezebox players.

Previously I have been using Microsoft's WHS 2011 and I partitioned the disks for each function. The primary reason for that was because some data changed frequently whilst others didn't and I did not want to defrag file systems that did not need it. In the FreeNAS world I don't really understand the criteria.

I'd also like to create a small virtual machine to download/fetch my email that I then access for the various devices I read email on.

Any recommendations on how to set this up? I've watched some YouTube and read some of the documentation but it all seems to tell me what can be done rather than giving me advice on how to do it. The YouTube stuff I've watched all seems to be using the legacy interface which makes it harder to work out.

Any advice much appreciated.

Leo
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
So far I have configured one pool with RaidZ2 using the entire space but I'm not sure if that is the right thing to do?
It's hard to give absolutes of "the right thing to do", but most likely it is. The only real reason to have multiple pools is if you have very different performance and/or redundancy requirements for portions of your data.
I'm lost as to whether I should be creating datasets under this or zvols?
Unless you're going to be doing block storage (e.g., disk images for VMs), datasets.
The YouTube stuff I've watched all seems to be using the legacy interface which makes it harder to work out.
The "legacy interface" is the default interface in every released version of FreeNAS so far, so that seems entirely appropriate. If you're using any flavor of 11.2, that's still in a pre-release status.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I made a newbie mistake when I started with ZFS in FreeBSD years ago by setting up a single dataset. I mixed document, video and photos in the same dataset that multiple users could use. Soon the dataset was a mix of everything under the sun.

Some background is that I’m a hobby photographer. I had a “normal” backup strategy for pictures where I would import into Lightroom all let it copy the pictures off the camera to two different locations, an external HDD and the FreeBSD server. I would then manually copy to a third harddrive that I would rotate out with a forth drive I kept at relatives house.

As this was boring to do I wanted to set up a offsite backup target and have FreeBSD copy new files regularly to it and I intended to use ZFS Send. But sins I only wanted to copy the photos to the offsite server I couldn’t use ZFS Send, it was full of everything from everyone.

I ended up doing snapshots and rsync what I wanted from them, I worked but didn’t feel right. Now on my FreeNAS I devide datasets for everything and I try to keep them media specific. So if I have a dataset for user shares I set up individual datasets for users and other datasets for common shares. In Nextcloud I do have a “webstore” dataset Nextcloud uses as data vault, but external shares (I’m backing up broken hard drives for friends at the moment that generate very large tar.xz files) goes in its own dataset that then gets linked to Nextcloud as external storage.

What I’m trying to say is that in regards to datasets, divide them up by functions. Think through what data you are storing and then make datasets for each set that is different in some meaningful way. Permissions, shared, backups, you name it. If you can formulate aspect that is distinguishing one set from another, you are proabobly better off setting up separate datasets for it. Datasets are cheap, just make sure you don’t make it so complicated you have a hard time useing your server.
 

BigLeo

Dabbler
Joined
Oct 25, 2018
Messages
12
Thanks for the replies. So if I make a dataset for each different type of item you think that is the right thing to do? So, one dataset for music, another for ebooks etc.

One thing I am confused about is sharing. It seems as if I have to choose the sharing type of Windows, Mac or Linux. What is the implication/purpose of that? What I mean is, what if I want the files to be available for Windows, Mac and Linux machines?

At the moment my main PC is Windows but when I build my next PC I will probably use Linux Mint. I also plan to buy a Mac at some point. If I understand it correctly Microsoft will not let me run Windows 8.1 on newer processors and I don't want to spend out for Windows 10.

If I want my files to be accessible on Windows, Mac and Linux machines how do I do that and how does FreeNAS control access? Do I need to set-up FreeNAS as a domain controller or something?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The "share type" determines the type of permissions that are used for the share. "Windows" uses ACLs, and as a practical matter, permissions must be managed from the connected clients. "Unix" uses standard Unix-style permissions. I'm honestly not sure what "Mac" does, though my guess would be that it's ACL-based as well.

I also have a mix of clients, and I use Unix permissions--but then, I'm fairly comfortable at the command line and find it easiest to set permissions using the standard Unix chown/chmod commands.
Do I need to set-up FreeNAS as a domain controller
No, there shouldn't be any need for that.
 

BigLeo

Dabbler
Joined
Oct 25, 2018
Messages
12
I got no further with this due to ill health. Now (although still ill!) I want to try and make some progress. I guess I'm getting confused by the technology but this is what I want to store on the FreeNAS server.

Data
- Documents
- Various scans

Music
- FLAC files
- WAV files
- MP3 files
- playlists etc.

Video
- Bluray/DVD rips
- TV programmes
- MP4 files

Reference
- ebooks
- PDF files
- Magazines
- Reviews

Software
- Paid for programs
- Free software
- ISO files

My question is how should I structure that on FreeNAS. On Windows Home Server I created a partition for each of these items. With FreeNAS I have one Z2raid volume with 10TB free. But this seems to be called a Pool, a dataset and a volume. This is where I am confused? On WHS I would create a separate partition so that I can set different defrag options and ensure that the size is right for each one. How does this work on FreeNAS?

Could someone also please tell me how to rename the root account or how to manage this? It only seems to let me change the password but not the name of the account.

I hope this makes sense!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Could someone also please tell me how to rename the root account
You don't. root is root. Root, God, what is difference?
But this seems to be called a Pool, a dataset and a volume.
In FreeNAS through 11.1 (11.2 changes this), a "volume" is a pool. A pool always contains a root-level dataset of the same name. You can create other datasets under this root dataset, and you're generally encouraged to do so. You can set quotas and reservations for those datasets, but you don't need to do so.
 

BigLeo

Dabbler
Joined
Oct 25, 2018
Messages
12
You don't. root is root. Root, God, what is difference?
I thought it was always good practise on BSD/Linux style operating systems to rename the root account. Is this not the case?

I am using 11.2 RC1. Is this why I'm getting confused? All the videos on the Internet seem to be pre this release. I tried going back to the legacy interface but got even more confused.

I guess the reason I listed the types is that I cannot work out whether I should be creating a dataset called Music and then datasets for FLAC, WAV etc under that or whether I should be creating all the datasets under the top level. I don't know the implications of Music/Flac, Music/WAV etc versus Music-Flac, Music-WAV etc. at the top.

I'm not sure if my question is clear from that?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
There's no reason not to do nested datasets--so if there were a reason you wanted separate datasets for FLAC and WAV, you could create a Music dataset, and then Music/FLAC and Music/WAV. What you should do with them is really up to you, and I don't know that I have a great deal of wisdom to help you out, but here are some things to think about:
  • It's bad practice to share the root of your pool--so if your pool is tank, don't share /mnt/tank.
  • It's good practice to have a (at least one) dataset for each share.
  • If you want to snapshot or replicate something individually, that needs its own dataset. So if you wanted different snapshot schedules for Music/FLAC and Music/WAV, those would need to be separate datasets.
  • Similarly, if you want other properties to be different (compression, deduplication, recordsize, etc.), the datasets need to be separate.
Your simplest solution would be to create a dataset on your pool (maybe call it something creative like "shared"), share that dataset, and create everything else as directories inside that.

What I'd probably do is create datasets for Data, Music, Video, etc., share those datasets individually, and create separate subdirectories within those datasets.
Is this not the case?
I've not heard the advice to rename the root account, and I don't think it's generally possible. What I have heard frequently recommended, though, is to disable root logins, log in as a different user, and either su to root or use sudo when root privileges are needed. That's great for the CLI, but doesn't work so well for the web GUI. At this point, iX has made the design decision that only root gets to log in to the web GUI, though I think there are plans to change that at some point in the future.
 
Status
Not open for further replies.
Top