TrueNAS: Difference between revisions
No edit summary |
|||
Line 28: | Line 28: | ||
=== Datasets === | === Datasets === | ||
Every pool should have one dataset. This is where we set the permissions, important for SAMBA access. | Every pool should have one child dataset. This is where we set the permissions, important for SAMBA access. We could have more than one child dataset, but I haven't had the need. | ||
Dataset settings (NOTE: "Perm type Basic" is important!): | Dataset settings (NOTE: "Perm type Basic" is important!): | ||
Line 52: | Line 52: | ||
Use the same ACL as for the dataset. | Use the same ACL as for the dataset. | ||
WARNING I had to set these Auxiliary parameters in the SMB config so that symlinks would be followed. | |||
I set | |||
* Services > SMB > Actions > configuration > Auxiliary Parameters: | |||
* Services > SMB > Actions > configuration > | |||
unix extensions = no | unix extensions = no | ||
follow symlinks = yes | follow symlinks = yes | ||
wide links = yes | wide links = yes | ||
* Stop and restart SMB service | * Stop and restart SMB service | ||
== Maintenance == | |||
=== Remove a bad pool === | |||
* Make note of which drives use the pool; likely some are bad and some are good and perhaps worth reusing elsewhere. | |||
* Pool > (gear) > Export/disconnect | |||
** [x] Delete configuration of shares that use this pool (to remove the associated SMB share) | |||
** [x] Destroy data on this pool (you MUST select this or the silly thing will attempt to export the data) | |||
== Configuration == | |||
=== Set up user === | |||
I set up m user (1000) and m group (1000) | |||
=== Set up alert emails === | === Set up alert emails === |
Revision as of 14:50, 2 April 2022
Overview
Pools
FreeNAS provides storage via Pools. A pool is a bunch of raw drives gathered and managed as a set. My pools are one of these:
Pool type | Description |
---|---|
single drive | no FreeNAS advantage other than health checks |
raid1 pair | mirrored drives give normal write speeds, fast reads, single-fail redundancy, costs half of storage potential |
raid0 pair | striped drives gives fast writes, normal reads, no redundancy, no storage cost |
raid of multiple drives | raidz: optimization of read/write speed, redundancy, storage potential |
The three levels of raidz are:
- raidz: one drive is consumed just for parity (no data storage, ie you only get (n-1) storage total), and one drive can be lost without losing any data; fastest
- raidz2: two drives for parity, two can be lost
- raidz3: three drives for parity, three can be lost; slowest
Datasets
Every pool should have one child dataset. This is where we set the permissions, important for SAMBA access. We could have more than one child dataset, but I haven't had the need.
Dataset settings (NOTE: "Perm type Basic" is important!):
name #pool#-ds share type SMB user m group m ACL who everyone@ type Allow Perm type Basic Perm Full control Flags type Basic Flags Inherit
Share each dataset as a Samba share under:
Sharing > Windows Shares (SMB)
Use the pool name for the share name.
Use the same ACL as for the dataset.
WARNING I had to set these Auxiliary parameters in the SMB config so that symlinks would be followed.
- Services > SMB > Actions > configuration > Auxiliary Parameters:
unix extensions = no follow symlinks = yes wide links = yes
- Stop and restart SMB service
Maintenance
Remove a bad pool
- Make note of which drives use the pool; likely some are bad and some are good and perhaps worth reusing elsewhere.
- Pool > (gear) > Export/disconnect
- [x] Delete configuration of shares that use this pool (to remove the associated SMB share)
- [x] Destroy data on this pool (you MUST select this or the silly thing will attempt to export the data)
Configuration
Set up user
I set up m user (1000) and m group (1000)
Set up alert emails
Go to one of your google accounts to get an App password. It has to be an account that has 2fa turned on, bleh, so don't use moodboom@gmail.com. I went with abettersoftwaretrader@gmail.com.
Accounts > Users > root > edit password > abettersoftwaretrader@gmail.com System > Email > from email > abettersoftwaretrader@gmail.com, smtp.gmail.com 465 Implicit SSL, SMTP auth: (email/API password)
Troubleshooting
SOME of my shares were throwing Permission Denied errors on mv. Solutions:
- I applied permissions again, recursively, then restarted the SMB service on hive and the problem went away.
- You can also always go to the melange hive console, request a shell, and things always seem to work from there (but you're in FreeBSD world and don't have any beauty scripts like mh-move-torrent!)