This guide collects various how-tos for both simple and complex tasks using primarily the TrueNAS web interface.
It is loosely organized by topic and is continuously being updated with new or replacement tutorials.
To display all tutorials in a linear HTML format, export it to PDF, or physically print it, please select ⎙ Download or Print.
If you are interested in writing a TrueNAS tutorial, see the Contributing section for some guidance!
TrueNAS SCALE documentation is divided into several sections or books:
The Getting Started Guide provides the first steps for your experience with TrueNAS SCALE:
Software Licensing information.
Recommendations and considerations when selecting hardware.
Installation tutorials.
First-time software configuration instructions.
Configuration Tutorials have many community and iXsystems -provided procedural how-tos for specific software use-cases.
The UI Reference Guide describes each section of the SCALE web interface, including descriptions for each configuration option.
API Reference describes how to access the API documentation on a live system and includes a static copy of the API documentation.
SCALE Security Reports links to the TrueNAS Security Hub and also contains any additional security-related notices.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
The API Keys option on the top toolbar Settings dropdown menu displays the API Keys screen. This screen displays a list of API keys added to your TrueNAS.
Adding an API Key
Click Add to display a dialog window that lets users add a new API key. API keys identify outside resources and applications without a principal.
Type a descriptive name and click Add. The system displays a confirmation dialog and adds a new API key to the list.
Creating API Keys in the Shell
TrueNAS SCALE supports creating API keys in the Shell with an allow list of permissions for the keys.
Go to System Settings > Shell and enter midclt call api_key.create '{"name":"KEYNAME", "allowlist": [{"method": "HTTPMETHOD", "resource": "METHODNAME"}]}' using your desired allowlist parameters.
In this case, the HTTP method is CALL, which is a websocket API method call. The resource is zfs.snapshot.*, which is the method name wildcard.
After you enter the command, the Shell displays the API Key in the output.
Editing or Deleting an API Key
Select the icon for any API key on the list to display options to manage that API key. Options are Edit or Delete.
Select the Reset to remove the existing API key and generate a new random key. The dialog displays the new key and the Copy to Clipboard option to copy the key to the clipboard.
Always back up and secure keys. The key string displays only one time, at creation!
To delete, select Confirm on the delete dialog to activate the Delete button.
API Key Documentation
Click API Docs to access API documentation for your system.
An automatic script sends a nightly email to the administrator root account containing important information such as the health of the disks.
Alert events are also emailed to the root user account.
Configure the system to send these emails to the administrator remote email account for fast awareness and resolution of any critical issues.
Configure the email address for the system root user as part of your initial system setup.
You can also configure email addresses for additional user accounts as needed.
Configuring the Root User Email Address
Before configuring anything else, set the root account email address.
Go to Credentials > Local Users, select the click expand_more to expand the root user information. Select Edit to display the Edit User configuration screen.
In the Email field, enter a remote email address that the system administrator regularly monitors (like admin@example.com) and click Save.
Configuring User Email
Just as with the root user, you can add new users as an admin or non-administrative account, and set up email for that user.
Follow the directions in Configuring the Root User Email Address for an existing user or in Setting Up User Accounts to add email service for a new user.
Configuring System Email
After setting up the root user email address you need to set up the send method for email service.
Click the Alerts icon in the top right of the UI, then click the gear icon and select Email to open the Email configuration screen.
The Send Mail Method shows two different options:
SMTP
GMail OAuth
The Email screen configuration options change based on the selected option.
After configuring the send method, click Send Test Mail to verify the configured email settings are working.
If the test email fails, verify that the root user Email field is correctly configured for the root user.
Return to Credentials > Users to select the root user.
Setting Up Email Using GMail OAuth
The Email screen displays with GMail OAuth preselected as the default send method.
To use the GMail OAuth send method:
Click on Log In To GMail.
The GMail Authorization window displays.
Click Proceed to display the Sign in with Google window.
Enter the Gmail account credentials. Type in the GMail account to use and click Next.
Enter the password for the GMail account you entered.
When the TrueNAS wants to access your Google Account window displays, scroll down and click Allow to complete the set up or Cancel to exit set up and close the window.
Setting Up Email Using SMTP
To setup up SMTP service for the system email send method you need the outgoing mail server and port number for the email you entered.
Enter the email you want to use in From Email and the name in From Name.
This is the email that sends the alerts and the name associated with the email.
Enter the host name or IP address of SMTP server sending email.
Enter the SMTP port number.
Typically 25/465 (secure SMTP), or 587 (submission).
Select the level of security from the Security dropdown list. Options are Plain (No Encryption), SSL (Implicit TLS), or TLS (STARTTLS).
Select SMTP Authentication if you use the SMTP server uses authentication credentials and enter those credentials.
Click Save.
Click Send Test Email to verify you receive an email.
Setting up the Email Alert Service
The system email account is sent a system health email every night/morning, if it is configured. You can also add/configure the Email Alert Service to send timely email warnings, when the system hits a specific state that is listed in Alert Settings, to the email specified in the alert service.
From the Alerts panel, select the settings icon and then Alert Services.
Change the Type field to Email and then populate the Add Alert Service form.
Add the system email address in the Email Address field.
Use SEND TEST ALERT to generate a test alert and confirm the email address and alert service works.
Managing Interfaces This article describes how to add, edit, and delete a network interface.
Setting Up a Network Bridge This article provides instructions on setting up a network bridge interface.
Setting Up a Link Aggregation This article provides instructions on setting up a network link aggregation (LAGG) interface.
Setting Up a Network VLAN This article provides instructions on setting up a network VLAN interface.
This article provides instructions on setting up a network interface static IP address.
2.1.1 - Managing Interfaces
This article describes how to add, edit, and delete a network interface.
You can add new or edit existing network interfaces on the Network screen.
LAGG (Link Aggregation)
You should use LAGG if you want to optimize multi-user performance, balance network traffic, or have network failover protection.
For example, Failover LAGG prevents a network outage by dynamically reassigning traffic to another interface when one physical link (a cable or NIC) fails.
Network Bridge
You should use a Bridge if you want to enable communication between two networks and provide a way for them to work as a single network.
For example, bridges can serve IPs to multiple VMs on one interface, which allows your VMs to be on the same network as the host.
Adding an Interface
You can only use DHCP to provide the IP address for one network interface and this is most likely for your primary network interface configured during the installation process.
To add another network interface leave the DHCP checkbox clear and click the Add button near the bottom of the Add Interface configuration panel so you can enter a static IP address for the interface.
Click Add on the Interfaces widget to display the Add Interface panel.
You must specify the type of interface you want to create. The Type field provides three options: Bridge, Link Aggregation or LAGG, and VLAN* or virtual LAN. You cannot edit the interface type after you click **Save**.
Each interface type displays new fields on the Add Interface panel. Links with more information on adding these specific types of interfaces are at the bottom of this article.
Editing an Interface
Click on an existing interface in the Interfaces widget to display the Edit Interface configuration panel.
The fields on the Edit Interface and Add Interface configuration panel fields are identical except for the Type and Name fields.
Both of these fields are editable only on the Add Interface panel before you click Save. The Type field only appears on the Add Interface configuration panel.
Because you cannot edit the interface type or name after you click Save, if you make a mistake with either field you can only delete that interface and create a new one with the desired type.
If you want to change from DHCP to a static IP, you must also add the new default gateway and DNS nameservers that work with the new IP address. See Setting Up a Static IP for more information.
If you delete the primary network interface you can lose your TrueNAS connection and the ability to communicate with the TrueNAS through the web interface!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Deleting an Interface
Click the delete icon next to the interface. The delete interface confirmation dialog displays.
Do not delete the primary network interface!
If you delete the primary network interface you lose your TrueNAS connection and the ability to communicate with the TrueNAS through the web interface!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
This article provides instructions on setting up a network bridge interface.
In general, a bridge refers to various methods of combining (aggregating) multiple network connections into a single aggregate network.
TrueNAS uses bridge(4) as the kernel bridge driver.
Bridge(8) is a command for configuring the kernal bridge in Linux.
While the examples focus on the deprecated brctl(8) from the bridge-utilities package, we use ip(8) and bridge(8) from iproute2 instead. Refer to the FAQ section that covers bridging topics more generally.
To set up a bridge interface, from the Network screen:
Click Add in the Interfaces widget. The Add Interface configuration screen displays.
Select Bridge from the Type dropdown list. You cannot change the Type field value after you click Apply.
Enter a name for the interface using the format bridgex where x is a number representing a non-parent interface.
You cannot change the Name of the interface after you click Apply.
(Optional but recommended) Enter any notes or reminders about this particular bridge in the Description field.
Select the interfaces on the Bridge Members dropdown list.
(Optional) Click Add to enter another IP address if desired for this bridge interface. Click Add to display an IP address field for each IP address you want to add.
This article provides instructions on setting up a network link aggregation (LAGG) interface.
In general, a link aggregation (LAGG) a general method of combining (aggregating) multiple network connections in parallel to provide additional bandwidth or redundancy for critical networking situations.
TrueNAS uses lagg(4) to manage LAGGs.
To set up a LAGG interface, from the Network screen:
Click Add in the Interfaces widget. The Add Interface configuration screen displays.
Select Link Aggregation from the Type dropdown list. You cannot change the Type field value after you click Apply.
Enter a name for the interface using the format laggX where X is a number representing a non-parent interface.
You cannot change the Name of the interface after you click Apply.
(Optional but recommended) Enter any notes or reminders about this particular LAGG interface in the Description field.
Select the Link Aggregation Settings for this interface.
a. Select the Link Aggregation Protocol from the dropdown list of options. There are three protocol options, LACP, FAILOVER and LOADBALANCE.
Additional fields display based on the LAGG protocol you select.
Select LACP to use the most common protocol for LAGG interfaces based on IEEE specification 802.3ad.
In LACP mode, negotiation is performed with the network switch to form a group of ports that are all active at the same time. The network switch must support LACP for this option to function.
Select FAILOVER to have traffic sent through the primary interface of the group. If the primary interface failes, traffic diverts to the next available interface in the LAGG.
Select LOADBALANCE to accept traffic on any port of the LAGG group and balance the outgoing traffic on the active ports in the LAGG group. This is a static setup that does not monitor the link state nor does it negotiate with the switch.
b. Select the LAGG interfaces from the Link Aggregation Interfaces.
c. If the protocol selected is LACP or LOADBALANCE, select the Transmit Hash Policy option from the dropdown list. LAYER2+3 is the default selection.
d. If the protocol selected is LACP, select the LACPDU Rate to used.
Select SLOW to set the heartbeat request to every second and the timeout to a three-consecutive heartbeat loss that is three seconds (default is SLOW).
Select FAST to set the timeout rate at one per second even after synchronization. Using FAST allows for rapid detection of faults.
(Optional) Click Add to enter another IP address if desired for this LAGG interface. Click Add to display an IP address field for each IP address you want to add.
This article provides instructions on setting up a network VLAN interface.
A virtual LAN (VLAN) is a partitioned and isolated domain in a computer network at the data link layer (OSI layer 2). Click here for more information on VLANs.
TrueNAS uses vlan(4) to manage VLANs.
Before you begin, make sure you have an Ethernet card connected to a switch port and already configured for your VLAN.
Also that you have preconfigured the VLAN tag in the switched network.
To set up a VLAN interface, from the Network screen:
Click Add in the Interfaces widget. The Add Interface configuration screen displays.
Select VLAN from the Type dropdown list. You cannot change the Type field value after you click Apply.
Enter a name for the interface using the format vlanX where X is a number representing a non-parent interface.
You cannot change the Name of the interface after you click Apply.
(Optional but recommended) Enter any notes or reminders about this particular VLAN in the Description field.
Select the interface in the Parent Interface dropdown list. This is typically an Ethernet card connected to a switch port already configured for the VLAN.
Enter the numeric tag for the interface in the Vlan Tab field. This is typically preconfigured in the switched network.
Select the VLAN Class of Service from the Priority Code Point dropdown list.
(Optional) Click Add to enter another IP address if desired for this bridge interface. Click Add to display an IP address field for each IP address you want to add.
This article provides instructions on setting up a network interface static IP address.
This article provides instructions on setting up a network interface with a static IP address or changing the main interface from a DHCP-assigned to a manually-entered static IP address. You must know the DNS name server and default gateway addresses for your IP address.
Disruptive Change!
You can lose your TrueNAS connection if you change the network interface that the web interface uses!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Before you Begin
Have the DNS name server addresses and the default gateway for the new IP address, and the new static IP address on hand to prevent lost communication with the server.
You have only 60 seconds to change and test these network settings before they revert back to the current settings, for example back to DHCP assigned if moving from DHCP to a static IP.
Back up your system to preserve your data and system settings.
As a precaution, grab a screenshot of your current settings in the Global Configuration widget.
If your network changes result in lost communication with the network and you need to return to the DHCP configuration you had before, you can refer to this information to restore communication with your server.
Lost communicatation could require you to reconfigure your network settings using the Console Setup Menu.
To change an interface from using DHCP to a static IP address:
Select the interface on the Interfaces widget to open the Edit Interface configuration screen to turn off DHCP and add the new static IP. Click Apply.
a. Clear the checkmark from the DHCP checkbox.
b. Click Add in the IP Addresses section of the form and then enter the new static IP address into the field displayed. Select the CIDR number from the dropdown list.

c. Click Apply. The Network screen displays with a new widget where you can select to either Test Changes or Revert Changes.
2. Check the name servers and default router information in the Global Information card.
If the current settings are not on the same network click Settings and modify each as needed to allow the static IP to communicate over the network.
For home users, use 8.8.8.8 for a DNS name sever address so you can communicate with external networks.
a. Add the IP addresses for the DNS name servers in the Nameserver 1, Nameserver2, and Nameserver3 fields.

b. Add the IP address for the default gateway in the appropriate field. If the static network is IPv4 enter the gateway in IPv4 Default Gateway, if the static network is IPv6 use IPv6 Default Gateway.
c. Click Save.
5. Test the network changes. Click Test Changes. Select Confirm to activate Test Changes button.
Click the button and then click Save on the Save Changes dialog.
The system attempts to connect to the new static IP address. If successful the Save Changes widget displays.
Click Save Changes to make the change to the static IP address permanent or click Revert Changes to discard changes and return to your previous settings.
The Save Changes confirmation dialog displays. Click SAVE. The system displays a final confirmation that the change is in effect.
Changing from Static IP to DHCP
Only one interface can use DHCP to assign the IP address and that is likely the primary network interface. If you do not have a existing network interface set to use DHCP you can use it to convert from static IP to DHCP.
To return to using DHCP:
Click Settings on the Global Configuration widget.
Clear the name server fields and the default gateway, and then click Save.
Click on the interface to display the Edit Interface screen.
Select DHCP.
Remove the static IP address from the IP Address field.
Click Apply.
Click Settings to display the Global Configuration configuration form and enter name server and default gateway addresses for the new DHCP-provided IP address.
Home user can enter 8.8.8.8 in the Nameserver 1 field.
Click Test Change. If the network settings are correct, the screen displays the Save Changes widget. Click Save Changes.
If the test network operation fails or the system times out, your system returns to the network settings before you attempted the change. Verify the name server and default gateway information to try again.
This article provides instructions on adding network settings during initial SCALE installation or after a clean install of SCALE.
Use the Global Configuration Settings screen to add general network settings like the default gateway, DNS name servers to allow external communication.
You can lose your TrueNAS connection if you change the network interface that the web interface uses!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Adding Network Settings
From the Network > Global Configuration screen click Settings to display the Global Configuration configuration form and then:
Enter the host name for your TrueNAS in Hostname. For example, truenas.
Enter the system domain name in Domain. For example, mycompanyname.com.
Enter the IP addresses for your DNS name servers in the Nameserver 1, Nameserver 2, and/or Nameserver 3 fields.
For home users, enter 8.8.8.8 in the Nameserver 1 field so your TrueNAS SCALE can communicate externally with the Internet.
Enter the IP address for your default gateway into the IPv4 Defalut Gateway if you are using IPv4 IP addresses.
Enter the IP address in the IPv6 Default Gateway if you are using IPv6 addresses.
Select the Outbound Network radio button for outbound service capability.
Select Allow All to permit all TrueNAS SCALE services that need external communication to do that or select Deny All to prevent that external communication. Select Allow Specific and then use the dropdown list to pick the services you want to allow to communicate externally.
Click on as many services as you want to permit external communications for. Unchecked services cannot communication externally.
Click Save. The Global Configuration widget on the Network screen update to show the new settings.
This article provides instructions on configuring or managing global configuration settings.
Use the Global Configuration Settings screen to manage existing general network settings like the default gateway, DNS servers, set DHCP to assign the IP address or to set a static IP address, add IP address aliases, and set up services to allow external communication.
Disruptive Change
You can lose your TrueNAS connection if you change the network interface that the web interface uses!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Video Player is loading.
Current Time 0:00
/
Duration 1:16
Loaded: 17.12%
0:00
Stream Type LIVE
Remaining Time -1:16
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Users can configure many of these interface, DNS, and gateway options in the Console setup menu.
Be sure to check both locations when troubleshooting network connectivity issues.
Setting Up External Communication for Services
Use the Global Configuration Outbound Network radio buttons to set up services to have external communication capability.
Services that use external communication are:
ACME DNS-Authenticators
Anonymous usage statistics
Catalog(s) information exchanges
Cloud sync
KMIP
Mail (email service)
Replication
Rsync
Support
TrueCommand iX porta
Updates
VMWare snapshots
Select the Allow All to permit all the above services to externally communicate. This is the default setting.
Select the Deny All to prevent all the above services from externally communicating.
Select the Allow Specific to permit external communication for the services you specify. Selecting Allow Specific displays a dropdown list field with the list of services you can select from. Select all that apply. A checkmark displays next to each selected service. Selected services display in the field separated by a (,).
Click Save when finished.
Setting Up Netwait
Use Netwait to prevent starting all network services until the network is ready. Netwait sends a ping to each of the IP addresses you specify until one responds, and after receiving the response then services can start.
To set up Netwait, from the Network screen:
Click on Settings in the Global Configuration widget. The Global Configuration screen displays.
Select the Enable Netwait Feature checkbox. The Netwait IP List field displays.
Enter your list of IP addresses to ping. Press Enter after entering each IP address.
This article provides instructions on configuring a static route using the SCALE web UI.
TrueNAS does not have defined static routes by default but TrueNAS administrators can use the Static Routes widget on the Network screen to manually enter routes so the router can send packets to a destination network.
If you have a monitor and keyboard connected to the system you can use the Console setup menu to configure static routes during the installation process, but we recommend using the web UI for all configuration tasks.
If you need a static route to reach portions of the network, from the Network screen:
Click Add in the Static Routes widget. The Add Static Route configuration screen displays.
Enter a value in Destination. Enter the destination IP address and CIDR mask in the format A.B.C.D/E where E is the CIDR mask.
Enter the gateway IP address for the destination address in Gateway.
(Optional) Enter a brief description for this static route, such as the part of the network it reaches.
This article guides you through setting up Intelligent Platform Management Interface (IPMI) on TrueNAS SCALE.
IPMI requires compatible hardware! Refer to your hardware documentation to determine if the TrueNAS web interface has IPMI options.
Many TrueNAS Storage Arrays have a built-in out-of-band management port that provides side-band management should the system become unavailable through the web interface.
Intelligent Platform Management Interface (IPMI) allows users to check the log, access the BIOS setup, and boot the system without physical access. IPMI also enables users to remotely access the system to assist with configuration or troubleshooting issues.
Some IPMI implementations require updates to work with newer versions of Java. See here for more information.
IPMI is configured in Network > IPMI. The IPMI configuration screen provides a shortcut to the most basic IPMI configuration.
IPMI Options
We recommend setting a strong IPMI password. IPMI passwords must include at least one upper case letter, one lower case letter, one digit, and one special character (punctuation, e.g. ! # $ %, etc.). It must also be 8-16 characters long. Document your password in a secure way!
After saving the configuration, users can access the IPMI interface using a web browser and the IP address specified in Network > IPMI. The management interface prompts for login credentials. Refer to your IPMI device documentation to learn the default administrator account credentials.
After logging in to the management interface, users can change the default administrative user name and create additional IPMI users. IPMI utility appearance and available functions vary by hardware.
The SCALE Storage section has controls for pool, snapshot, and disk management.
The storage section also has options for datasets, zvols, and permissions.
For guidance on clustering storage across multiple SCALE systems, see (Clustering and Sharing SCALE Volumes with TrueCommand)[/solutions/integrations/smbclustering/].
Storage Overview
The top row of the SCALE storage screen lets users search for existing pools, datasets, and zvols.
The Import button lets users reconnect pools exported/disconnected from the current system or created on another system. The import button also reconnects pools after users reinstall or upgrade the TrueNAS system.
The Create Pool button creates ZFS data storage “pools” with physical disks to efficiently store and protect data.
The Snapshots drop-down creates snapshots, which provide read-only point-in-time copies of a file system, volume, or a running virtual machine.
The Disks drop-down lets users manage, wipe, and import storage disks that TrueNAS will use for ZFS data storage.
The Storage screen displays the pools, datasets, and zvols users have created on the system. Users may perform actions to root pools or specific datasets using the Pool Actions and Dataset Actions menus.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
TrueNAS uses ZFS data storage pools to efficiently store and protect data.
What is a pool? expand Storage pools are attached drives organized into virtual devices (vdevs). ZFS and TrueNAS periodically review and heal when discovering a bad block in a pool. Drives are arranged inside vdevs to provide varying amounts of redundancy and performance. Combined, ZFS and vdevs combined create high-performance pools, pools that maximize data lifetime, and all situations in between.
This section provides articles with instructions for importing, replacing, wiping disks.
Disk Article Summaries Managing Disks This article provides information on managing disks, performing manual S.M.A.R.T. testing and viewing S.M.A.R.T. test results.
Importing Disks This article provides instructions for importing a disk and monitoring the import progress.
Replacing Disks This article provides disk replacement instructions that includes taking a failed disk offline and and replacing a disk in an existing VDEV.
Dataset Tutorial Article Summaries Adding and Managing Datasets This article provides instructions on creating and managing datasets.
Adding and Managing Zvols This article provides instructions on creating, editing and managing zvols.
Importing Data This article provides information on ZFS importing for storage pools in TrueNAS SCALE. It also addresses GELI-encrypted pools.
Managing User or Group Quotas This article provides information on managing user and group quotas.
This article covers self-encrypting drives, including supported specifications, implementing and managing SEDs in TrueNAS, and managing SED passwords and data.
3.1 - Pools
TrueNAS uses ZFS data storage pools to efficiently store and protect data.
Storage pools are attached drives organized into virtual devices (vdevs).
ZFS and TrueNAS periodically review and heal when discovering a bad block in a pool.
Drives are arranged inside vdevs to provide varying amounts of redundancy and performance.
Combined, ZFS and vdevs combined create high-performance pools, pools that maximize data lifetime, and all situations in between.
Review Storage Needs
We strongly recommend users review the available system resources and plan the storage use case before creating a storage pool.
Allocating more drives to a pool increases redundancy when storing critical information.
Maximizing total available storage at the expense of redundancy or performance entails allocating large-volume disks and configuring a pool for minimal redundancy.
Maximizing pool performance entails installing and allocating high-speed SSD drives to a pool.
Determining your specific storage requirements is a critical step before creating a pool.
Pool Article Summaries
The articles in this section provide information on setting up system storage, which includes adding, importing or mananging pools, adding or managing datasets and zvols.
This section provides articles with instructions for importing, replacing, wiping disks.
Disk Article Summaries Managing Disks This article provides information on managing disks, performing manual S.M.A.R.T. testing and viewing S.M.A.R.T. test results.
Importing Disks This article provides instructions for importing a disk and monitoring the import progress.
Replacing Disks This article provides disk replacement instructions that includes taking a failed disk offline and and replacing a disk in an existing VDEV.
This article provides information on the disk_resize command in SCALE.
3.1.1 - Creating Storage Pools
This article provides information on creating storage pools and using VDEV layout options in TrueNAS SCALE.
TrueNAS uses ZFS data storage pools to efficiently store and protect data.
Storage pools attach drives organized into virtual devices called VDEVs.
ZFS and TrueNAS periodically review and heal when discovering a bad block in a pool.
Drives arranged inside VDEVs provide varying amounts of redundancy and performance.
ZFS and VDEVs combined create high-performance pools that maximize data lifetime.
Review Storage Needs
We strongly recommend that you review your available system resources and plan your storage use case before creating a storage pool.
Allocating more drives to a pool increases redundancy when storing critical information.
Maximizing total available storage at the expense of redundancy or performance entails allocating large-volume disks and configuring a pool for minimal redundancy.
Maximizing pool performance entails installing and allocating high-speed SSD drives to a pool.
Determining your specific storage requirements is a critical step before creating a pool.
Creating a Pool
To create a pool using the Pool Manager you:
Enter a name.
Move disks to a data VDEV.
Add any other VDEV to the pool you want to include and then add disks to them.
Click Create
You access the Pool Manager from the Storage Dashboard.
Click Storage on the main navigation panel on the left of the screen.
Click Create Pool to open the Pool Manager screen for new pools.
If you already have a pool created on your system you can use either the Create Pool button at the top right of the screen or click the Add To Pool button on the Unassigned Disks widget to create a new pool.
Naming the Pool
First, enter a name for the pool using up to 50 lower case alpha-numeric and permitted special characters that conform to ZFS naming conventions.
The pool name contributes to the maximum character length for datasets so it is limited to 50 characters.
You cannot change the name of the pool after you click Create!
Encrypting the Pool
Next, decide if you want to encrypt this pool. Datasets inherit encryption from the pool.
TrueNAS offers several encryption algorithms to maximize security.
However, encryption also complicates data retrieval and risks permanent data loss!
Refer to the Encryption article for more details and decide if encryption is necessary for your use case before setting any Encryption option.
Adding Disks to the VDEVs
Next, add disks to your primary data VDEV.
A data VDEV is the standard VDEV for primary storage operations.
A data VDEV configuration typically affects how the other types of VDEVs get configured.
All pools must have a data VDEV.
You can add as many VDEV types (cache, log, spare, etc.) as you want to the pool for your use case but it must have a data VDEV.
The Available Disks table lists all available disks detected on the system including disks for exported pools.
Warning: USB-connected disks might report their serial numbers inaccurately, making them indistinguishable from each other.
Disks with non-unique serial numbers do not populate the Available Disks section until you select Show disk with non-unique serial numbers.
TrueNAS SCALE does not support adding multiple data VDEV layouts (or types) in one pool, for example a mirror data VDEV and a RAID data VDEV in the same pool.
Create a new pool when a different data VDEV layout is required.
For example, pool1 has a data VDEV in a mirror layout, so create pool2 for any raid-z VDEVs.
We do not recommend mixing disks of different sizes in a VDEV. If you do, you must Force the action and override the One or more data vdevs has disks of different sizes error.
You must then confirm you understand the warning before you can continue.
You can add disks to the data VDEV manually or click the Suggest Layout button and allow TrueNAS to review all available disks and populate the primary Data VDevs with identically sized drives in a configuration balanced between storage capacity and data redundancy.
If you don’t want to use the suggested layout, click Reset Layout to clear the data VDEV layout and move the disks back to the Available Disks list.
To manually add disks, select the checkboxes to the left of each disk you want to add and then click the to the left of the data VDEV to move the disks over. See About Data VDEV Layouts or the Pool Manager Screen or more information on data VDEV layouts.
Next, if you want to add another type of VDEV, click Add Vdev and select the VDEV type from the options.
Each VDEV type stores data or enables unique features for the pool.
For more details on VDEV types and data VDEV layouts see the Pool Manager Screen article.
If you have enough disks of the same size available, you can duplicate the data VDEV.
Click Create to add the pool.
Duplicating a Data vdev
To duplicate a data VDEV, click Repeat First Vdev.
If disks of equal size are available, the Repeat First VDEV button opens a window pre-populated or where you enter the number of additional data VDEVs to create.
The dialog displays information on the data VDEV layout, the storage size of the VDEV, and the number of disks used and remaining for the VDEV you are repeating.
Click Repeat Vdev to create and populate a duplicated data VDEV.
Another VDEV with an identical configuration is called a mirror of VDEVs.
If you add more disks of the same size to your system, you can add another duplicate data VDEV.
Don’t have multiple data vdevs with different numbers of disks in each VDEV.
This complicates and limits the pool capabilities.
About Data VDEV Layouts
You can add a data VDEV to a pool in one of several layouts.
A Stripe VDEV has each disk storing data. A stripe requires at least one disk and has no data redundancy.
To create a stipe VDEV you must select Force to activate the Create button on the Pool Manager screen.
Never use a Stripe VDEV to store critical data!
A single disk failure results in losing all data in the vdev.
A Mirror VDEV stores on both disks, data is identical in each disk.
A mirror VDEV requires at least two disks, has the most redundancy, and the least capacity.
A RAIDZ1 uses one disk for parity while all other disks store data.
A RAIDZ1 requires at least three disks.
A RAIDZ2 uses two disks for parity while all other disks store data.
A RAIDZ2 requires at least four disks.
A RAIDZ3 uses three disks for parity while all other disks store data.
A RAIDZ3 requires at least five disks.
The Pool Manager screen suggests a VDEV layout from the number of disks added to the VDEV.
For example, if you add two disks, TrueNAS automatically configures the VDEV as a mirror.
The total available storage is the size of one added disk while the other disk provides redundancy.
This article provides instructions for wiping a disk.
3.1.2.1 - Managing Disks
This article provides information on managing disks, performing manual S.M.A.R.T. testing and viewing S.M.A.R.T. test results.
To manage disks, go to Storage and click Disks on the top right of the screen to display the Storage Disks screen.
Select the disk on the list, then select Edit.
The Disks page lets users edit disks, perform manual tests, and view S.M.A.R.T. test results. Users may also delete obsolete data off an unused disk.
Performing Manual S.M.A.R.T. Testing
Select the disk(s) you want to perform a S.M.A.R.T. test on and click Manual Test.
Long runs SMART Extended Self Test. This scans the entire disk surface and can take many hours on large-volume disks.
Short runs SMART Short Self Test (usually under ten minutes). These are basic disk tests that vary by manufacturer.
Conveyance runs a SMART Conveyance Self Test.
This self-test routine is intended to identify damage incurred during transporting of the device.
This self-test routine requires only minutes to complete.
Offline runs SMART Immediate Offline Test.
The effects of this test are visible only in that it updates the SMART Attribute values, and if the test finds errors, they appear in the SMART error log.
Click Start to begin the test. Depending on the test type you choose, the test can take some time to complete. TrueNAS generates alerts when tests discover issues.
For information on automated S.M.A.R.T. testing, see the S.M.A.R.T. tests article.
S.M.A.R.T. Test Results
To review test results, expand the disk and click S.M.A.R.T. Test Results.
Users can also view S.M.A.R.T. Test Results in Shell using the smartctl command and the name of the drive. For example, smartctl -l selftest /dev/sdb.
This article provides instructions for importing a disk and monitoring the import progress.
Importing is a one-time procedure that copies the data from that disk into a TrueNAS dataset.
TrueNAS can only import one disk at a time, and you must install or physically connect it to the TrueNAS system.
You can use the import function to integrate UFS (BSD Unix), NTFS (Windows), MSDOS (FAT), or EXT2 (Linux) formatted disks into TrueNAS.
Importing an EXT3 or EXT4 filesystem is possible in some cases, although neither is fully supported.
EXT3 journaling is not supported, so those file systems must have an external fsck utility, like the one provided by E2fsprogs utilities, run on them before import.
EXT4 file systems with extended attributes or i-nodes greater than 128 bytes are not supported.
EXT4 file systems with EXT3 journaling must have an fsck run on them before import, as described above.
Importing a Disk
You can only import one disk at a time.
To import a disk:
Go to Storage and click Disks at the top right of the screen.
Select Import Disk to display the Import Disk screen.
Use the Disk dropdown list to select the disk you want to import.
TrueNAS attempts to detect and select the file system type.
If not already selected by the system, click a radio button for a file system type to use from the on-screen options.
Selecting the MSDOSFS file system displays the MSDOSFS locale dropdown field.
Use this option to select the locale when non-ASCII characters are present on the disk.
Select the ZFS dataset you want to hold the copied data in Destination Path.
Click Save. The disk mounts and copies its contents to the specified dataset you entered in Destination Path.
Use the same import procedure to restart the task.
Choose the same dataset in Destination Path as the interrupted import for TrueNAS to scan the destination for previously imported files and resume importing any remaining files.
Monitoring a Disk Import
To monitor an in-progress import, open the Jobs Manager by clicking the assignment on the top toolbar.
The disk unmounts after the copy operation completes.
A dialog allows viewing or downloading the disk import log.
This article provides disk replacement instructions that includes taking a failed disk offline and and replacing a disk in an existing VDEV.
Hard drives and solid-state drives (SSDs) have a finite lifetime and can fail unexpectedly.
When a disk fails in a Stripe (RAID0) pool, you must to recreate the entire pool and restore all data backups.
We always recommend creating non-stripe storage pools that have disk redundancy.
To prevent further redundancy loss or eventual data loss, always replace a failed disk as soon as possible!
TrueNAS integrates new disks into a pool to restore it to full functionality.
TrueNAS requires you to replace a disk with another disk of the same or greater capacity as a failed disk.
You must install the disk install in the TrueNAS system and it should not be part of an existing storage pool.
TrueNAS wipes the data on the replacement disk as part of the process.
Replacing a Failed Disk
If you configure your main SCALE Dashboard to include individual Pool or the Storage widgets they show the status of your system pools as on or offline, degraded, or in an error condition.
The new Storage Dashboard pool widgets also show the status of each of your pools.
From the main Dashboard, you can click the on either the Pool or Storage widget to go to the Storage Dashboard screen, or you can click Storage on the main navigation menu to open the Storage Dashboard and locate the pool in the degraded state.
To replace a failed disk:
Locate the failed drive.
a. Go to the Storage Dashboard and click Manage Devices on the Topology widget for the degraded pool to open the Devices screen for that pool.
b. Click anywhere on the VDEV to expand it and look for the drive with the Offline status.
Take the disk offline.
Click Offline on the ZFS Info widget to take the disk offline. The button toggles to Online.
Pull the disk from your system and replace it with a disk of at least the same or greater capacity as the failed disk. V:
a. Click Replace on the Disk Info widget on the Devices screen for the disk you off-lined.
b. Select the new drive from the Member Disk dropdown list on the Replacing disk diskname dialog.
Add the new disk to the existing VDEV. Click Replace Disk to add the new disk to the VDEV and bring it online.
Disk replacement fails when the selected disk has partitions or data present.
To destroy any data on the replacement disk and allow the replacement to continue, select the Force option.
When the disk wipe completes, TrueNAS starts replacing the failed disk.
TrueNAS resilvers the pool during the replacement process.
For pools with large amounts of data, this can take a long time.
When the resilver process completes, the pool status returns to Online status on the Devices screen.
Taking a Disk Offline
We recommend users off-line a disk before starting the physical disk replacement. Off-lining a disk removes the device from the pool and can prevent swap issues.
There are situations where you can leave a disk that has not completely failed online to provide additional redundancy during the replacement procedure.
We do not recommend leaving failed disks online unless you know the exact condition of the failing disk.
Attempting to replace a heavily degraded disk without off-lining it significantly slows down the replacement process.
If the off-line operation fails with a Disk offline failed - no valid replicas message, go to Storage Dashboard and click Scrub on the ZFS Health widget for the pool with the degraded disk. The Scrub Pool confirmation dialog opens. Select Confirm and then click Start Scrub.
When the scrub operation finishes, return to the Devices screen, click on the VDEV and then the disk, and try to off-line it again.
Click on Manage Devices to open the Devices screen, click anywhere on the VDEV to expand VDEV and show the drives in the VDEV.
Click Offline on the ZFS Info widget. A confirmation dialog displays. Click Confirm and then Offline.
The system begins the process to take the disk offline. When complete, the disk displays the status of the failed disk as Offline.
The button toggles to Online.
You can physically remove the disk from the system when the disk status is Offline.
If the replacement disk is not already physically installed in the system, do it now.
Use Replace to bring the new disk online in the same VDEV.
This article provides instructions for wiping a disk.
The disk wipe option deletes obsolete data from an unused disk.
Wipe is a destructive action and results in permanent data loss!
Back up any critical data before wiping a disk.
TrueNAS only shows the Wipe option for unused disks.
Ensure you have backed-up all data and are no longer using the disk.
Triple check that you have selected the correct disk for the wipe.
Recovering data from a wiped disk is usually impossible.
Click Wipe to open a dialog with additional options:
Quick erases only the partitioning information on a disk without clearing other old data, making it easy to reuse. Quick wipes take only a few seconds.
Full with zeros overwrites the entire disk with zeros and can take several hours to complete.
Full with random overwrites the entire disk with random binary code and takes even longer than the Full with zeros operation to complete.
After selecting the appropriate method, click Wipe and confirm the action. A Confirmation dialog opens.
!
Verify the name to ensure you have chosen the correct disk. When satisfied you can wipe the disk, set Confirm and click Continue.
Continue starts the disk wipe process and opens a progress dialog with the Abort button.
Abort stops the disk wipe process. At the end of the disk wipe process a success dialog displays. Close closes the dialog and returns you to the Disks screen.
This article provides instructions on managing storage pools, VDEVS and disks in TrueNAS SCALE.
Use the Storage Dashboard widgets to manage a pool, and the Dataset screen to manage dataset functions.
Setting Up Auto TRIM
Select Storage on the main navigation panel and then click the Edit Auto TRIM on the ZFS Health widget for the selected pool to open the Pool Options for poolname dialog.
Select Auto TRIM.
Click Save.
With Auto TRIM selected and active, TrueNAS periodically checks the pool disks for storage blocks it can reclaim. Auto TRIM can impact pool performance, so the default setting is disabled.
For more details about TRIM in ZFS, see the autotrim property description in zpool.8.
Exporting/Disconnecting or Deleting a Pool
The Export/Disconnect option allows you to disconnect a pool and transfer drives to a new system where you can import the pool. It also lets you completely delete the pool and any data stored on it.
Select Export/Disconnect on the Storage Dashboard.
A dialog box displays with any system services affected by exporting the pool listed in the dialog.
To delete the pool and erase all the data on the pool, select Destroy data on this pool. The pool name field displays at the bottom of the window. Type the pool name into this field. To export the pool, do not select this option.
Select Delete configuration of shares that used this pool? to delete shares connected to the pool.
Select Confirm Export/Disconnect
Click Export/Disconnect. A confirmation dialog displays when the export/disconnect completes.
Adding a VDEV
ZFS supports adding VDEVs to an existing ZFS pool to increase the capacity of the pool.
You cannot change the original encryption or data VDEV configuration.
To add a VDEV to a pool:
Click Manage Devices on the Topology widget to open the Devices screen.
Click Add VDEV on the Devices screen. The Add Vdevs to Pool version of the Pool Manager screen opens.
Click Add Vdev and select the type of VDEV you want to add.
Select the disk(s) you want to move to that VDEV and then click the to the left of the VDEV you just added to them to that VDEV.
Repeat for each type of VDEV you want to add to this pool.
Click Add Vdevs at the bottom of the screen to save the changes and close the Pool Manager screen. The Topology widget displays the newly added VDEVs.
You cannot add more drives to an existing data VDEV but you can stripe a new VDEV of the same type to increase the overall pool size.
To extend a pool, you must add a data VDEV that is the same type as existing VDEVs.
To make a hot spare for a VDEV, click Add VDev and select Hot Spare. Move the disk you want to use to that Spare VDev before you click Add VDevs to save the changes to the pool.
Extending VDEV Examples:
To make a striped mirror, add the same number of drives to extend a ZFS mirror.
For example, you start with ten available drives. Begin by creating a mirror of two drives, and then extending the mirror by adding another mirror of two drives. Repeat this three more times until you add all ten drives.
To make a stripe of two RAIDZ1 VDEVs (similar to RAID 50 on a hardware controller), add another three drives to extend the three-drive RAIDZ1.
To make a stripe of RAIDZ2 VDEVs (similar to RAID 60 on a hardware controller), add another four drives to extend the four-drive RAIDZ2.
Running a Pool Data Integrity Check
Use Scrub on the ZFS Health pool widget to start a pool data integrity check.
Click Scrub to open the Scrub Pool dialog.
Select Confirm, then click Start Scrub.
If TrueNAS detects problems during the scrub operation, it either corrects them or generates an alert in the web interface.
By default, TrueNAS automatically checks every pool on a reoccurring scrub schedule.
The ZFS Health widget displays the state of the last scrub or disks in the pool.
To view scheduled scrub tasks, click View all Scrub Tasks on the ZFS Health widget.
Managing Pool Disks
The Storage Dashboard screen Disks button and the Manage Disks button on the Disk Health widget both open the Disks screen.
The Manage Devices button on the Topology widget opens the Devices screen.
To manage disks in a pool, click on the VDEV to expand it and show the disks in that VDEV.
Click on a disk to see the devices widgets for that disk. You can take a disk offline, detach it, replace it, manage the SED encryption password, and perform other disk management tasks from this screen.
See Replacing Disks for more information on the Offline, Replace and Online options.
Expanding a Pool
Click Expand on the Storage Dashboard to increase the pool size to match all available disk space. An example is expanding a pool when resizing virtual disks apart from TrueNAS.
This article provides information on setting up and using fusion pools.
Fusion Pools are also known as ZFS allocation classes, ZFS special vdevs, and metadata vdevs (Metadata vdev type on the Pool Manager screen.).
A special VDEV can store metadata such as file locations and allocation tables.
The allocations in the special class are dedicated to specific block types.
By default, this includes all metadata, the indirect blocks of user data, and any deduplication tables.
The class can also be provisioned to accept small file blocks.
This is a great use case for high-performance but smaller-sized solid-state storage.
Using a special vdev drastically speeds up random I/O and cuts the average spinning-disk I/Os needed to find and access a file by up to half.
Creating a Fusion Pool
Go to Storage Dashboard, click Create Pool.
A pool must always have one normal (non-dedup/special) VDEV before you assign other devices to the special class.
Enter a name for the pool using up to 50 lower case alpha-numeric and permitted special characters that conform to ZFS naming conventions.
The pool name contributes to the maximum character length for datasets, so it is limited to 50 characters.
Click ADD VDEV and select Metadata to add the VDEV to the pool layout.
Add disks to the primary Data VDevs, then to the Metadata VDEV.
Add SSDs to the new Metadata VDev and select the same layout as the Data VDevs.
The metadata special VDEV is critical for pool operation and data integrity, so you must protect it with hot spare(s).
When using SSDs with an internal cache, add an uninterruptible power supply (UPS) to the system to help minimize the risk from power loss.
Using special VDEVs identical to the data VDEVs (so they can use the same hot spares) is recommended, but for performance reasons, you can make a different type of VDEV (like a mirror of SSDs).
In that case, you must provide hot spare(s) for that drive type as well. Otherwise, if the special VDEV fails and there is no redundancy, the pool becomes corrupted and prevents access to stored data.
Drives added to a metadata VDEV cannot be removed from the pool.
When more than one metadata VDEV is created, then allocations are load-balanced between all these devices.
If the special class becomes full, then allocations spill back into the normal class.
After you create the fusion pool, the Status shows a Special section with the metadata SSDs.
This article provides information on the disk_resize command in SCALE.
Over-provisioning SLOG SSDs is useful for different scenarios.
The most useful benefit of over-provisioning is greatly extending SSD life.
Over-provisioning an SSD distributes the total number of writes and erases across more flash blocks on the drive.
This article provides instructions on viewing and edting ACL permissions, using the ACL editor screens, and general information on ACLs.
3.2.1 - Adding and Managing Datasets
This article provides instructions on creating and managing datasets.
A TrueNAS dataset is a file system within a data storage pool.
Datasets can contain files, directories (child datasets), and have individual permissions or flags.
Datasets can also be encrypted, either using the encryption created with the pool or with a separate encryption configuration.
We recommend organizing your pool with datasets before configuring data sharing, as this allows for more fine-tuning of access permissions and using different sharing protocols.
Creating a Generic Dataset
To create a dataset using the default settings, go to Storage. Default settings includes settings datasets inherit from the parent dataset.
Select a dataset, pool (root) dataset or a child dataset, click the and then select Add Dataset.
Enter a name and click Save.
Creating Custom Datasets
You can create datasets optimized for SMB shares or with customized settings for your dataset use cases.
Review the Share Type and Case Sensitivity options on the configuration screen before clicking Save.
You cannot change these settings and the Name setting after clicking Save.
Setting Dataset Compression Levels
Compression encodes information in less space than the original data occupies.
We recommended you choose a compression algorithm that balances disk performance with the amount of saved space.
Select the compression algorithm that best suits your needs from the Compression dropdown list of options.
LZ4 maximizes performance and dynamically identifies the best files to compress. LZ4 provides lightning-fast compression/decompression speeds and comes coupled with a high-speed decoder. This makes it one of the best Linux compression tools for enterprise customers.
ZSTD offers highly configurable compression speeds, with a very fast decoder.
Gzip is a standard UNIX compression tool widely used for Linux. It is compatible with every GNU software which makes it a good tool for remote engineers and seasoned Linux users. It offers the maximum compression with the greatest performance impact. The higher the compression level implemented the greater the impact on CPU usage levels. Use with caution especially at higher levels.
ZLE or Zero Length Encoding, leaves normal data alone but only compresses continuous runs of zeros.
LZJB compresses crash dumps and data in ZFS. LZJB is optimized for performance while providing decent compression. LZ4 compresses roughly 50% faster than LZJB when operating on compressible data, and is greater than three times faster for uncompressible data. LZJB was the original algorithm used by ZFS but it is now deprecated.
Setting Dataset Quotas
Click Advanced Options to see the dataset quota management tools.
Setting a quota defines the maximum allowed space for the dataset.
You can also reserve a defined amount of pool space to prevent automatically generated data like system logs from consuming all of the dataset space.
You can configure quotas for only the new dataset or include all child datasets.
Define the maximum allowed space for the dataset in either the Quota for this dataset. Enter 0 to disable quotas.
Dataset quota alerts are based on the percentage of used storage.
To set up a quota warning alert, enter a percentage value in Quota warning alert at, %.
When consumed space reaches the defined percentage it sends the alert.
To change the setting from the parent dataset warning level, clear the Inherit checkbox and then change the value.
To set up the quota critical level alerts, enter the percentage value in Quota critical alert at, %.
Clear the Inherit checkbox to change this value to something other than using the parent alert setting.
When setting quotas or changing the alert percentages for both the parent dataset and all child datasets, use the fields under This Dataset and Child Datasets.
Enter a value in Reserved space for this dataset to set aside additional space for datasets that contain logs which could eventually take all available free space.
Enter 0 for unlimited.
By default, many of dataset options inherit their values from the parent dataset.
When the Inherit checkbox is selected, whatever setting has this checkbox selected uses the settings from the parent dataset.
For example, the Storage Encryption settings.
To change any setting that can inherit the parent setting, clear the checkmark and then enter the desired setting values for the child dataset you are configuring.
Setting Datasets Access Controls
There are two Add Dataset or Edit Dataset screen ACL settings in the Advanced Options settings that you need to configure to use ACLs, ACL Type and ACL Mode.
You must select NFSv4 in ACL Type before you can change the ACL Mode setting. The system changes the ACL Mode setting if you select POSIX in ACL Type.
Leave the ACL Type Inherit checkbox selected to preserve the ACL type from the parent dataset. For SCALE, which is based on Linux, use either NFSv4 or POSIX.
Warning dialogs display after selecting either setting.
NFSv4 is richer than POSIX and is used to losslessly migrate Windows-style ACLs across Active Directory domains (or stand-alone servers).
POSIX ACLs are a Linux-specific ZFS feature, used when an organization data backup target does not support native NFSv4 ACLs.
Since the Linux platform used POSIX for a long time, many backup products that access the server outside the SMB protocol cannot understand or preserve native NFSv4 ACLs.
All datasets within an SMB share path must have identical ACL types
The ACL Mode setting determines how chmod behaves when adjusting file ACLs. See the zfs(8)aclmode property.
When ACL Type is set to NFSv4 you can select Passthrough to only update ACL entries related to the file or directory mode or Restricted which does not allow chmod to make changes to files or directories with a non-trivial ACL.
An ACL is trivial if it can be fully expressed as a file mode without losing any access rules.
When set to Restricted it optimizes a dataset for SMB sharing, but it can also require further optimizations. For example, configuring an rsync task with this dataset could require adding --no-perms in the task Auxiliary Parameters field.
For a more in-depth explanation of ACLs and configurations in TrueNAS SCALE, see our ACL Primer.
Use the Metadata (Special) Small Block Size setting to set a threshold block size for including small file blocks into the special allocation class (fusion pools).
Blocks smaller than or equal to this value are assigned to the special allocation class while greater blocks are assigned to the regular class.
Valid values are zero or a power of two from 512B up to 1M.
The default size 0 means no small file blocks are allocated in the special class.
Before setting this property, you must add a special class vdev to the pool.
Managing Datasets
After creating a dataset, users can manage additional options by going to Storage and clicking the dataset icon to display the Dataset Actions list. Each option is described in detail in the Storage Dashboard Screen article.
Editing a Dataset
Select Edit Options to change the dataset configuration settings. You can change all settings except Name, Case Sensitivity, or Share Type.
The Edit Dataset screen settings are identical to the Add Dataset screen.
Editing Dataset Permissions
Select View Permissions on the Dataset Actions list of options to open the Dataset Permissions widget.
Click mode_edit to display the Edit Permissions screen with the Unix Permissions Editor you use to configure ACLs.
For more information, see the permissions article.
Deleting a Dataset
Select Delete Dataset to remove the dataset, all stored data, and any snapshots from TrueNAS.
Deleting datasets can result in unrecoverable data loss!
Move or obsolete any critical data off the dataset before performing the delete operation.
This article provides instructions on creating, editing and managing zvols.
A ZFS Volume (zvol) is a dataset that represents a block device.
TrueNAS requires a zvol when configuring iSCSI Shares.
Adding a Zvol
To create a zvol in a pool, go to Storage and click on a pool root dataset or child dataset, then select Add Zvol.
To create a zvol with default options, enter a name and size for the zvol and click Save.
Managing Zvols
To see zvol options, click more_vert next to the desired zvol listed on the Storage screen:
Delete Zvol removes the zvol from TrueNAS. Deleting a zvol also deletes all snapshots of that zvol.
Deleting zvols can result in unrecoverable data loss!
Remove critical data from the zvol or verify it is obsolete before deleting a zvol.
Edit Zvol opens the Edit Zvol screen where you can change the saved settings. Name is read-only and you cannot change it.
Create Snapshot opens a dialog where you can take a single, current point-in-time snapshot image of the zvol and saves it to the Snapshots screen.
TrueNAS suggest a name and provides the option to include any child zvols of the selected zvol by selecting Recursive.
Cloning a Zvol from a Snapshot
If you clone a zvol from an existing snapshot, the cloned zvol that displays on the Storage screen includes the option to Promote Dataset on the Zvol Actions dropdown list. Click to promote the clone. A confirmation dialog displays.
After promoting a clone, the original volume becomes a clone of the promoted clone. Promoting a clone allows users to delete the volume that created the clone.
Otherwise, you cannot delete a clone while the original volume exists.
When a zvol is the child of an encrypted dataset, TrueNAS offers additional Encryption Actions.
This article provides information on ZFS importing for storage pools in TrueNAS SCALE. It also addresses GELI-encrypted pools.
ZFS pool importing works for pools that are exported or disconnected from the current system, those created on another system, and for pools you reconnect after reinstalling or upgrading the TrueNAS system.
The import procedure only applies to disks with a ZFS storage pool.
To import disks with different file systems, see the SCALE Managing Disks article.
When physically installing ZFS pool disks from another system, use the zpool export poolname command in the command line or a web interface equivalent to export the pool on that system.
Shut that system down and move the drives to the TrueNAS system.
Shutting down the original system prevents an in use by another machine error during the TrueNAS import.
To import a pool, go to the Storage Dashboard and click Import Pool at the top of the screen.
TrueNAS detects any pools that are present but unconnected and adds them to the Pools dropdown list.
Select a pool from the Pool dropdown list and click Import.
Since GELI encryption is specific to FreeBSD, TrueNAS SCALE cannot import GELI-encrypted pools.
See the Migrating GELI-encrypted Pools to SCALE section in the Installing SCALE article.
This article provides information on managing user and group quotas.
TrueNAS allows setting data or object quotas for user accounts and groups cached on or connected to the system. You can use the quota settings on the Add Dataset or Edit Dataset configuration screens in the Advanced Options settings to set up alarms and set aside more space in a dataset. See Adding and Managing Datasets for more information.
Configuring User Quotas
Select User Quotas to set data or object quotas for user accounts cached on or connected to the system.
To view and edit user quotas, go to Storage and click next to a dataset to open the Dataset Actions menu, then select User Quotas.
The User Quotas page displays the names and quota data of any user accounts cached on or connected to the system.
To edit individual user quotas, go to the user row and click the expand_more icon to display a detailed individual user quota screen.
Click editEdit.
The Edit User window lets users edit the User Data Quota and User Object Quota values.
User Data Quota is the amount of disk space that selected users can use. User Object Quota is the number of objects selected users can own.
To edit user quotas in bulk, click Actions and select Set Quotas (Bulk).
The Set Quotas window lets you edit user data and object quotas after selecting any cached or connected users.
Configuring Group Quotas
Select Group Quotas to set data or object quotas for user groups cached on or connected to the system.
Go to Storage and click next to a dataset to open the Dataset Actions menu, then select Group Quotas.
The Group Quotas page displays the names and quota data of any groups cached on or connected to the system.
To edit individual group quotas, go to the group row and click expand_more icon, then click editEdit.
The Edit Group window lets users edit the Group Data Quota and Group Object Quota values.
To edit group quotas in bulk, click Actions and select Set Quotas (Bulk).
TrueNAS presents the same options for single groups and lets users choose groups for the new quota rules.
This article provides instructions on managing ZFS snapshots in TrueNAS Scale.
Snapshots are one of the most powerful features of ZFS.
A snapshot provides a read only point-in-time copy of a file system or volume.
This copy does not consume extra space in the ZFS pool.
The snapshot only records the differences between storage block references whenever the data is modified.
Snapshots keep a history of files and provide a way to recover an older or even deleted files.
For this reason, many administrators take regular snapshots, store them for some time, and copy them to a different system.
This strategy allows an administrator to roll the system data back to a specific point in time.
In the event of catastrophic system or disk failure, off-site snapshots can restore data up to the most recent snapshot.
Taking snapshots requires the system have all pools, datasets, and zvols already configured.
Creating a Snapshot
Consider making a Periodic Snapshot Task to save time and create regular, fresh snapshots.
This short video demonstrates manually adding a snapshot
Video Player is loading.
Current Time 0:00
/
Duration 0:28
Loaded: 7.82%
0:00
Stream Type LIVE
Remaining Time -0:28
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
From the Storage screen you can either and click Snapshots on the top right corner of the screen. Select Snapshots to display the Snapshots screen, or click on the more_vert for the dataset on the Pool Manager screen and select Create Snapshot to take a one-time snapshot of that dataset.
If you don’t have snapshots created, the Snapshots screen displays the Add Snapshots option in the center of the screen.
Click either Add Snapshots or ADD at the top right of the screen to open the Add Snapshot screen.
Select an existing ZFS pool, dataset, or zvol to snapshot option from the Dataset dropdown list.
Accept the name suggested by the TrueNAS software in the Name field ore enter any custom string to override the suggested name.
(Optional) Select an option from the Naming Schema dropdown list that the TrueNAS software populated with existing periodic snapshot task schemas.
If you select an option, TrueNAS generates a name for the snapshot using that naming schema from the selected Periodic Snapshot and replicates that snapshot.
You cannot enter a value in Naming Schema and in Name as selecting or entering a value in Naming Schema populates the other field.
(Optional) Select Recursive to include child datasets with the snapshot.
Click Save to create the snapshot.
Managing Snapshots
The Snapshots screen lists all snapshots created on the system. To manage snapshots, click the expand_more icon to expand the snapshot and display the options for managing that snapshot.
You can display more information in that table by clicking the settings icon. Click Show to display extra columns in the table. To hide the added columns, click the span class=“material-icons”>settings icon again and then click Hide.
Each snapshot entry in the list includes the dataset and snapshot names. Entries also display the snapshot numbers, the space they use, the date the system created them, and the amount of data the dataset can access.
Click expand_more to view snapshot options.
File Explorer he number of snapshots Windows presents to users. If TrueNAS responds with more than the File Explorer limit, File Explorer shows no available snapshots.
TrueNAS displays a dialog stating the dataset snapshot count has more snapshots than recommended, and states performance or functionality might degrade.
Deleting a Snapshot
The Delete option destroys the snapshot.
You must delete child clones before you can delete their parent snapshot.
While creating a snapshot is instantaneous, deleting one is I/O intensive and can take a long time, especially when deduplication is enabled.
ZFS has to review all allocated blocks before deletion to see if another process is using that block. If not used, the ZFS can free that block.
Click the Delete button. A confirmation dialog displays. Select Confirm to activate the Delete button.
Cloning to a New Dataset
The Clone to New Dataset option creates a new snapshot clone (dataset) from the snapshot contents.
A clone is a writable copy of the snapshot.
Because a clone is a mountable dataset, it appears in the Storage screen rather than the Snapshots screen.
By default, TrueNAS adds -clone to the new snapshot name when creating the clone.
A dialog prompts for the new dataset name.
The suggested name derives from the snapshot name.
Rollback
The Rollback option reverts the dataset back to the point in time saved by the snapshot.
Rollback is a dangerous operation that causes any configured replication tasks to fail.
Replications use the existing snapshot when doing an incremental backup, and rolling back can put the snapshots out-of-order.
To restore the data within a snapshot, the recommended steps are:
Clone the desired snapshot.
Share the clone with the share type or service running on the TrueNAS system.
Allow users to recover their needed data.
Delete the clone from Storage.
This approach does not destroy any on-disk data or impact replication.
TrueNAS asks for confirmation before rolling back to the chosen snapshot state. Select the radio button for how you want the rollback to operate.
Click Confirm to activate the Rollback button.
Deleting with Batch Operations
To delete multiple snapshots, select the left column box for each snapshot to include. Click the deleteDelete button that displays.
To search through the snapshots list by name, type a matching criteria into the searchFilter Snapshots text field.
The list now displays only the snapshot names that match the filter text.
Browsing a Snapshot Collection
Browsing a snapshot collection is an advanced capability that requires ZFS and command-line experience.
All dataset snapshots are accessible as an ordinary hierarchical file system, accessed from a hidden .zfs located at the root of every dataset.
A snapshot and any files it contains are not accessible or searchable if the snapshot mount path is longer than 88 characters.
The data within the snapshot is safe but to make the snapshot accessible again shorten the mount path.
A user with permission to access the hidden file can view and explore all snapshots for a dataset from the Shell or the Shares screen using services like SMB, NFS, and SFTP.
In summary, the main required changes to settings are:
In dataset properties, change the ZFS properties to enable snapshot visibility.
In the Samba auxiliary settings, change the veto files command to not hide the .zfs, and add the setting zfsacl:expose_snapdir=true.
The effect is that any user who can access the dataset contents can view the list of snapshots by going to the dataset .zfs directory.
Users can browse and search any files they have permission to access throughout the entire dataset snapshot collection.
When creating a snapshot, permissions or ACLs set on files within that snapshot might limit access to the files.
Snapshots are read-only, so users do not have permission to modify a snapshot or its files, even if they had write permissions when creating the snapshot.
The zfs diff ZFS command, which can run in the Shell, lists all changed files between any two snapshot versions within a dataset, or between any snapshot and the current data.
This article provides information on SCALE storage encryption for pools, datasets and zvols.
TrueNAS SCALE offers ZFS encryption for your sensitive data in pools and datasets or zvols.
Users are responsible for backing up and securing encryption keys and passphrases!
Losing the ability to decrypt data is similar to a catastrophic data loss.
The local TrueNAS system manages keys for data-at-rest.
Users are responsible for storing and securing their keys.
TrueNAS SCALE includes the Key Management Interface Protocol (KMIP).
Pool Encryption
Encryption is for users storing sensitive data.
Pool-level encryption does NOT apply to the storage pool or the disks in the pool.
It only applies to the root dataset that shares the same name as the pool.
Child datasets, or zvols, inherit encryption from the parent dataset unless you overwrite encryption when creating the child datasets or zvols.
Every pool has a root dataset that TrueNAS automatically generates when you create the pool.
This root dataset indicates the encryption status for the pool based on whether you select the Encryption option on the Pool Manager screen when you create the pool.
If you select the Encryption option for the pool, it forces encryption for all datasets, zvols, and data contained in that pool, since they inherit encryption from the parent.
If your system loses power or you reboot the system, the datasets, zvols, and all data in an encrypted pool automatically lock to protect the data in that encrypted pool.
The pool and root dataset are unencrypted if you do not select the Encryption option on the Pool Manager screen.
You can create an unencrypted dataset on an encrypted pool. You can also create an encrypted dataset on an unencrypted pool if you need to protect data with encryption.
If you add an encrypted dataset under an unencrypted root dataset and then add child datasets under that encrypted dataset, it becomes an encrypted non-root parent to any dataset created under it.
You can let a nested child dataset inherit the encryption settings from the parent or change the settings for the child dataset.
The other datasets created from the unencrypted root dataset can remain unencrypted unless you choose encryption when you create them.
Encryption Visual Cues
Dataset encryption can be visually confusing in SCALE.
SCALE uses different lock-type icons to indicate the encryption state of a root, parent, or child dataset in the tree table on the Datasets screen.
Each icon displays text labels that explain the state of the dataset when you hover the mouse over the icon.
The Datasets tree table includes lock icons and descriptions that indicate the encryption state of datasets.
Icon
State
Description
Locked
Displays for locked encrypted root, non-root parent and child datasets.
Unlocked
Displays for unlocked encrypted root, non-root parent and child datasets.
Locked by ancestor
Displays for locked datasets that inherit encryption properties from the parent.
Unlocked by ancestor
Displays for unlocked datasets that inherit encryption properties from the parent.
If a dataset inherits encryption from either the root or a non-root parent dataset, the locking icons change to a different type, and the mouse hover-over label indicates the encryption is Locked by ancestor or Unlocked by ancestor.
Each encrypted dataset includes the ZFS Encryption widget on the Datasets screen when you select the dataset.
The dataset encryption state is unlocked until you lock it using the Lock option on the ZFS Encryption widget. After locking the dataset, the icon on the tree table changes to the locked version and the ZFS Encryption widget displays the Unlock option.
Inherit Encryption
Datasets inherit encryption, which means they use the encryption settings of the parent, whether the parent is the root dataset or a non-root parent dataset with child datasets nested under it.
You can change inherited settings for a dataset when you add the dataset, or you can change inherited encryption settings for an existing dataset using the Edit option on the ZFS Encryption widget.
Implementing Encryption
Before creating a pool with encryption make sure you want to encrypt all datasets and data stored on the pool.
You cannot change a pool from encrypted to non-encrypted. You can only change the dataset encryption type in the encrypted pool.
If your system does not have enough disks to allow you to create a second storage pool, we recommend that you not use encryption at the pool level.
You can mix encrypted and unencrypted datasets on an unencrypted pool.
All pool-level encryption is key-based encryption. When prompted, download the encryption key and keep it stored in a safe place where you can back up the file.
You cannot use passphrase encryption at the pool level.
Adding Encryption to a New Pool
Go to Storage and click Create Pool on the Storage Dashboard screen. You can also click Add to Pool on the Unassigned Disks widget and select the Add to New radio button to open the Pool Manager screen.
Enter a name for the pool, then add the disks to the Data VDEV. Select Encryption next to Name.
A warning dialog displays.
Read the warning, select Confirm, and then click I UNDERSTAND.
A second dialog opens where you click Download Encryption Key for the pool encryption key.
Click Done to close the window.
Move the encryption key to safe location where you can back up the file.
Click Save to create the pool with encryption.
Adding Encryption to a New Dataset
To add encryption to a new dataset, go to Datasets.
First, select the root or other dataset on the tree table where you want to add a dataset.
The default dataset selected when you open the Datasets screen is the root dataset of the first pool on the tree table list.
If you have more than one pool and want to create a dataset in a pool other than the default, select the root dataset for that pool or any dataset under the root where you want to add the new dataset.
Click Add Dataset to open the Add Dataset screen.
To add a dataset, enter a value in Name.
Next, select the type of Case Sensitivity and Share Type for the dataset.
To add encyrption to a dataset, select Inherit under Encryption Options to clear the checkbox.
This displays the Encryption checkbox preselected.
Now decide if you want to use the default encryption type key and if you want to let the system generate the encryption key.
To use key encryption and your own key, clear the Generate key checkbox to display the Key field. Enter your key in this field.
To change to passphrase encryption, click the down arrow and select Passphrase from the Encryption Type dropdown.
You can select the encryption algorithm to use from the Encryption Standard dropdown list of options or use the recommended default.
Leave the default selection if you do not have a particular encryption standard you want use.
Keep encryption keys and/or passphrases safeguarded in a secure and protected place.
Losing encryption keys or passphrases can result in permanent data loss!
Changing Dataset Encryption
You cannot add encryption to an existing dataset.
You can change the encryption type for an already encrypted dataset using the Edit option on the ZFS Encryption widget for the dataset.
Save any change to the encryption key or passphrase, and update your saved passcodes and keys file, and then back up that file.
To change the encryption type, go to Datasets:
Select the unlocked, encrypted dataset on the tree table, then click Edit on the ZFS Encryption widget.
The Edit Encryption Options dialog for the selected dataset displays.
You must unlock a locked encrypted dataset before you can make changes.
If the dataset inherits encryption settings from a parent dataset, to change this, clear the Inherit encryption properties from parent checkbox to display the key type encryption setting options.
Change the encryption settings. Key type options are to change the type from Key to Passphrase or from a generated to a manually-entered encryption key.
After clearing the Inherits encryption properties from parent the default settings display with Encryption Type set to Key and Generate Key pre-selected.
To manually enter an encryption key, select Generate Key to clear the checkmark and display the Key field. Enter the new key in this field.
(Optional) Change the Encryption Type to Passphrase using the dropdown list of options.
The Passphrase and Confirm Passphrase fields and other passphrase encryption fields display.
Enter the passphrase twice. Use a complex passphrase that is not easy to guess. Store in a secure location subject to regular backups.
Leave the other settings at default, then click Confirm to activate Save.
Click Save. The window closes, the ZFS Encryption widget updates to reflect the changes made.
Locking and Unlocking Datasets
You can only lock and unlock an encrypted dataset if it is secured with a passphrase instead of a key file.
Before locking a dataset, verify that it is not currently in use.
Locking a Dataset
Select the dataset on the tree table, then click Lock on the ZFS Encryption widget to open the Lock Dataset dialog with the dataset full path name.
Use the Force unmount option only if you are certain no one is currently accessing the dataset.
Force unmount boots anyone using the dataset (e.g. someone accessing a share) so you can lock it.
Click Confirm to activate Lock, then click Lock.
You cannot use locked datasets.
Unlocking a Dataset
To unlock a dataset, go to Datasets then select the dataset on the tree table.
Click Unlock on the ZFS Encryption widget to open the Unlock Dataset screen.
Type the passphrase into Dataset Passphrase and click Save.
Select Unlock Child Encrypted Roots to unlock all locked child datasets if they use the same passphrase.
Select Force if the dataset mount path exists but is not empty. When this happens, the unlock operation fails. Using Force allows the system to rename the existing directory and file where the dataset should mount. This prevents the mount operation from failing.
A confirmation dialog displays.
Click CONTINUE to confirm you want to unlock the datasets. Click CLOSE to exit and keep the datasets locked.
A second confirmation dialog opens confirming the datasets unlocked.
Click CLOSE.
TrueNAS displays the dataset with the unlocked icon.
Encrypting a Zvol
Encryption is for securing sensitive data.
You can only encrypting a zvol if you create the zvol from a dataset with encryption.
Users are responsible for backing up and securing encryption keys and passphrases!
Losing the ability to decrypt data is similar to a catastrophic data loss.
Zvols inherit encryption settings from the parent dataset.
To encrypt a zvol, select a dataset configured with encryption and then create a new zvol.
Next, click the more_vert icon to display the Zvol Actions options list and then click Encryption Options.
If you do not see Encryption Options on the Zvol Actions option list you created the zvol from an unencrypted dataset. Delete the zvol and start over.
Click Encryption Options. The Edit Encryption Options dialog for the Zvol displays with Inherit encryption properties from parent selected.
If not making changes, click Confirm, and then click Save.
The zvol is encrypted with settings inherited from its parent.
To change inherited encryption properties, clear the Inherit encryption properties from parent checkbox. The current encryption settings display. You can change from key to passphrase or change from a system-generated key to one of your choosing.
If Encryption Type is set toKey, type an encryption key into the Key field or select Generate Key.
If using Passphrase, it should be at least eight characters long. Use a passphrase complex enough to not easily guess.
After making any changes, select Confirm, and then click Save.
Save any change to the encryption key or passphrase, update your saved passcodes and keys file, and back up the file.
Managing Encryption Credentials
There are two ways to manage the encryption credentials, with a key file or passphrase.
Creating a new encrypted pool automatically generates a new key file and prompts users to download it.
Always back up the key file to a safe and secure location.
To manually back up a root dataset key file, click the icon to display the Pool Actions list of options, and select Export Dataset Keys.
The keys download to your system.
To change the key, click more_vert for the dataset, and then click Encryption Options.
A passphrase is a user-defined string at least eight characters long that is required to decrypt the dataset.
The pbkdf2iters is the number of password-based key derivation function 2 (PBKDF2) iterations to use for reducing vulnerability to brute-force attacks. Users must enter a number greater than 100000.
Unlocking a Replicated Encrypted Dataset or Zvol Without a Passphrase
TrueNAS SCALE users should either replicate the dataset/Zvol without properties to disable encryption at the remote end or construct a special json manifest to unlock each child dataset/zvol with a unique key.
Method 1: Construct JSON Manifest.
Replicate every encrypted dataset you want to replicate with properties.
Export key for every child dataset that has a unique key.
For each child dataset construct a proper json with poolname/datasetname of the destination system and key from the source system like this:
{"tank/share01": "57112db4be777d93fa7b76138a68b790d46d6858569bf9d13e32eb9fda72146b"}
Save this file with the extension .json.
On the remote system, unlock the dataset(s) using properly constructed json files.
Method 2: Replicate Encrypted Dataset/zvol Without Properties.
Uncheck properties when replicating so that the destination dataset is not encrypted on the remote side and does not require a key to unlock.
Go to Data Protection and click ADD in the Replication Tasks window.
Click Advanced Replication Creation.
Fill out the form as needed and make sure Include Dataset Properties is NOT checked.
Click Save.
Method 3: Replicate Key Encrypted Dataset/zvol.
Go to Datasets on the system you are replicating from.
Select the dataset encrypted with a key, then click Export Key on the ZFS Encryption widget to export the key for the dataset.
Apply the JSON key file or key code to the dataset on the system you replicated the dataset to.
Option 1: Download the key file and open it in a text editor. Change the pool name/dataset part of the string to the pool name/dataset for the receiving system. For example, replicating from tank1/dataset1 on the replicate-from system to tank2/dataset2 on the replicate-to system.
Option 2: Copy the key code provided in the Key for dataset window.
On the system receiving the replicated pool/dataset, select the receiving dataset and click Unlock.
Unlock the dataset.
Either clear the Unlock with Key file checkbox, paste the key code into the Dataset Key field (if there is a space character at the end of the key, delete the space), or select the downloaded Key file that you edited.
Click Save.
Click Continue.
3.2.7 - Setting Up Permissions
This article provides instructions on viewing and edting ACL permissions, using the ACL editor screens, and general information on ACLs.
TrueNAS SCALE provides basic permissions settings and a full Access Control List (ACL) editor to define dataset permissions.
ACL permissions control the actions users can perform on dataset contents.
An Access Control List (ACL) is a set of account permissions associated with a dataset and applied to directories or files within that dataset.
TrueNAS uses ACLs to manage user interactions with shared datasets and creates them when users add a dataset to a pool.
ACL Types in SCALE
TrueNAS SCALE offers two ACL types: POSIX which is the SCALE default, and NFSv4.
For a more in-depth explanation of ACLs and configurations in TrueNAS SCALE, see our ACL Primer.
Viewing Permissions
Basic ACL permissions are viewable and configurable on both the Add Dataset and Edit Dataset screens. Click Advanced Options to access the ACL Type and ACL Mode settings.
Advanced ACL permissions are viewable on the Dataset Permissions widget, but only editable for non-root datasets.
Editing Basic ACL Settings
Click the more_vert icon to display the Dataset Actions list of options, and then click Add Dataset to open the Add Dataset configuration screen, or click Edit Options to open the Edit Dataset configuration screen.
Click Advanced Options and scroll down to the ACL Type and ACL Mode settings.
First, select the ACL Type from the dropdown list. The option selected changes the ACL Mode setting.
Editing ACL Permissions
You can view permissions for any dataset but the edit option only displays on the Dataset Permissions widget for non-root datasets.
Configuring advanced permissions overrides basic permissions configured on the add and edit dataset screens.
Click the more_vert icon to display the Dataset Actions list of options for a non-root dataset, and then click View Permissions.
Click the editEdit icon. The Edit Permissions screen displays with the Unix Permissions Editor configuration settings.
Enter or select the user from the dropdown list, set the read/write/execute permissions, and then select Apply User.
The options include users created manually or imported from a directory service. Click Apply User to confirm changes.
To prevent errors, TrueNAS only submits changes when selected.
A common misconfiguration is removing the Execute permission from a dataset that is a parent to other child datasets.
Removing this permission results lost access to the path.
Next enter or select the group from the dropdown list, set the read/write/execute permissions, and then select Apply Group.
The options include groups created manually or imported from a directory service. Click Apply Group to confirm changes.
To prevent errors, TrueNAS only submits changes when selected.
If you want to apply these settings to all child datasets, select Apply permissions recursively.
Click Save if you do not want to use an ACL preset.
Configuring an ACL Preset (NFSv4 ACL)
WARNING: Changing the ACL type affects how TrueNAS writes and reads on-disk ZFS ACL.
When the ACL type changes from POSIX to NFSv4, internal ZFS ACLs do not migrate by default, and access ACLs encoded in posix1e extended attributes convert to native ZFS ACLs.
When the ACL type changes from NFSv4 to POSIX, native ZFS ACLs do not convert to posix1e extended attributes, but ZFS will use the native ACL for access checks.
To prevent unexpected permissions behavior, you must manually set new dataset ACLs recursively after changing the ACL type.
Setting new ACLs recursively is destructive. We suggest creating a ZFS snapshot of the dataset before changing the ACL type or modifying permissions.
An ACL preset loads NFS4 pre-configured permissions to match general permissions situations.
From the Unix Permissions Editor configuration screen, click Set ACL to configure advanced NFS4 permissions. The If you want to use an ACL preset, click Set ACL. The Edit ACL screen displays with the Select a preset ACL dialog as the first step.
Click the Select a present ACL radio button to use a pre-configured set of permissions, and then select the preset you want to use from the Default ACL Options dropdown list, or click Create a custom ACL to configure your own set of permissions.
Click Continue.
Each default preset loads different permissions to the Edit ACL screen. The Create a custom preset opens the Edit ACL screen with no default permission settings.
First select or type the name of the user in Owner. The owner controls which TrueNAS user and group has full control of this dataset.
Next select or type the name of the group in Owner Group.
Select the Who ACE value from the dropdown list and then select the Permissions.
If you select User or Group you then select the name from User or Group.
See nfs4_setfacl(1) NFSv4 ACL ENTRIES.
Whatever you select in Who highlights the Access Control List entry on the left side of the screen.
Select Flags to specify how this ACE applies to newly created directories and files within the dataset.
Basic flags enable or disable ACE inheritance.
Advanced flags allow further control of how the ACE applies to files and directories in the dataset.
If you want to apply this preset to all child datasets select Apply permissions recursively.
To add another item to your ACL, click Add Item. To display the ACL presets window, click Use ACL Preset.
Click Save Access Control List when you finish configuring settings for the user or group in the Who field.
To view ACL information from the console, go to System Settings > Shell and enter:
This article provides instructions for creating ZFS snapshots when using TrueNAS as a VMWare datastore.
You must power on virtual machines for TrueNAS to copy snapshots to VMware.
The temporary VMware snapshots deleted on the VMware side still exist in the ZFS snapshot and are available as stable restore points.
These coordinated snapshots go in the Snapshots list.
Use this procedure to create ZFS snapshots when using TrueNAS SCALE as a VMWare datastore. VMware-Snapshots coordinate ZFS snapshots when using TrueNAS as a VMware datastore.
When creating a ZFS snapshot, TrueNAS SCALE automatically takes a snapshot of any running VMWare virtual machine before taking a scheduled or manual ZFS snapshot of the data or zvol backing that VMWare datastore.
You must have a paid-edition for VMWare ESXi to use the TrueNAS SCALE VMWare-snapshots feature.
If you try to use them with the free-edition of VMware ESXi, you see this error message: “Error, Can’t create snapshot, current license or ESXi version prohibits execution of the requested operation.”
ESXi free has a locked (read-only) API that prevents using TrueNAS SCALE VMWare-snapshots.
The cheapest ESXi edition that is compatible with TrueNAS VMware-shapshots is VMWare vSphere Essentials Kit.
Creating a VMWare Snapshot
Go to Storage and click the Snapshots button at the top right of the screen. Select VMware-Snapshots on the dropdown list.
You must follow the exact sequence to add the VMware snapshot or the ZFS Filesystem and Datastore fields do not populate with options available on your system.
If you click in ZFS Filestore* or **Datastores** before you click **Fetch Datastores** the creation process fails, the two fields do not populate with the information from the VMWare host and you must exit the add form or click **Cancel** and start again.
Enter the IP address or host name for your VMWare system in Hostname.
Enter the user on the VMware host with permission to snapshot virtual machine for VMWare in Username and the the password for that account in Password.
Click Fetch Datastores. This connects TrueNAS SCALE to the VMWare host and populates the ZFS Filesystem and Datastore dropdown fields with the host response.
Select the file system from the ZFS Filesystem dropdown list of options.
Select the datastore from the Datastore dropdown list of options.
Click Save.
Copying TrueNAS SCALE Snapshots to VMWare
You must power on virtual machines before you can copy TrueNAS SCALE snapshots to VMWare.
The temporary VMWare snapshots deleted on the VMWare side still exist in the ZFS snapshot and are available as stable restore points.
Thes coordinated snapshots go on the list found on the Storage > Snapshots screen.
3.4 - Installing and Managing Self-Encrypting Drives
This article covers self-encrypting drives, including supported specifications, implementing and managing SEDs in TrueNAS, and managing SED passwords and data.
Supported Specifications
Legacy interface for older ATA devices (Not recommended for security-critical environments!)
TCG Pyrite Version 1 and
Version 2 are similar to Opalite, but with hardware encryption removed
Pyrite provides a logical equivalent of the legacy ATA security for non-ATA devices. Only the drive firmware protects the device.
Pyrite Version 1 SEDs do not have PSID support and can become unusable if the password is lost.
TCG Enterprise designed for systems with many data disks
These SEDs cannot unlock before the operating system boots.
See this Trusted Computing Group and NVM Express® joint white paper for more details about these specifications.
TrueNAS Implementation
TrueNAS implements the security capabilities of camcontrol for legacy devices and sedutil-cli for TCG devices.
When managing a SED from the command line, it is recommended to use the sedhelper wrapper script for sedutil-cli to ease SED administration and unlock the full capabilities of the device. See provided examples of using these commands to identify and deploy SEDs below.
You can configure a SED before or after assigning the device to a pool.
By default, SEDs are not locked until the administrator takes ownership of them. Ownership is taken by explicitly configuring a global or per-device password in the web interface and adding the password to the SEDs. Adding SED passwords in the web interface also allows TrueNAS to automatically unlock SEDs.
A password-protected SED protects the data stored on the device when the device is physically removed from the system. This allows secure disposal of the device without having to first wipe the contents. Repurposing a SED on another system requires the SED password.
For TrueNAS High Availability (HA) systems, SED drives only unlock on the active controller!
Deploying SEDs
Enter command sedutil-cli --scan in the Shell to detect and list devices. The second column of the results identifies the drive type:
Character
Standard
no
non-SED device
1
Opal V1
2
Opal V2
E
Enterprise
L
Opalite
p
Pyrite V1
P
Pyrite V2
r
Ruby
Example:
root@truenas1:~ # sedutil-cli --scan
Scanning for Opal compliant disks
/dev/ada0 No 32GB SATA Flash Drive SFDK003L
/dev/ada1 No 32GB SATA Flash Drive SFDK003L
/dev/da0 No HGST HUS726020AL4210 A7J0
/dev/da1 No HGST HUS726020AL4210 A7J0
/dev/da10 E WDC WUSTR1519ASS201 B925
/dev/da11 E WDC WUSTR1519ASS201 B925
TrueNAS supports setting a global password for all detected SEDs or setting individual passwords for each SED. Using a global password for all SEDs is strongly recommended to simplify deployment and avoid maintaining separate passwords for each SED.
Setting a Global Password for SEDs
Go to System Settings > Advanced > Self-Encrypting Drive and click Configure. A warning displays stating Changing Advanced settings can be dangerous when done incorrectly. Please use caution before saving. Click Close to display the settings form. Enter the password in SED Password and Confirm SED Password and click Save.
Record this password and store it in a safe place!
Now configure the SEDs with this password. Go to the Shell and enter command sedhelper setup <password>, where <password> is the global password entered in System > Advanced > SED Password.
sedhelper ensures that all detected SEDs are properly configured to use the provided password:
Rerun command sedhelper setup <password> every time a new SED is placed in the system to apply the global password to the new SED.
Creating Separate Passwords for Each SED
Go to Storage click the Disks dropdown in the top right of the screen and select Disks. From the Disks screen, click the expand_more for the confirmed SED, then Edit. Enter and confirm the password in the SED Password fields to override the global SED password.
You must configure the SED to use the new password. Go to the Shell and enter command sedhelper setup --disk <da1> <password>, where <da1> is the SED to configure and <password> is the created password from Storage > Disks > Edit Disks > SED Password.
Repeat this process for each SED and any SEDs added to the system in the future.
Remember SED passwords! If you lose the SED password, you cannot unlock SEDs or access their data.
After configuring or modifying SED passwords, always record and store them in a secure place!
Check SED Functionality
When SED devices are detected during system boot, TrueNAS checks for configured global and device-specific passwords.
Unlocking SEDs allows a pool to contain a mix of SED and non-SED devices. Devices with individual passwords are unlocked with their password. Devices without a device-specific password are unlocked using the global password.
To verify SED locking is working correctly, go to the Shell. Enter command sedutil-cli --listLockingRange 0 <password> <dev/da1>, where <dev/da1> is the SED and <password> is the global or individual password for that SED. The command returns ReadLockEnabled: 1, WriteLockEnabled: 1, and LockOnReset: 1 for drives with locking enabled:
This section contains command line instructions to manage SED passwords and data. The command used is sedutil-cli(8).
Most SEDs are TCG-E (Enterprise) or TCG-Opal (Opal v2.0).
Commands are different for the different drive types, so the first step is to identify the type in use.
These commands can be destructive to data and passwords. Keep backups and use the commands with caution.
Check SED version on a single drive, /dev/da0 in this example:
root@truenas:~ # sedutil-cli --isValidSED /dev/da0
/dev/da0 SED --E--- Micron_5N/A U402
To check all connected disks at once:
root@truenas:~ # sedutil-cli --scan
Scanning for Opal compliant disks
/dev/ada0 No 32GB SATA Flash Drive SFDK003L
/dev/ada1 No 32GB SATA Flash Drive SFDK003L
/dev/da0 E Micron_5N/A U402
/dev/da1 E Micron_5N/A U402
/dev/da12 E SEAGATE XS3840TE70014 0103
/dev/da13 E SEAGATE XS3840TE70014 0103
/dev/da14 E SEAGATE XS3840TE70014 0103
/dev/da2 E Micron_5N/A U402
/dev/da3 E Micron_5N/A U402
/dev/da4 E Micron_5N/A U402
/dev/da5 E Micron_5N/A U402
/dev/da6 E Micron_5N/A U402
/dev/da9 E Micron_5N/A U402
No more disks present ending scan
root@truenas:~ #
Reset the password without losing data with command:
Wipe data and reset password using the PSID with this command:
sedutil-cli --yesIreallywanttoERASEALLmydatausingthePSID <PSINODASHED> </dev/device> where is the PSID located on the pysical drive with no dashes (-).
Changing or Resetting the Password without Destroying Data
Run these commands for every LockingRange or band on the drive.
To determine the number of bands on a drive, use command sedutil-cli -v --listLockingRanges </dev/device>.
Increment the BandMaster number and rerun the command with --setPassword for every band that exists.
Use all of these commands to reset the password without losing data:
The Data Protection section allows users to set up multiple reduntant tasks that will protect and/or backup data in case of drive failure.
Scrub Tasks and S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) Tests can provide early disk failure alerts by identifying data integrity problems and detecting various indicators of drive reliability.
Cloud Sync, Periodic Snapshot, Rsync, and Replication Tasks, provide backup storage for data and allow users to revert the system to a previous configuration or point in time.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
4.1 - Adding Replication Tasks
To streamline creating simple replication tasks use the Replication Wizard. The wizard assists with creating a new SSH connection and automatically creates a periodic snapshot task for sources that have no existing snapshots.
Before You Begin
Configure SSH in TrueNAS before creating a remote replication task. This ensures that new snapshots are regularly available for replication.
Setting Up Simple Replications
Data Protection > Replication Tasks
Choose sources for snapshot replication.
Remote sources require an SSH connection.
TrueNAS shows the number of snapshots available to replicate.
Define the snapshot destination.
A remote destination requires an SSH connection.
Choose a destination or define it manually by typing a path.
Adding a new name at the end of the path creates a new dataset.
Choose replication security.
iXsystems always recommend replication with encryption.
Disabling encryption is only meant for absolutely secure and trusted destinations.
Schedule the replication.
You can schedule standardized presets or a custom-defined schedule.
Running once runs the replication immediately after creation.
Task is still saved and you can rerun or edit it.
Choose how long to keep the replicated snapshots.
This video tutorial presents a simple example of setting up replication:
Video Player is loading.
Current Time 0:00
/
Duration 1:04
Loaded: 3.45%
0:00
Stream Type LIVE
Remaining Time -1:04
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
This article provides instruction on running scrub and resilver tasks.
When TrueNAS performs a scrub, ZFS scans the data on a pool.
Scrubs identify data integrity problems, detect silent data corruptions caused by transient hardware issues, and provide early disk failure alerts.
Default Scrub Tasks
TrueNAS generates a default scrub task when you create a new pool and sets it to run every Sunday at 12:00 AM.
Adjust Scrub/Resilver Priority
To schedule a new resilver task to run at a higher priority, select the hour and minutes from the Begin dropdown list.
To schedule a new resilver task to run at a lower priority to other processes, select the hour and minutes from the End dropdown list. Running at a lower priority is a slower process and takes longer to complete. Schedule this for times when your server is at its lowest demand level.
Creating New Scrub Tasks
TrueNAS needs at least one data pool to create scrub task.
To create a scrub task for a pool, go to Data Protection and click ADD in the Scrub Tasks window.
Select a preset schedule from the dropdown list or click Custom to create a new schedule for when to run a scrub task. Custom opens the Advanced Scheduler window.
Choosing a Presets option populates in the rest of the fields.
To customize a schedule, enter crontab values for the Minutes/Hours/Days.
These fields accept standard cron values.
The simplest option is to enter a single number in the field.
The task runs when the time value matches that number.
For example, entering 10 means that the job runs when the time is ten minutes past the hour.
An asterisk (*) means match all values.
You can set specific time ranges by entering hyphenated number values.
For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.
You can also enter lists of values.
Enter individual values separated by a comma (,).
For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).
A slash (/) designates a step value.
For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.
Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.
TrueNAS has an option to select which Months the task runs.
Leaving each month unset is the same as selecting every month.
The Days of Week schedules the task to run on specific days in addition to any listed days.
For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.
The Schedule Preview dipslays when the current settings mean the task runs.
Examples of CRON syntax
Syntax
Meaning
Examples
*
Every item.
* (minutes) = every minute of the hour. * (days) = every day.
*/N
Every Nth item.
*/15 (minutes) = every 15th minute of the hour. */3 (days) = every 3rd day. */3 (months) = every 3rd month.
Comma and hyphen/dash
Each stated item (comma) Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour. 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour. mon-fri (days) = every Monday to Friday inclusive (every weekday). mar,jun,sep,dec (months) = every March, June, September, December.
You can specify days of the month or days of the week.
TrueNAS lets users create flexible schedules using the available options. The table below has some examples:
Desired schedule
Values to enter
3 times a day (at midnight, 08:00 and 16:00)
months=*; days=*; hours=0/8 or 0,8,16; minutes=0 (Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pm
months=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 am
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to Friday
Note that this requires two tasks to achieve: (1) months=*; days=mon-fri; hours=8-18; minutes=*/15 (2) months=*; days=mon-fri; hours=19; minutes=0 We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
Editing Scrub Tasks
To edit a scrub, go to Data Protection and click the scrub task you want to edit.
This article provides instructions to add a cloud sync task, configure environment variables, run an unscheduled sync task, create a copy of a task with a reversed transfer mode, and troubleshoot common issues with some cloud storage providers.
This article provides instructions on adding Google Drives cloud credentials using **Add Cloud Credentials** and **Add Cloud Sync Task** screens. It also provides information on working with Google-created content.
This article provides instructions on how to set up an Storj cloud sync task, and how to configure a Storj-TrueNAS account to work with SCALE cloud credentials and cloud sync tasks.
4.3.1 - Adding Cloud Sync Tasks
This article provides instructions to add a cloud sync task, configure environment variables, run an unscheduled sync task, create a copy of a task with a reversed transfer mode, and troubleshoot common issues with some cloud storage providers.
TrueNAS can send, receive, or synchronize data with a cloud storage provider.
Cloud sync tasks allow for single-time transfers or recurring transfers on a schedule. They are an effective method to back up data to a remote location.
Using the cloud means data can go to a third-party commercial vendor not directly affiliated with iXsystems. You should fully understand vendor pricing policies and services before using them for cloud sync tasks.
iXsystems is not responsible for any charges incurred from using third-party vendors with the cloud sync feature.
TrueNAS supports major providers like Amazon S3, Google Cloud, and Microsoft Azure. It also supports many other vendors. To see the full list of supported vendors, go to Credentials > Backup Credentials > Cloud Credentials click Add and open the Provider dropdown list.
Cloud Sync Task Requirements
You must have all system storage configured and ready to receive or send data.
You must have a cloud storage provider account and location (like an Amazon S3 bucket).
You can create the cloud storage account credentials using Credentials > Backup Credentials > Cloud Credentials before creating the sync task or add it at the time you create the cloud sync task on Data Protection > Cloud Sync Task > Add Cloud Sync Task. See the Cloud Credentials article for instructions on adding a backup credential using cloud credentials.
Creating a Cloud Sync Task
Video Player is loading.
Current Time 0:00
/
Duration 1:13
Loaded: 1.40%
0:00
Stream Type LIVE
Remaining Time -1:13
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
To add a cloud sync task, go to Data Protection > Cloud Sync Tasks and click Add. The Add Cloud Sync Task configuration screen opens.
(Required) Type a memorable task description in Description.
Select an existing backup credential from the Credential dropdown list.
See Using Scripting and Environment Variables for more information on environment variables.
After you choose a cloud credential from the dropdown list, TrueNAS automatically validates access to that cloud sync provider.
Invalid credentials results in the following alert:
Click FIX CREDENTIAL opens the Credentials > Cloud Credentials > Edit Cloud Credentials screen for the cloud service selected in Credentials.
Check your provider credentials and update the applicable authentication fields on the Edit Cloud Credentials screen, and then click Verify Credential.
If TrueNAS successfully accesses the provider the system displays the The Credential is valid dialog.
Click Save and then return to Data Protection > Cloud Sync Tasks > Add to try again.
Troubleshooting Transfer Mode Problems
Sync keeps all the files identical between the two storage locations.
If the sync encounters an error, it does not delete files in the destination.
Syncing to a Backblaze B2 bucket does not delete files from the bucket, even when you deleted those files locally.
Instead, files are tagged with a version number or moved to a hidden state.
To automatically delete old or unwanted files from the bucket, adjust the Backblaze B2 Lifecycle Rules.
Amazon S3 Issues
Sync cannot delete files stored in Amazon S3 Glacier or S3 Glacier Deep Archive.
First restore these files by another means, like the Amazon S3 console.
Using Scripting and Environment Variables
Advanced users can write scripts that run immediately before or after the cloud sync task.
Using either the Add Cloud Sync Task or Edit Cloud Sync Task screens, enter environment variables to either the Pre-script or Post-script fields.
The Post-script field only runs when the cloud sync task succeeds.
General Environment Variables
CLOUD_SYNC_ID
CLOUD_SYNC_DESCRIPTION
CLOUD_SYNC_DIRECTION
CLOUD_SYNC_TRANSFER_MODE
CLOUD_SYNC_ENCRYPTION
CLOUD_SYNC_FILENAME_ENCRYPTION
CLOUD_SYNC_ENCRYPTION_PASSWORD
CLOUD_SYNC_ENCRYPTION_SALT
CLOUD_SYNC_SNAPSHOT
Provider-Specific Variables
There also are provider-specific variables like CLOUD_SYNC_CLIENT_ID or CLOUD_SYNC_TOKEN or CLOUD_SYNC_CHUNK_SIZE.
Remote storage settings:
CLOUD_SYNC_BUCKET
CLOUD_SYNC_FOLDER
Local storage settings:
CLOUD_SYNC_PATH
Running an Unscheduled Cloud Sync Task
Saved tasks activate according to their schedule or you can use the Run Now option the Cloud Sync Task widget.
To run the sync task before the saved schedule for the task, click on the cloud sync task to open the edit configuration screen for that task.
If not already cleared, select Enable below the Schedule field to clear the checkbox, and then click Save.
On the Cloud Sync Task widget, click the Run Nowplay_arrow button.
An in-progress cloud sync must finish before another can begin.
Stopping an in-progress task cancels the file transfer and requires starting the file transfer over.
To view logs about a running task, or its most recent run, click State.
Using Cloud Sync Task Restore
To create a new cloud sync task that uses the same options but reverses the data transfer, select history for an existing cloud sync on the Data Protection page. The Restore Cloud Sync Task window opens.
Enter a name in Description for this reversed task.
Select the Transfer Mode and then define the path for a storage location on TrueNAS scale for the transferred data.
Click Restore.
TrueNAS saves the restored cloud sync as another entry in Data protection > Cloud Sync Tasks.
If you set the restore destination to the source dataset, TrueNAS may alter ownership of the restored files to root. If root did not create the original files and you need them to have a different owner, you can recursively reset their ACL permissions through the GUI or run chown from the CLI.
This article provides instructions on adding Google Drives cloud credentials using Add Cloud Credentials and Add Cloud Sync Task screens. It also provides information on working with Google-created content.
Google Drive and G Suite are widely used tools for creating and sharing documents, spreadsheets, and presentations with team members.
While cloud-based tools have inherent backups and replications included by the cloud provider, certain users might require additional backup or archive capabilities.
For example, companies using G Suite for important work might be required to keep records for years, potentially beyond the scope of the G Suite subscription.
TrueNAS offers the ability to easily back up Google Drive by using the built-in cloud sync.
Setting up Google Drive Credentials
You can add Google Drive credentials using the Add Cloud Credentials screen accessed from the Credentials > Backup Credentials > Cloud Credentials screen, or you can add them when you create a cloud sync task using the Add Cloud Sync Task screen accessed from the Data Protection > Cloud Sycn Task screen.
Adding Google Drive Credentials Using Cloud Credentials
To set up a cloud credential, go to Credentials > Backup Credentials and click Add in the Cloud Credentials widget.
Enter a credential name.
Select Google Drive on the Provider dropdown list. The Google Drive authentication settings display on the screen.
Enter the Google Drive authentication settings.
a. Enter the Google Drive user name and password.
b. Click Log In To Provider. The Google Authentication window opens.
c. Click Proceed to open the Choose an Account window.
d. Select the email account to use. Google displays the Sign In window. Enter the password and click Next to enter the password. Click Next again.
Google might display a Verify it’s you window. Enter a phone number where Google can text an verification code, or you can click Try another way.
e. Click Allow on the TrueNAS wants to access your Google Account window. TrueNAS populates Access Token with the token Google provides.
Click Verify Credentials and wait for TrueNAS to display the verification dialog with verified status. Close the dialog.
Click Save.
The Cloud Credentials widget displays the new credentials. These are also available for cloud sync tasks to use.
Adding A Google Drive Cloud Sync Task
You must add the cloud credential on the Backup Credentials screen before you create the cloud sync task.
To add a cloud sync task, go to Data Protection > Cloud Sync Tasks and click Add. The Add Cloud Sync Task configuration screen opens.
(Required) Type a memorable task description in Description. For example, googledrivepush to represent the provider name and transfer direction.
Select your Google Drive credential on the Credential dropdown list to add a new backup credential.
Select the direction for the sync task.
PULL brings files from the cloud storage provider to the location specified in Directory/Files (this is the location on TrueNAS SCALE).
PUSH sends files from the location in Directory/Files to the cloud storage provider location you specify in Folder.
Select the transfer method from the Transfer Mode dropdown list.
Sync keeps files identical on both TrueNAS SCALE and the remote cloud provider server. If the sync encounters an error, destination server files are not deleted.
Copy duplicates files on both the TrueNAS SCALE and remote cloud provider server.
Move transfer the files to the destination server and then deleted the copy on server that transferred the files. It also overwrites files with the same names on the destination.
Enter or browse to the dataset or folder directory using the arrow_right arrow to the left of folder/ under the Directory/Files and Folder fields.
Select the TrueNAS SCALE dataset path in Directory/Files and the Google Drive path in Folder.
If PUSH is the selected Direction, this is where on TrueNAS SCALE the files you want to copy, sync or move transfer to the provider.
If Direction is set to PULL this is the location where on TrueNAS SCALE you want to copy, sync or move files to.
Click the arrow_right to the left of folder/ to collapse the folder tree.
Select the preset from the Schedule dropdown that defines when the task runs.
For a specific schedule, select Custom and use the Advanced Scheduler.
Clear the Enable checkbox to make the configuration available without allowing the specified schedule to run the task.
To manually activate a saved task, go to Data Protection > Cloud Sync Tasks, click for the cloud sync task you want to run. Click CONTINUE or CANCEL for the Run Now operation.
(Optional) Set any advanced option you want or need for your use case or define environment variables in either the Pre-script or Post-script fields.
These fields are for advanced users.
Click then click Dry Run to test your settings before you click Save.
TrueNAS connects to the cloud storage provider and simulates a file transfer but does not send or receive data.
The new cloud sync task displays on the Cloud Sync Tasks widget with the status of PENDING until it completes.
If the task completes without issue the status becomes SUCCESS.
See Using Scripting and Environment Variables for more information on environment variables.
Working with Google Created Content
One caveat is that Google Docs and other files created with Google tools have their own proprietary set of permissions and their read/write characteristics unknown to the system over a standard file share. Files are unreadable as a result.
To allow Google-created files to become readable, allow link sharing to access the files before the backup. Doing so ensures that other users can open the files with read access, make changes, and then save them as another file if further edits are needed. Note that this is only necessary if the file was created using Google Docs, Google Sheets, or Google Slides; other files should not require modification of their share settings.
TrueNAS is perfect for storing content, including cloud-based content, for the long term. Not only is it simple to sync and backup from the cloud, but users can rest assured that their data is safe, with snapshots, copy-on-write, and built-in replication functionality.
4.3.3 - Adding a Storj Cloud Sync Task
This article provides instructions on how to set up an Storj cloud sync task, and how to configure a Storj-TrueNAS account to work with SCALE cloud credentials and cloud sync tasks.
TrueNAS can send, receive, or synchronize data with the cloud storage provider Storj.
Cloud sync tasks allow for single-time transfers or recurring transfers on a schedule. They are an effective method to back up data to a remote location.
To take advantage of the lower-cost benefits of the Storj-TrueNAS cloud service, you must create your Storj account using the link provided on the Add Cloud Credentials screen.
You must also create and authorize the storage buckets on Storj for use by SCALE.
iXsystems is not responsible for any charges incurred from using a third-party vendor with the cloud sync feature.
This procedure provides instructions to set up both Storj and SCALE.
TrueNAS supports major providers like Amazon S3, Google Cloud, and Microsoft Azure. It also supports many other vendors. To see the full list of supported vendors, go to Credentials > Backup Credentials > Cloud Credentials click Add and open the Provider dropdown list.
Cloud Sync Task Requirements
You must have all system storage (pool and datasets or zvols) configured and ready to receive or send data.
Creating a Storj Cloud Sync Task
To create your cloud sync task for a Storj-TrueNAS transfer you:
Adding the cloud credential in SCALE includes using the link to go create the Storj-TrueNAS account, create a new bucket and obtain the S3 authentication credentials you need to complete the process in SCALE.
In this section you add your cloud service credentials in SCALE and in Storj. This process includes going to Storj to create a new Storj-TrueNAS account and retuning to SCALE to enter the S3 credentials provided by Storj for this credential.
Go to Credentials > Backup Credentials and click Add on the Cloud Credentials widget.
The Add Cloud Credential screen opens with Storj displayed as the default provider in the Provider field.
Enter a descriptive name you want to identify this credential in the Name field.
Click Signup for account to create your Stor-TrueNAS account. This opens the Storj new account screen for TrueNAS.
You must use this link to create your Storj account for it to work with TrueNAS SCALE!
Enter the authentication information provided but Storj in the Acces Key ID and Secret Access Key fields.
Click Verify Credentials, and wait for the system to verify the credentials.
Click Save.
After completing this configuration form, you can set up the cloud sync task.
Creating the Storj-TrueNAS SCALE Account
Click Signup for account on the Add Cloud Credential screen. The Storj Sign In website opens.
Enter your information in the fields, select the I agree to the Terms of Service and Privacy Policy, then click Create an Ix-Storj Account.
Adding the Storj-TrueNAS Bucket
Now add the storage bucket to use in your Storj-TrueNAS account and to add in the SCALE cloud sync task.
From the Storj main dashboard:
Click Buckets on the navigation panel on the left side of the screen to open the Buckets screen.
Click New Bucket to open the Create a bucket window.
Enter a name in Bucket Name using lower case alphanumeric characters, with no spaces between characters, then click Continue to open the Encrypt your bucket window.
Select the encryption option you want to use. Select Generate passphrase to let Storj provide the encryption or select Enter Passphrase to enter your own.
If you already have a Storj account and want to use the same passphrase for your new bucket, select Enter Passphrase.
If you select Generate a passphrase Storj presents you with the option to download the encryption keys.
You must keep encryption keys stored in a safe place, and where you can back up the file.
Select I understand, and I have saved the passphrase then click Download.
Click Continue to complete the process and open the Buckets screen with your new bucket.
Setting up S3 Access to the Bucket
After creating your bucket, add S3 access for the new bucket(s) you want to use in your Storj-TrueNAS account and use in the SCALE cloud sync task.
Click Access to open the** Access Management** dashboard, then click **Create S3 Credentials** on the middle **S3 credentials** widget.
The Create Access window opens with Type set to S3 Credentials.
Enter the name you want to use for this credential. Our example uses the name of the bucket we created.
Select the permissions you want to allow this access from the Permissions dropdown, and select the bucket you want to have access to this credential from the dropdown list.
The example selected All for Permissions and selected the one bucket we created ixstorj1.
Select Add Date (optional) if you want to set the duration or length of time you want to allow this credential to exist.
This example set this to Forever. You can select a preset period of time or use the calendar to set the duration.
Click Encrypt My Access to open the Encryption Information dialog, then click Continue to open theSelect Encryption options window.
Select the encryption option you want to use.
Select Generate Passphrase to allow Storj to provide the encryption passphrase, or select Create My Own Passphrase to enter a passphrase of your choice.
Use Copy to Clipboard or Download.txt to obtain the Storj generated passphrase. Keep this passphrase along with the access keys in a safe place where you can back up the file.
If you lose your passphrase neither Storj or iXsystems can help you recover your stored data!
7 . Click Create my Access to obtain the access and secret keys. Use Download.txt to save these keys to a text file.
This completes the process of setting up your Storj buckets and S3 access. Enter these keys in the Authentication fields in TrueNAS SCALE on the Add Cloud Credential screen to complete setting up the SCALE cloud credential.
Setting Up the Storj Cloud Sync Task
To add the Storj cloud sync task, go to Data Protection > Cloud Sync Tasks:
Click Add to open the Add Cloud Sync Task screen.
(Required) Type a memorable task description in Description. You can use the the name of the Storj-TrueNAS bucket or credential you created as the name of the cloud sync task.
Select the Storj credential you just created from the Credential dropdown list.
Set the Direction and Transfer Mode you want to use.
Browse to the dataset or zvol you want to use on SCALE for data storage.
Select the bucket you just created in Storj from the Bucket dropdown list.
You only see the buckets you granted access to the S3 credential on this list. You cannot create a new bucket here in SCALE!
Set the task schedule when you want this task to run.
Click Save.
The task is added to the Cloud Sync Task widget with the Pending status until the task runs on schedule.
You can click Dry Run to test the task or Run Now to run the task now and apart from the scheduled time.
This article provides instructions on adding rsync tasks using either of two methods, one using an rsync module created in TrueNAS and the other using an SSH connection.
You often need to copy data to another system for backup or when migrating to a new system.
A fast and secure way of doing this is by using rsync.
These instructions assume that both sides of the rsync task, host and remote, use a TrueNAS systems.
Rsync Service and Modules
The rsync task does not work unless the related system service is turned on.
To turn the rsync service on, go to System > Services and toggle the Rsync on.
To activate the service whenever TrueNAS boots, select the Start Automatically checkbox.
Click the edit to configure the service on the
Services > RSYNC > Rsync screen.
There are two tabs for rsync configuration: basic Configure options and Rsync Module creation and management.
Rsync Basic Requirements
For an remote synch (rsync) task to work you need to first:
Create a dataset on both the TrueNAS and know the host and path to the data on the remote system you plan to sync with.
Create at least one rsync module in TrueNAS SCALE in Services > Rsync > Rsync Module
or
Create an SSH connection in Credentials > Backup Credentials > SSH Connections.
Turn on the rsync service on both the TrueNAS and in the remote server.
Rsync provides the ability to either push or pull data.
The Rsync Tasks task push function copies data from the TrueNAS host system to a remote system.
The Rsync Tasks task pull function moves or copies data from a remote system and puts on the TrueNAS host system.
The remote system must have the rsync service activated.
Creating an Rsync Task
Video Player is loading.
Current Time 0:00
/
Duration 0:43
Loaded: 2.64%
0:00
Stream Type LIVE
Remaining Time -0:43
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Go to Data Protection > Rsync Tasks and click Add to open the Add Rsync Task configuration screen.
Enter or use the arrow_right to the left of folder/mnt to browse to the path to copy.
Begin typing the user into the User field or select the user from the dropdown list. The user must have permissions to run an rsync on the remote server.
Select the direction. Select Pull to copy from the remote server to the TrueNAS SCALE server location, or Push to copy from the TrueNAS to the remote server.
Enter the remote host name or IP in Remote Host. You need to have the remote server rsync service configured and turned on.
Select the connection mode from the Rsync Mode dropdown. Each mode option displays settings for the selected type.
You need to have either a rsync module configured or an SSH connection for the remote server already configured.
Set the schedule for when to run this task, and any other options you want to use.
If you need a custom schedule, select Custom to open the advanced scheduler window.
Choosing a Presets option populates in the rest of the fields.
To customize a schedule, enter crontab values for the Minutes/Hours/Days.
These fields accept standard cron values.
The simplest option is to enter a single number in the field.
The task runs when the time value matches that number.
For example, entering 10 means that the job runs when the time is ten minutes past the hour.
An asterisk (*) means match all values.
You can set specific time ranges by entering hyphenated number values.
For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.
You can also enter lists of values.
Enter individual values separated by a comma (,).
For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).
A slash (/) designates a step value.
For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.
Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.
TrueNAS has an option to select which Months the task runs.
Leaving each month unset is the same as selecting every month.
The Days of Week schedules the task to run on specific days in addition to any listed days.
For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.
The Schedule Preview dipslays when the current settings mean the task runs.
Examples of CRON syntax
Syntax
Meaning
Examples
*
Every item.
* (minutes) = every minute of the hour. * (days) = every day.
*/N
Every Nth item.
*/15 (minutes) = every 15th minute of the hour. */3 (days) = every 3rd day. */3 (months) = every 3rd month.
Comma and hyphen/dash
Each stated item (comma) Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour. 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour. mon-fri (days) = every Monday to Friday inclusive (every weekday). mar,jun,sep,dec (months) = every March, June, September, December.
You can specify days of the month or days of the week.
TrueNAS lets users create flexible schedules using the available options. The table below has some examples:
Desired schedule
Values to enter
3 times a day (at midnight, 08:00 and 16:00)
months=*; days=*; hours=0/8 or 0,8,16; minutes=0 (Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pm
months=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 am
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to Friday
Note that this requires two tasks to achieve: (1) months=*; days=mon-fri; hours=8-18; minutes=*/15 (2) months=*; days=mon-fri; hours=19; minutes=0 We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
Click Save.
Creating an Rsync Task Using Module Mode
Before you create an rsync task on the host system, you must create a module on the remote system.
You must define at least one module in rsyncd.conf(5) of the rsync server or in the rsync modules of another system.
When TrueNAS is the remote system, create a module in System Settings > Services > Rsync on the Rsync Modules screen.
See Configuring an Rsync Module for more information.
After adding the rsync module, go to Data Protection > Rsync Tasks, and click Add to open the Add Rsync Task configuration screen.
Next, enter the Remote Host IP address or hostname.
Use the format username@remote_host when the username differs from the host entered into the Remote Host field.
Now select Module from the Rsync Mode dropdown list, and then enter either the remote system host name or IP address exactly as it appears on the remote system in Remote Module Name.
Select a schedule for the rsync task.
Configure the remaining options according to your specific needs.
If you leave the Enable checkbox cleared it disables the task schedule, but you can still save and run the rsync task manually.
Click Save.
Creating an Rsync Task Using SSH Mode
First, enable SSH on the remote system.
Next enable SSH in TrueNAS.
Go to System > Services and toggle SSH on.
Now set up an SSH connection to the remote server. You can do this in Credentials > Backup Credentials using SSH Connections and SSH Keypairs, or using System Settings > Shell and TrueNAS CLI commands.
To use the UI, see Adding SSH connections.
Populate the SSH Connections configuration fields as follows:
Select Semi-automatic as the Setup Method
Select Private Key to Generate New
Creating an SSH Connection Using CLI in Shell
You can use System Settings > Shell and TrueNAS command-line to set up an SSH connection.
To use a command line, go to the Shell on the host system.
Enter su - {USERNAME}, where {USERNAME} is the TrueNAS user account that runs the rsync task.
Enter ssh-keygen -t rsa to create the key pair.
When prompted for a password, press Enter without setting a password (a password breaks the automated task).
Here is an example of running the command:
truenas# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification is saved in /root/.ssh/id_rsa.
Your public key is saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:NZMgbuPvTHeEqi3SA/U5wW8un6AWrx8ZsRQdbJJHmR4 tester@truenas.local
The key randomart image is:
+---[RSA 2048]----+
| . o=o+ |
| . .ooE. |
| +.o==. |
| o.oo+.+ |
| ...S+. . |
| . ..++o. |
| o oB+. . |
| . =Bo+.o |
| o+==oo |
+----[SHA256]-----+
The default public key location is ~/.ssh/id_rsa.pub.
Enter cat ~/.ssh/id_rsa.pub to see the key and copy the file contents.
Copy it to the corresponding user account on the remote system in Credentials > Users.
By default, SCALE only displays the root user and prompts you to display hidden users.
Follow the directions to locate the sshd user account.
Click on the sshd user and then on Edit. Paste the key in SSH Public Key.
Next, copy the host key from the remote system to the host system user .ssh/known_hosts directory, using ssh-keyscan.
On the host system, open the Shell and enter ssh-keyscan -t rsa {remoteIPaddress} >> {userknown_hostsDir} where {remoteIPaddress} is the remote system IP address and {userknown_hostsDir} is the known_hosts directory on the host system.
Example: ssh-keyscan -t rsa 192.168.2.6 >> /root/.ssh/known_hosts.
After establishing the SSH connection, add the rsync task.
Go to Data Protection > Rsync Tasks and click Add to open the Add Rsync Task configuration screen.
Select a User account that matches the SSH connection Username entry in the SSH Connections you set up.
Choose a Direction for the rsync task as either Push or Pull and then define the task Schedule.
Provide a Description for the rsync task.
Select SSH in Rsync Mode. The SSH settings fields display.
Choose a connection method from the Connect using dropdown list. The following image and fields display if SSH private key stored in user’s home directory is chosen:
Setting
Description
Path
Enter or browse to the path to be copied.
User
Select the user to run the rsync task. The user selected must have permissions to write to the specified directory on the remote host.
Direction
Directs the flow of data to the remote host. Options are Push and Pull.
Description
Enter a description of the rsync task.
Rsync Mode
Choose to either use a custom-defined remote module of the rsync server or to use an SSH configuration for the rsync task.
Connect using
Use the dropdown list to select. The following fields display when SSH private key stored in user’s home directory is selected:
Remote Host
Enter the IP address or hostname of the remote system that will store the copy. Use the format username@remote_host if the username differs on the remote host.
Remote SSH Port
Enter the SSH Port of the remote system. Default is 22.
Remote Path
Select from options listed.
Validate Remote Path
Set to automatically create the defined Remote Path if it does not exist. Checkbox is selected by default.
If you chose SSH connection from the keychain, the following fields display:
Setting
Description
Path
Enter or browse to the path to be copied.
User
Select the user to run the rsync task. The user selected must have permissions to write to the specified directory on the remote host.
Direction
Directs the flow of data to the remote host. Options are Push and Pull.
Description
Enter a description of the rsync task.
Rsync Mode
Choose to either use a custom-defined remote module of the rsync server or to use an SSH configuration for the rsync task.
Connect using
Use the dropdown list to select. The following fields display when SSH SSH connection from the keychain is selected:
SSH Connection
Select an existing SSH connection to a remote system or choose Create New to create a new SSH connection.
Remote Path
Select from options listed.
Validate Remote Path
Set to automatically create the defined Remote Path if it does not exist. Checkbox is selected by default.
Next, enter the Remote Host IP address or hostname.
Use the format username@remote_host if the username differs on the remote host.
Enter the SSH port number in Remote SSH Port. By default, 22 is reserved in TrueNAS.
Enter or browse to the location on the remote server where you either copy information from or to in Remote Path. Maximum path length is 255 characters.
Select Validate Remote Path if the remote path location does not exist to create and define it in Remote Path.
Select the schedule to use and configure the remaining options according to your specific needs.
Click Save.
Additional Options for Both Module and SSH Rsync Modes:
Clear the Enabled checkbox to disable the task schedule without deleting the configuration.
You can still run the rsync task by going to Data Protection > Rsync Tasks and clicking then the Run Nowplay_arrow icon.
A periodic snapshot task allows scheduling the creation of read only versions of pools and datasets at a given point in time.
Snapshots do not make not copies of the data so creating one is quick and if little data changed, they take very little space.
It is common to take frequent snapshots as soon as every 15 minutes, even for large and active pools.
A snapshot where no files changed takes no storage space, but as files changes happen, the snapshot size changes to reflect the size of the changes.
In the same way as all pool data, after deleting the last reference to the data you recover the space.
Snapshots keep a history of files, providing a way to recover an older copy or even a deleted file.
For this reason, many administrators take snapshots often, store them for a period of time, and store them on another system, typically using the Replication Tasks function.
Such a strategy allows the administrator to roll the system back to a specific point in time.
If there is a catastrophic loss, an off-site snapshot can restore data up to the time of the last snapshot.
Creating a Periodic Snapshot Task
Create the required datasets or zvols before creating a snapshot task.
This short video demonstrates adding a periodic snapshot task
Video Player is loading.
Current Time 0:00
/
Duration 0:29
Loaded: 3.28%
0:00
Stream Type LIVE
Remaining Time -0:29
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Go to Data Protection > Periodic Snapshot Tasks and click Add.
First, choose the dataset (or zvol) to schedule as a regular backup with snapshots, and how long to store the snapshots.
Next, define the task Schedule.
If you need a specific schedule, choose Custom and use the Advanced Scheduler section below.
Configure the remaining options for your use case.
For help with naming schema and lifetime settings refer to the sections below.
Click Save to save this task and add it to the list in Data Protection > Periodic Snapshot Tasks.
You can find any snapshots taken using this task in Storage > Snapshots.
To check the log for a saved snapshot schedule, go to Data Protection > Periodic Snapshot Tasks and click on the task. The Edit Periodic Snapshot Tasks screen displays where you can modify any settings for the task.
Using the Advanced Scheduler
Choosing a Presets option populates in the rest of the fields.
To customize a schedule, enter crontab values for the Minutes/Hours/Days.
These fields accept standard cron values.
The simplest option is to enter a single number in the field.
The task runs when the time value matches that number.
For example, entering 10 means that the job runs when the time is ten minutes past the hour.
An asterisk (*) means match all values.
You can set specific time ranges by entering hyphenated number values.
For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.
You can also enter lists of values.
Enter individual values separated by a comma (,).
For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).
A slash (/) designates a step value.
For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.
Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.
TrueNAS has an option to select which Months the task runs.
Leaving each month unset is the same as selecting every month.
The Days of Week schedules the task to run on specific days in addition to any listed days.
For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.
The Schedule Preview dipslays when the current settings mean the task runs.
Examples of CRON syntax
Syntax
Meaning
Examples
*
Every item.
* (minutes) = every minute of the hour. * (days) = every day.
*/N
Every Nth item.
*/15 (minutes) = every 15th minute of the hour. */3 (days) = every 3rd day. */3 (months) = every 3rd month.
Comma and hyphen/dash
Each stated item (comma) Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour. 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour. mon-fri (days) = every Monday to Friday inclusive (every weekday). mar,jun,sep,dec (months) = every March, June, September, December.
You can specify days of the month or days of the week.
TrueNAS lets users create flexible schedules using the available options. The table below has some examples:
Desired schedule
Values to enter
3 times a day (at midnight, 08:00 and 16:00)
months=*; days=*; hours=0/8 or 0,8,16; minutes=0 (Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pm
months=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 am
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to Friday
Note that this requires two tasks to achieve: (1) months=*; days=mon-fri; hours=8-18; minutes=*/15 (2) months=*; days=mon-fri; hours=19; minutes=0 We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
Using Naming Schemas
The Naming Schema determines how automated snapshot names generate.
A valid schema requires the %Y (year), %m (month), %d (day), %H (hour), and %M (minute) time strings, but you can add more identifiers to the schema too, using any identifiers from the Python strptime function.
For Periodic Snapshot Tasks used to set up a replication task with the Replication Task function:
You can use custom naming schema for full backup replication tasks. If you are going to use the snapshot for an incremental replication task, use the default naming schema. Go to Using a Custom Schema for additional information.
This uses some letters differently from POSIX (Unix) time functions.
For example, including %z (time zone) ensures that snapshots do not have naming conflicts when daylight time starts and ends, and %S (second) adds finer time granularity.
When referencing snapshots from a Windows computer, avoid using characters like colon (:) that are invalid in a Windows file path.
Some applications limit filename or path length, and there might be limitations related to spaces and other characters.
Always consider future uses and ensure the name given to a periodic snapshot is acceptable.
Setting Snapshot Lifetimes
TrueNAS deletes snapshots when they reach the end of their life and preserves snapshots when at least one periodic task requires it.
For example, you have two schedules created where one schedule takes a snapshot every hour and keeps them for a week, and the other takes a snapshot every day and keeps them for 3 years.
Each has an hourly snapshot taken.
After a week, snapshots created at 01.00 through 23.00 get deleted, but you keep snapshots timed at 00.00 because they are necessary for the second periodic task.
These snapshots get destroyed at the end of 3 years.
This article provides instructions on running S.M.A.R.T. tests manually or automatically, using Shell to view the list of tests, and configuring the S.M.A.R.T. test service.
S.M.A.R.T. or Self-Monitoring, Analysis and Reporting Technology is a standard for disk monitoring and testing.
You can monitor disks for problems using different kinds of self-tests.
TrueNAS can adjust when it issues S.M.A.R.T. alerts.
When S.M.A.R.T. monitoring reports a disk issue, we recommend you replace that disk.
Most modern ATA, IDE, and SCSI-3 hard drives support S.M.A.R.T.
Refer to your respective drive documentation for confirmation.
TrueNAS runs S.M.A.R.T. tests on disks.
Running tests can reduce drive performance, so we recommend scheduling tests when the system is in a low-usage state.
Avoid scheduling disk-intensive tests at the same time!
For example, do not schedule S.M.A.R.T. tests on the same day as a disk scrub or other data protection task.
Go to Storage, then click Disks dropdown and select Disks.
Click the expand_more to the right of the disk row to expand it.
Enable S.M.A.R.T. shows as true or false.
To enable or disable testing, click EDIT and find the Enable S.M.A.R.T. option.
Running a Manual S.M.A.R.T. Test
To test one or more disk for errors, go to Storage, select Disks and then select the disks you want to test to display the Batch Operations options.
Click Manual Test. The Manual S.M.A.R.T. Test dialog displays.
Next, select the test type from the Type dropdown and then click Start.
Test types differ based on the drive connection, ATA or SCSI.
Test duration varies based on the test type you chose.
TrueNAS generates alerts when tests discover issues.
Manual S.M.A.R.T. tests on NVMe devices is currently not supported.
ATA Drive Connection Test Types
The ATA drive connection test type options are:
Long runs a S.M.A.R.T. Extended Self Test that scans the entire disk surface, which may take hours on large-volume disks.
Short runs a basic S.M.A.R.T. Short Self Test (usually under ten minutes) that varies by manufacturer.
Conveyance runs a S.M.A.R.T. Conveyance Self Test (usually only minutes) that identifies damage incurred while transporting the device.
Offline runs a S.M.A.R.T. Immediate Offline Test that updates the S.M.A.R.T. Attribute values. Errors will appear in the S.M.A.R.T. error log.
SCSI Drive Connection Test Type
Long runs the “Background long” self-test.
Short runs the “Background short” self-test.
Offline runs the default self-test in the foreground, but doesn’t place an entry in the self-test log.
Click the expand_more in a disk’s row to expand it, then click S.M.A.R.T. TEST RESULTS.
You can also see results in the Shell using smartctl and the name of the drive: smartctl -l selftest /dev/ada0.
Running Automatic S.M.A.R.T. Tests
To schedule recurring S.M.A.R.T. tests, go to Data Protection and click ADD in the S.M.A.R.T. Tests widget.
Select the disks to test from the Disks dropdown list, and then select the test type to run from the Type dropdown list.
Next select a preset from the Schedule dropdown. To create a custom schedule select Custom to open the advanced scheduler window where you can define the schedule parameters you want to use.
Choosing a Presets option populates in the rest of the fields.
To customize a schedule, enter crontab values for the Minutes/Hours/Days.
These fields accept standard cron values.
The simplest option is to enter a single number in the field.
The task runs when the time value matches that number.
For example, entering 10 means that the job runs when the time is ten minutes past the hour.
An asterisk (*) means match all values.
You can set specific time ranges by entering hyphenated number values.
For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.
You can also enter lists of values.
Enter individual values separated by a comma (,).
For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).
A slash (/) designates a step value.
For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.
Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.
TrueNAS has an option to select which Months the task runs.
Leaving each month unset is the same as selecting every month.
The Days of Week schedules the task to run on specific days in addition to any listed days.
For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.
The Schedule Preview dipslays when the current settings mean the task runs.
Examples of CRON syntax
Syntax
Meaning
Examples
*
Every item.
* (minutes) = every minute of the hour. * (days) = every day.
*/N
Every Nth item.
*/15 (minutes) = every 15th minute of the hour. */3 (days) = every 3rd day. */3 (months) = every 3rd month.
Comma and hyphen/dash
Each stated item (comma) Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour. 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour. mon-fri (days) = every Monday to Friday inclusive (every weekday). mar,jun,sep,dec (months) = every March, June, September, December.
You can specify days of the month or days of the week.
TrueNAS lets users create flexible schedules using the available options. The table below has some examples:
Desired schedule
Values to enter
3 times a day (at midnight, 08:00 and 16:00)
months=*; days=*; hours=0/8 or 0,8,16; minutes=0 (Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pm
months=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 am
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to Friday
Note that this requires two tasks to achieve: (1) months=*; days=mon-fri; hours=8-18; minutes=*/15 (2) months=*; days=mon-fri; hours=19; minutes=0 We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
Saved schedules appear in the S.M.A.R.T. Tests window.
S.M.A.R.T. tests can offline disks! Avoid scheduling S.M.A.R.T. tests simultaneously with scrub or other data protection tasks.
Start the S.M.A.R.T. service. Go to System Settings > Services and scroll down to the S.M.A.R.T. service. If not running, click the toggle to turn the service on. Select Start Automatically to have this service start after after the system reboots.
If you have not configured the S.M.A.R.T. service yet, while the service is stopped, click edit to open the service configuration form. See Services S.M.A.R.T. Screen for more information on service settings.
Click Save to save settings and return to the Services screen.
Disable the S.M.A.R.T. service when a RAID controller controls the disks.
The controller monitors S.M.A.R.T. separately and marks disks as a Predictive Failure on a test failure.
Using Shell to View Scheduled Tests
To verify the schedule is saved, you can open the shell and enter smartd -q showtests.
This article provides information on three methods of unlocking replicated encrypted datasets or zvols without a passphrase.
4.7.1 - Setting Up a Local Replication Task
This article provides instructions on adding a replication task on the same TrueNAS system.
Local Replication
Process Summary
Requirements: Storage pools and datasets created in Storage > Pools.
Go to Data Protection > Replication Tasks and click ADD
Choose Sources
Set the source location to the local system
Use the file browser or type paths to the sources
Define a Destination path
Set the destination location to the local system
Select or manually define a path to the single destination location for the snapshot copies.
Set the Replication schedule to run once
Define how long the snapshots are stored in the Destination
Clicking START REPLICATION immediately snapshots the chosen sources and copies those snapshots to the destination
Dialog might ask to delete existing snapshots from the destination. Be sure that all important data is protected before deleting anything.
Clicking the task State shows the logs for that replication task.
Quick Local Backups with the Replication Wizard
TrueNAS provides a wizard for quickly configuring different simple replication scenarios.
While we recommend regularly scheduled replications to a remote location as the optimal backup scenario, the wizard can very quickly create and copy ZFS snapshots to another location on the same system.
This is useful when no remote backup locations are available, or when a disk is in immediate danger of failure.
The only things you need before creating a quick local replication are datasets or zvols in a storage pool to use as the replication source and (preferably) a second storage pool to use for storing replicated snapshots.
You can set up the local replication entirely in the Replication Wizard.
To open the Replication Wizard, go to Data Protection > Replication Tasks and click ADD.
Set the source location to the local system and pick which datasets to snapshot.
The wizard takes new snapshots of the sources when no existing source snapshots are found.
Enabling Recursive replicates all snapshots contained within the selected source dataset snapshots.
Local sources can also use a naming schema to identify any custom snapshots to include in the replication.
A naming schema is a collection of strftime time and date strings and any identifiers that a user might have added to the snapshot name.
Set the destination to the local system and define the path to the storage location for replicated snapshots.
When manually defining the destination, be sure to type the full path to the destination location.
TrueNAS suggests a default name for the task based on the selected source and destination locations, but you can type your own name for the replication.
You can load any saved replication task into the wizard to make creating new replication schedules even easier.
You can define a specific schedule for this replication or choose to run it immediately after saving the new task.
TrueNAS saves unscheduled tasks in the replication task list. You can run saved tasks manually or edit them later to add a schedule.
The destination lifetime is how long copied snapshots are stored in the destination before they are deleted.
We usually recommend defining a snapshot lifetime to prevent storage issues.
Choosing to keep snapshots indefinitely can require you to manually clean old snapshots from the system if or when the destination fills to capacity.
Clicking START REPLICATION saves the new task and immediately attempts to replicate snapshots to the destination.
When TrueNAS detects that the destination already has unrelated snapshots, it asks to delete the unrelated snapshots and do a full copy of the new snapshots.
This can delete important data, so ensure you can delete any existing snapshots or back them up in another location.
TrueNAS adds the simple replication to the replication task list and shows that it is currently running.
Clicking the task state shows the replication log with an option to download the log to your local system.
To confirm that snapshots are replicated, go to Storage > Snapshots > Snapshots and verify the destination dataset has new snapshots with correct timestamps.
This article provides instruction on using the advanced replication task creation screen to add a replication task.
Advanced Replication
Requirements:
Storage pools with datasets and data to snapshot.
SSH configured with a connection to the remote system saved in Credentials > Backup Credentials > SSH Connections.
Dataset snapshot task saved in Data Protection > Periodic Snapshot Tasks.
Process Summary
Go to Data Protection > Replication Tasks and click ADD, then select ADVANCED REPLICATION CREATION.
General Options:
Name the task.
Select Push or Pull for the local system.
Select a replication transport method.
SSH is recommended.
SSH+Netcat is used for secured networks.
Local is for in-system replication.
Configure the replication transport method:
Remote options require a preconfigured SSH connection.
SSH+Netcat requires defining netcat ports and addresses.
Sources:
Select sources for replication.
Choose a preconfigured periodic snapshot task as the source of snapshots to replicate.
Remote sources require defining a snapshot naming schema.
Destination:
Remote destination requires an SSH connection.
Select a destination or type a path in the field.
Define how long to keep snapshots in the destination.
Scheduling:
Run automatically starts the replication after a related periodic snapshot task completes.
To automate the task according to its own schedule, set the schedule option and define a schedule for the replication task.
To use the advanced editor to create a replication task, go to Data Protection > Replication Tasks, click Add to open the wizard, then click the Advanced Replication Creation button.
Options are grouped together by category.
Options can appear, disappear, or be disabled depending on the configuration choices you make.
Start by configuring the General options first, then the Transport options before configuring replication Source, Destination, and Replication Schedule.
Type a name for the task in Name.
Each task name must be unique, and we recommend you name it in a way that makes it easy to remember what the task is doing.
Direction allows you to choose whether the local system is sending (Push) or receiving data (Pull).
Decide what Transport method (SSH, SSH+NETCAT, or LOCAL) to use for the replication before configuring the other sections.
Set the Number of retries for failed replications before stopping and marking the task as failed (the default is 5).
Use the Logging Level to set the message verbosity level in the replication task log.
To ensure the replication task is active, check the Enabled box.
Transport Options
The Transport selector determines the method to use for the replication:
SSH is the standard option for sending or receiving data from a remote system, but SSH+NETCAT is available as a faster option for replications that take place within completely secure networks.
Local is only used for replicating data to another location on the same system.
With SSH-based replications, configure the transport method by selecting the SSH Connection to the remote system that sends or receives snapshots.
Options for compressing data, adding a bandwidth limit, or other data stream customizations are available. Stream Compression options are only available when using SSH. Before enabling Compressed WRITE Records, verify that the destination system also supports compressed WRITE records.
For SSH+NETCAT replications, you must define the addresses and ports to use for the Netcat connection.
Allow Blocks Larger than 128KB is a one-way toggle.
Replication tasks using large block replication only continue to work as long as this option remains enabled.
Configure the Source
The replication Source is the datasets or zvols to use for replication.
Select the sources to use for this replication task by opening the file browser or entering dataset names in the field.
Pulling snapshots from a remote source requires a valid SSH Connection before the file browser can show any directories.
If the file browser shows a connection error after selecting the correct SSH Connection, you might need to log in to the remote system and configure it to allow SSH connections.
In TrueNAS, do this by going to the System Settings > Services screen, checking the SSH service configuration, and starting the service.
By default, the replication task uses snapshots to quickly transfer data to the receiving system.
When Full Filesystem Replication is set, the task completely replicates the chosen Source, including all dataset properties, snapshots, child datasets, and clones. When choosing this option, we recommended allocating additional time for the replication task to run.
Leaving Full Filesystem Replication unset but setting Include Dataset Properties includes just the dataset properties in the snapshots to be replicated.
Checking the Recursive check box allows you to recursively replicate child dataset snapshots or exclude specific child datasets or properties from the replication.
Enter newly defined properties in the Properties Override field to replace existing dataset properties with the newly defined properties in the replicated files.
List any existing dataset properties to remove from the replicated files in the Properties Exclude field.
Local sources are replicated by snapshots that were generated from a periodic snapshot task and/or from a defined naming schema that matches manually created snapshots.
Select a previously configured periodic snapshot task for this replication task in the Periodic Snapshot Tasks drop-down list. The replication task selected must have the same values in Recursive and Exclude Child Datasets as the chosen periodic snapshot task. Selecting a periodic snapshot schedule removes the Schedule field.
To define specific snapshots from the periodic task to use for the replication, set Replicate Specific Snapshots and enter a schedule.
The only periodically generated snapshots included in the replication task are those that match your defined schedule.
Remote sources require entering a snapshot naming schema to identify the snapshots to replicate.
A naming schema is a collection of strftime time and date strings and any identifiers that a user might have added to the snapshot name.
For example, entering the naming schema custom-%Y-%m-%d_%H-%M finds and replicates snapshots like custom-2020-03-25_09-15.
Multiple schemas can be entered by pressing Enter to separate each schema.
Alternately, you can use your Replication Schedule to determine which snapshots are replicated by setting Run Automatically, Only Replicate Snapshots Matching Schedule, and defining when the replication task runs.
When a replication task is having difficulty completing, it is a good idea to set Save Pending Snapshots.
This prevents the source TrueNAS from automatically deleting any snapshots that failed to replicate to the destination system.
Set up the Destination
Use Destination to specify where replicated data is stored.
Choosing a remote destination requires an *SSH Connection to that system.
Expanding the file browser shows the current datasets that are available on the destination system.
You can click a destination or manually type a path in the field.
Adding a name to the end of the path creates a new dataset in that location.
DO NOT use zvols as remote destinations.
By default, the destination dataset is set to be read-only after the replication is complete.
You can change the Destination Dataset Read-only Policy to only start replication when the destination is read-only (REQUIRE) or to disable checking the dataset’s read-only state (IGNORE).
The Encryption checkbox adds another layer of security to replicated data by encrypting the data before transfer and decrypting it on the destination system.
Setting the checkbox adds more options to choose between using a HEX key or defining your own encryption PASSPHRASE.
You can store the encryption key either in the TrueNAS system database or in a custom-defined location.
Synchronizing Destination Snapshots With Sourcedestroys any snapshots in the destination that do not match the source snapshots.
TrueNAS also does a full replication of the source snapshots as if the replication task had never been run before, which can lead to excessive bandwidth consumption.
This can be a very destructive option. Make sure that any snapshots deleted from the destination are obsolete or otherwise backed up in a different location.
Defining the Snapshot Retention Policy is generally recommended to prevent cluttering the system with obsolete snapshots.
Choosing Same as Source keeps the snapshots on the destination system for the same amount of time as the defined Snapshot Lifetime from the source system periodic snapshot task.
You can use Custom to define your own lifetime for snapshots on the destination system.
Schedule the Task
By default, setting the task to Run Automatically starts the replication immediately after the related periodic snapshot task is complete.
Setting the Schedule checkbox allows scheduling the replication to run at a separate time.
Defining a specific time for the replication task to run is a must-do.
Choose a time frame that both gives the replication task enough time to finish and is during a time of day when network traffic for both source and destination systems is minimal.
Use the custom scheduler (recommended) when you need to fine-tune an exact time or day for the replication.
Choosing a Presets option populates in the rest of the fields.
To customize a schedule, enter crontab values for the Minutes/Hours/Days.
These fields accept standard cron values.
The simplest option is to enter a single number in the field.
The task runs when the time value matches that number.
For example, entering 10 means that the job runs when the time is ten minutes past the hour.
An asterisk (*) means match all values.
You can set specific time ranges by entering hyphenated number values.
For example, entering 30-35 in the Minutes field sets the task to run at minutes 30, 31, 32, 33, 34, and 35.
You can also enter lists of values.
Enter individual values separated by a comma (,).
For example, entering 1,14 in the Hours field means the task runs at 1:00 AM (0100) and 2:00 PM (1400).
A slash (/) designates a step value.
For example, entering * in Days runs the task every day of the month. Entering */2 runs it every other day.
Combining the above examples creates a schedule running a task each minute from 1:30-1:35 AM and 2:30-2:35 PM every other day.
TrueNAS has an option to select which Months the task runs.
Leaving each month unset is the same as selecting every month.
The Days of Week schedules the task to run on specific days in addition to any listed days.
For example, entering 1 in Days and setting Wed for Days of Week creates a schedule that starts a task on the first day of the month and every Wednesday of the month.
The Schedule Preview dipslays when the current settings mean the task runs.
Examples of CRON syntax
Syntax
Meaning
Examples
*
Every item.
* (minutes) = every minute of the hour. * (days) = every day.
*/N
Every Nth item.
*/15 (minutes) = every 15th minute of the hour. */3 (days) = every 3rd day. */3 (months) = every 3rd month.
Comma and hyphen/dash
Each stated item (comma) Each item in a range (hyphen/dash).
1,31 (minutes) = on the 1st and 31st minute of the hour. 1-3,31 (minutes) = on the 1st to 3rd minutes inclusive, and the 31st minute, of the hour. mon-fri (days) = every Monday to Friday inclusive (every weekday). mar,jun,sep,dec (months) = every March, June, September, December.
You can specify days of the month or days of the week.
TrueNAS lets users create flexible schedules using the available options. The table below has some examples:
Desired schedule
Values to enter
3 times a day (at midnight, 08:00 and 16:00)
months=*; days=*; hours=0/8 or 0,8,16; minutes=0 (Meaning: every day of every month, when hours=0/8/16 and minutes=0)
Every Monday/Wednesday/Friday, at 8.30 pm
months=*; days=mon,wed,fri; hours=20; minutes=30
1st and 15th day of the month, during October to June, at 00:01 am
Every 15 minutes during the working week, which is 8am - 7pm (08:00 - 19:00) Monday to Friday
Note that this requires two tasks to achieve: (1) months=*; days=mon-fri; hours=8-18; minutes=*/15 (2) months=*; days=mon-fri; hours=19; minutes=0 We need the second scheduled item, to execute at 19:00, otherwise we would stop at 18:45. Another workaround would be to stop at 18:45 or 19:45 rather than 19:00.
Setting Only Replicate Snapshots Matching Schedule restricts the replication to only replicate those snapshots created at the same time as the replication schedule.
This article provides instructions on adding a replication task with a remote system (TrueNAS or other).
Creating a Remote Replication Task
To create a new replication, go to Data Protection > Replication Tasks and click ADD.
You can load any saved replication to prepopulate the wizard with that configuration.
Saving changes to the configuration creates a new replication task without altering the task you loaded into the wizard.
This saves some time when creating multiple replication tasks between the same two systems.
Set up the Sources
Start by configuring the replication sources.
Sources are the datasets or zvols with snapshots to use for replication.
Choosing a remote source requires selecting an SSH connection to that system.
Expanding the directory browser shows the current datasets or zvols that are available for replication.
You can select multiple sources or manually type the names into the field.
TrueNAS shows how many snapshots are available for replication.
We recommend you manually snapshot the sources or create a periodic snapshot task before creating the replication task.
However, when the sources are on the local system and don’t have any existing snapshots, TrueNAS can create a basic periodic snapshot task and snapshot the sources immediately before starting the replication. Enabling Recursive replicates all snapshots contained within the selected source dataset snapshots.
Local sources can also use a naming schema to identify any custom snapshots to include in the replication.
Remote sources require entering a snapshot naming schema to identify the snapshots to replicate.
A naming schema is a collection of strftime time and date strings and any identifiers that a user might have added to the snapshot name.
Configure the Destination
The destination is where replicated snapshots are stored.
Choosing a remote destination requires an SSH connection to that system.
Expanding the directory browser shows the current datasets that are available for replication.
You can select a destination dataset or manually type a path in the field.
You cannot use zvols as a remote replication destination.
Adding a name to the end of the path creates a new dataset in that location.
To use encryption when replicating data click the Encryption box. After selecting the box these additional encryption options become available:
Encryption Key Format allows the user to choose between a hex (base 16 numeral) or passphrase (alphanumeric) style encryption key.
Store Encryption key in Sending TrueNAS database allows the user to either store the encryption key in the sending TrueNAS database (box checked) or choose a temporary location for the encryption key that decrypts replicated data (box unchecked)
Security and Task Name
Using encryption for SSH transfer security is always recommended.
In situations where two systems within an absolutely secure network are used for replication, disabling encryption speeds up the transfer.
However, the data is completely unprotected from eavesdropping.
Choosing no encryption for the task is less secure but faster. This method uses common port settings but these can be overridden by switching to the advanced options screen or editing the task after creation.
TrueNAS suggests a name based off the selected sources and destination, but this can be overwritten with a custom name.
Define a Schedule and Snapshot Lifetime
Adding a schedule automates the task to run according to your chosen times.
You can choose between a number of preset schedules or create a custom schedule for when the replication runs.
Choosing to run the replication once runs the replication immediately after saving the task, but you must manually trigger any additional replications.
Finally, define how long you want to keep snapshots on the destination system.
We generally recommend defining snapshot lifetime to prevent cluttering the system with obsolete snapshots.
Starting the Replication
Start Replication* saves the new replication task.
New tasks are enabled by default and activate according to their schedule or immediately when no schedule is chosen.
The first time a replication task runs, it takes longer because the snapshots must be copied entirely fresh to the destination.
Later replications run faster since the task only replicates subsequent changes to snapshots.
Clicking the task state opens the log for that task.
4.7.4 - Unlocking a Replication Encrypted Dataset or Zvol
This article provides information on three methods of unlocking replicated encrypted datasets or zvols without a passphrase.
Unlocking a Replicated Encrypted Dataset or Zvol Without a Passphrase
TrueNAS SCALE users should either replicate the dataset/Zvol without properties to disable encryption at the remote end or construct a special JSON manifest to unlock each child dataset/zvol with a unique key.
Method 1: Construct JSON Manifest.
Replicate every encrypted dataset you want to replicate with properties.
Export key for every child dataset that has a unique key.
For each child dataset construct a proper json with poolname/datasetname of the destination system and key from the source system like this:
{"tank/share01": "57112db4be777d93fa7b76138a68b790d46d6858569bf9d13e32eb9fda72146b"}
Save this file with the extension .json.
On the remote system, unlock the dataset(s) using properly constructed json files.
Method 2: Replicate Encrypted Dataset/zvol Without Properties.
Uncheck properties when replicating so that the destination dataset is not encrypted on the remote side and does not require a key to unlock.
Go to Data Protection and click ADD in the Replication Tasks window.
Click Advanced Replication Creation.
Fill out the form as needed and make sure Include Dataset Properties is NOT checked.
Click Save.
Method 3: Replicate Key Encrypted Dataset/zvol.
Go to Datasets on the system you are replicating from.
Select the dataset encrypted with a key, then click Export Key on the ZFS Encryption widget to export the key for the dataset.
Apply the JSON key file or key code to the dataset on the system you replicated the dataset to.
Option 1: Download the key file and open it in a text editor. Change the pool name/dataset part of the string to the pool name/dataset for the receiving system. For example, replicating from tank1/dataset1 on the replicate-from system to tank2/dataset2 on the replicate-to system.
Option 2: Copy the key code provided in the Key for dataset window.
On the system receiving the replicated pool/dataset, select the receiving dataset and click Unlock.
Unlock the dataset.
Either clear the Unlock with Key file checkbox, paste the key code into the Dataset Key field (if there is a space character at the end of the key, delete the space), or select the downloaded Key file that you edited.
SCALE Credential options are collected in this section of the UI and organized into a few different screens:
Local Users allows those with permissions to add, configure, and delete users on the system.
There are options to search for keywords in usernames, display or hide user characteristics, and toggle whether the system shows built-in users.
Local Groups allows those with permissions to add, configure, and delete user groups on the system.
There are options to search for keywords in group names, display or hide group characteristics, and toggle whether the system shows built-in groups.
Directory Services contains options to edit directory domain and account settings, set up Idmapping, and configure access and authentication protocols.
Specific options include configuring Kerberos realms and key tables (keytab), as well as setting up LDAP validation.
Backup Credentials stores credentials for cloud backup services, SSH Connections, and SSH Keypairs.
Users can set up backup credentials with cloud and SSH clients to back up data in case of drive failure.
Certificates contains all the information for certificates, certificate signing requests, certificate authorities, and DNS-authenticators.
TrueNAS comes equipped with an internal, self-signed certificate that enables encrypted access to the web interface, but users can make custom certificates for authentication and validation while sharing data.
2FA allows users to set up Two-Factor Authentication for their system.
Users can set up 2FA, then link the system to an authenticator app (such as Google Authenticator, LastPass Authenticator, etc.) on a mobile device.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
5.1 - Managing Users
This article provides instructions on adding and managing local user accounts.
In TrueNAS, user accounts allow flexibility for accessing shared data.
Typically, administrators create users and assign them to groups.
Doing so makes tuning permissions for large numbers of users more efficient.
Only the root user account can log in to the TrueNAS web interface until the root user creates an admin user with the same permissions.
After loggin in as root, TrueNAS alerts you to create the local administrator account.
As part of security hardening and to comply with Federal Information Processing standards (FIPS), iXsystems plans to completely disable root login in a future release.
When this occurs, the sign-in screen prompts first-time users to create a new administration account they used in place of the root user.
System administrators should create and begin using a new root-level user before this function goes away.
When the network uses a directory service, import the existing account information using the instructions in Directory Services.
Using Active Directory requires setting Windows user passwords in Windows.
To see user accounts, go to Credentials > Local Users.
TrueNAS hides all built-in users (except root) by default. Click the toggle Show Built-In Users to see all built-in users.
Creating User Accounts
This short video demonstrates adding a local user.
Video Player is loading.
Current Time 0:00
/
Duration 0:47
Loaded: 1.87%
0:00
Stream Type LIVE
Remaining Time -0:47
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
TrueNAS lets users configure four different user account traits (settings).
Configuring User Identification Settings
Enter the user full name in Full Name.
TrueNAS suggests a simplified name in Username derived from the Full Name, but you can override it with your own choice.
You can also assign a user account email address in the Email field.
By default, the Disable Password toggle is not enabled. In this case, set and confirm a password.
Setting Disable Password toggle to active (blue toggle) disables several options:
The Password field becomes unavailable, and TrueNAS removes any existing password from the account.
The Lock User and Permit Sudo options disappear.
The account is restricted from password-based logins for services like SMB shares and SSH sessions.
Configuring User ID and Groups Settings
Next, you must set a user ID (UID).
TrueNAS suggests a user ID starting at 1000, but you can change it if you wish.
We recommend using an ID of 1000 or greater for non-built-in users.
New users can be created with a UID of 0.
By default, TrueNAS creates a new primary group with the same name as the user. This happens when the Create New Primary Group toggle is enabled.
To add the user to an existing primary group instead, disable the Create New Primary Group toggle and search for a group in the Primary Group field.
You can add the user to more groups using the Auxiliary Groups drop-down list.
Configuring Directories and Permissions Settings
When creating a user, the home directory path is set to /nonexistent, which does not create a home directory for the user.
To set a user home directory, select a path using the file browser.
If the directory exists and matches the user name, TrueNAS sets it as the user home directory.
When the path does not end with a sub-directory matching the user name, TrueNAS creates a new sub-directory.
TrueNAS shows the path to the user home directory when editing a user.
You can set the home directory permissions directly under the file browser.
You cannot change TrueNAS default user account permissions.
Configuring Authentication Settings
You can assign a public SSH key to a user for key-based authentication by entering or pasting the public key into the Authorized Keys field.
Do not paste the private key.
If you are using an SSH public key, always keep a backup of the key.
You can set a specific shell for the user from the Shell dropdown options:
Use when creating a system account or to create a user account that can authenticate with shares but that cannot log in to the TrueNAS system using ssh.
Selecting Lock User disables all password-based functionality for the account until you clear the checkbox.
Permit Sudo allows the account to act as the system administrator using the sudo command. Leave it disabled for better security.
By default, Samba Authentication is enabled.
This allows using the account credentials to access data shared with SMB.
Editing User Accounts
To edit an existing user account, go to Credentials > Local Users, expand the user entry, and click editEdit to open the Edit User configuration screen. See Local User Screens for details on all settings.
This article provides instructions to manage local groups.
TrueNAS offers groups as an efficient way to manage permissions for many similar user accounts.
See Users for managing users.
The interface lets you manage UNIX-style groups.
If the network uses a directory service, import the existing account information using the instructions in Active Directory.
View Existing Groups
To see saved groups, go to Credentials > Local Groups.
By default, TruNAS hides the system built-in groups.
To see built-in groups, click settingsToggle Built-In Groups icon. The Show Built-In Groups dialog opens. Click Show.
Click settingsToggle Built-In Groups icon again to open the Hide Built-In Groups dialog. Click Hide to show only non-built-in groups on the system.
Adding a New Group
To create a group, go to Credentials > Local Groups and click Add.
Enter a unique number for the group ID in GID that TrueNAS uses to identify a Unix group. Enter a number above 1000 for a group with user accounts or for a system service enter the default port number for the service as the GID. Enter a name for the group. The group name cannot begin with a hyphen (-) or contain a space, tab, or any of these characters: colon (:), plus (+), ampersand (&), hash (#), percent (%), carat (^), open or close parentheses ( ), exclamation mark (!), at symbol (@), tilde (~), asterisk (*), question mark (?) greater or less than (<) (>), equal ). You can only use the dollar sign ($) as the last character in a user name.
If giving this group administration permissions, select Permit Sudo.
To allow Samba permissions and authentication to use this group, select Samba Authentication.
To allow more than one group to have the same group ID (not recommended), select Allow Duplicate GIDs.
Managing Group Members
To manage group membership, go to Credentials > Local Groups, expand the group entry, and click Members to open the Update Members screen.
To add user accounts to the group, select users and then click .
Select All Users to move all users to the selected group, or select multiple users by holding Ctrl while clicking each entry.
The SCALE Directory Services section contains options to edit directory domain and account settings, set up Idmapping, and configure authentication and authorization services in TrueNAS SCALE.
Choosing Active Directory or LDAP
When setting up directory services in TrueNAS, you can connect TrueNAS to either an Active Directory or an LDAP server.
Configuring Active Directory In TrueNAS
The Active Directory (AD) service shares resources in a Windows network.
AD provides authentication and authorization services for the users in a network, eliminating the need to recreate the user accounts on TrueNAS.
Once joined to an AD domain, you can use domain users and groups in local ACLs on files and directories.
You can also set up shares to act as a file server.
Joining an AD domain also configures the Privileged Access Manager (PAM) to let domain users log on via SSH or authenticate to local services.
Users can configure AD services on Windows or Unix-like operating systems using Samba version 4.
To configure an AD connection, you must know the AD controller domain and the AD system account credentials.
Preparation
Users can take a few steps before configuring Active Directory to ensure the connection process goes smoothly.
Verify Name Resolution
To confirm that name resolution is functioning, go to System Settings > Shell and use ping to check the connection to the AD domain controller.
When TrueNAS sends and receives packets without loss, the connection is verified. Press Ctrl + C to cancel the ping.
Another option is to use host -t srv _ldap._tcp.domainname.com to check the network SRV records and verify DNS resolution.
If the ping fails, go to Network and click Settings in the Global Configuration window. Update the DNS Servers and Default Gateway settings so the connection to your Active Directory Domain Controller can start.
Use more than one Nameserver for the AD domain controllers so DNS queries for requisite SRV records can succeed.
Using more than one Nameserver helps maintain the AD connection whenever a domain controller becomes unavailable.
Time Synchronization
Active Directory relies on the time-sensitive Kerberos protocol.
TrueNAS adds the AD domain controller with the PDC Emulator FSMO Role as the preferred NTP server during the domain join process.
If your environment requires something different, go to System Settings > General and add or edit a server in the NTP Servers window.
The local system time cannot be out of sync by more than five (5) minutes with the AD domain controller time in a default AD environment.
Use an external time source when configuring a virtualized domain controller.
TrueNAS generates alerts if the system time gets out-of-sync with the AD domain controller time.
TrueNAS has a few options to ensure both systems are synchronized:
Go to System Settings > General and click Settings in the Localization window to ensure the Timezone matches the AD Domain Controller.
Set either local time or universal time in the system BIOS.
Connect to the Active Directory Domain
To connect to Active Directory, click Settings in the Active Directory window and enter the AD Domain Name and account credentials.
Set Enable to attempt to join the AD domain immediately after saving the configuration.
TrueNAS offers advanced options for fine-tuning the AD configuration, but the preconfigured defaults are generally suitable.
TrueNAS can take a few minutes to populate the Active Directory information after configuration.
To check the AD join progress, open the assignmentTask Manager in the upper-right corner.
TrueNAS displays any errors during the join process in the Task Manager.
When the import is complete, AD users and groups become available while configuring basic dataset permissions or an ACL with TrueNAS cache enabled (enabled by default).
Joining AD also adds default Kerberos realms and generates a default AD_MACHINE_ACCOUNT keytab.
TrueNAS automatically begins using this default keytab and removes any administrator credentials stored in the TrueNAS configuration file.
Troubleshooting
If the cache becomes out of sync or fewer users than expected are available in the permissions editors, resync it by clicking Settings in the Active Directory window and selecting Rebuild Directory Service Cache.
If you are using Windows Server with 2008 R2 or older, try creating a Computer entry on the Windows server Organizational Unit (OU).
When creating the entry, enter the TrueNAS hostname in the name field and make sure it matches the:
Hostname: Go to Network and find Hostname in the Global Configuration window.
NetBIOS alias: Go to Credentials > Directory Services and click Settings in the Active Directory window. Click Advanced Options and find the NetBIOS alias.
Shell Commands
You can go to System Settings > Shell and enter various commands to get more details about the AD connection and users:
AD current state: midclt call activedirectory.get_state.
Connected LDAP server details: midclt call activedirectory.domain_info | jq. For example:
Enter getent passwd DOMAIN\\<user> to see more user details (<user> = desired user name).
If wbinfo -u shows more users than are available when configuring permissions and the TrueNAS cache is enabled, go to Directory Services, click Settings in the Active Directory window, and increase the AD Timeout value.
View AD groups: wbinfo -g. Enter getent group DOMAIN\\domain\ users to see more details.
View domains: wbinfo -m.
Test AD connection: wbinfo -t.
A successful test shows a message like checking the trust secret for domain YOURDOMAIN via RPC calls succeeded.
Test user connection to SMB share: smbclient '//0.0.0.0/smbshare -U AD.DOMAIN.COM\user
0.0.0.0 is the server address
smbshare is the SMB share name
AD.DOMAIN.COM is the trusted domain
user is the user account name to authenticate.
TrueNAS SCALE requires users to cleanly leave an Active Directory using the Leave Domain button under Advanced Settings to remove the AD object.
If the AD server moves or shuts down without you using Leave Domain, TrueNAS won’t remove the AD object, and you will have to clean up the Active Directory.
Go to Credentials > Directory Services and click Show next to Advanced Settings
Clean out Kerberos settings by clicking Settings in the Kerberos Settings window and clearing the Appdefaults Auxiliary Parameters and Libdefaults Auxiliary Parameters boxes. You may also need to clear out leftover Kerberos Realms and Keytabs by clicking the delete next to the remaining entries.
Click the IdmapActive Directory - Primary Domain entry and clear out the Active Directory settings, then click CONTINUE to clear the Idmap cache.
Go to Network and click Settings in the Global Configuration window. Remove the Active Directory Nameserver and enter a new one.
Ensure all other network settings are correct.
Go to System Settings > Services and change the workgroup to “WORKGROUP”.
Go to Credentials> Directory Services and edit the Active Directory config to the new domain.
Make sure the Kerberos settings and Idmap are correct and SMB is running.
Configuring LDAP In TrueNAS
TrueNAS has an Open LDAP client for accessing the information on an LDAP server. An LDAP server provides directory services for finding network resources like users and their associated permissions.
LDAP authentication for SMB shares is disabled unless you have configured and populated the LDAP directory with Samba attributes.
The most popular script for performing this task is smbldap-tools.
The LDAP server must support SSL/TLS, and you must import the certificate for the LDAP server CA.
TrueNAS does not support non-CA certificates.
Go to Credentials > Directory Services and click Configure LDAP.
Enter your LDAP server hostname, then enter your LDAP server Base and Bind domain names and the bind password. Check the Enable box to activate the server, then click Save.
To further modify the LDAP configuration, click Advanced Options. See the LDAP UI Reference article for details about advanced settings.
Troubleshooting Directory Services
If the AD or LDAP cache becomes out of sync or fewer users than expected are available in the permissions editors, resync the cache using the Rebuild Directory Service Cache.
Advanced Settings
To view Idmap and Kerberos Services, click Show next to Advanced Settings.
Idmap
The Idmap directory service lets users configure and select a backend to map Windows security identifiers (SIDs) to UNIX UIDs and GIDs. Users must enable the Active Directory service to configure and use Identity Mapping (Idmap).
Users can click Add in the Idmap window to configure backends or click on an already existing Idmap to edit it.
TrueNAS automatically generates an Idmap after you configure AD or LDAP.
Kerberos
Kerberos is a web authentication protocol that uses strong cryptography to prove the identity of both client and server over an insecure network connection.
Kerberos uses “realms” and “keytabs” to authenticate clients and servers.
A Kerberos realm is an authorized domain that a Kerberos server can use to authenticate a client.
By default, TrueNAS creates a Kerberos realm for the local system.
A keytab (“key table”) is a file that stores encryption keys for authentication.
TrueNAS SCALE allows users to configure general Kerberos settings, as well as realms and keytabs.
Kerberos Settings
Users can configure Kerberos settings by navigating to Directory Services and clicking Settings in the Kerberos Settings window.
Users can configure Kerberos realms by navigating to Directory Services and clicking Add in the Kerberos Realms window.
Enter the Realm and Key Distribution (KDC) names, then define the Admin and Password servers for the Realm.
TrueNAS automatically generates a Realm after you configure AD or LDAP.
Kerberos Keytabs
Kerberos keytabs let you join an Active Directory or LDAP server without a password.
TrueNAS automatically generates a Keytab after you configure AD or LDAP.
Since TrueNAS does not save the Active Directory or LDAP administrator account password in the system database, keytabs can be a security risk in some environments.
When using a keytab, create and use a less-privileged account to perform queries.
TrueNAS will store that account’s password in the system database.
Create a Keytab on Windows
To create a keytab on a Windows system, use the ktpass command:
ktpass.exe /out file.keytab /princ http/user@EXAMPLE.COM /mapuser user /ptype KRB5_NT_PRINCIPAL /crypto ALL /pass userpass
file.keytab is the file to upload to the TrueNAS server.
http/user@EXAMPLE.COM is the principal name written in the format host/user.account@KERBEROS.REALM.
The Kerberos realm is usually in all caps, but be sure to match the Kerberos Realm case with the realm name. See this note about using /princ for more details.
userpass is the user’s password.
/crypto is the cryptographic type.
Setting /crypto to ALL allows using all supported cryptographic types.
You can use specific keys instead of using ALL:
DES-CBC-CRC is backward compatible.
DES-CBC-MD5 adheres more closely to the MIT implementation and is backward compatible.
After generating the keytab, go back to Directory Services in TrueNAS and click Add in the Kerberos Keytab window to add it to TrueNAS.
To make AD use the keytab, click Settings in the Active Directory window and select it using the Kerberos Principal drop-down.
When using a keytab with AD, ensure the keytab username and userpass match the Domain Account Name and Domain Account Password.
To make LDAP use a keytab principal, click Settings in the LDAP window and select the keytab using the Kerberos Principal drop-down.
5.4 - Backup Credentials
This article provides infomation on backup credential tutorials on integrating TrueNAS SCLE with cloud storage providers by setting up SSH connections and keypairs.
TrueNAS backup credentials store cloud backup services credentials, SSH connections, and SSH keypairs.
Users can set up backup credentials with cloud and SSH clients to back up data in case of drive failure.
This article provides information on adding SSH connections, generating SSH keypairs, and adding the SSH public key to the root user.
5.4.1 - Adding Cloud Credentials
This article provides basic instructions on how to add backup cloud credentials, and more detailed instructions for some cloud storage providers.
The Cloud Credentials widget on the Backup Credentials screen allows users to integrate TrueNAS with cloud storage providers.
To maximize security, TrueNAS encrypts cloud credentials when saving them.
However, this means that to restore any cloud credentials from a TrueNAS configuration file, you must enable Export Password Secret Seed when generating that configuration backup.
Remember to protect any downloaded TrueNAS configuration files.
TrueNAS SCALE supports linking to 18 cloud storage providers. Authentication methods for each provider could differ based on the provider security requirements.
You can add credentials for many of the supported cloud storage providers from the information on the Cloud Credentials Screens.
This article provides instructions for the more involved providers.
Before You Begin
We recommend users open another browser tab to open and log into the cloud storage provider account you intend to link with TrueNAS.
Some providers require additional information that they generate on the storage provider account page.
For example, saving an Amazon S3 credential on TrueNAS could require logging in to the S3 account and generating an access key pair found on the Security Credentials > Access Keys page.
Have any authentication information your cloud storage provider requires on-hand to make the process easier. Authentication information could include but are not limited to user credentials, access tokens, and access and security keys.
Adding Cloud Credentials
To set up a cloud credential, go to Credentials > Backup Credentials and click Add in the Cloud Credentials widget.
Enter a credential name.
Select the cloud service from the Provider dropdown list. The provider required authentication option settings display.
Click Verify Credentials to test the entered credentials and verify they work.
Click Save.
Adding Amazon S3 Cloud Credentials
If adding an Amazon S3 cloud credential, you can use the default authentication settings or use advanced settings if you want to include endpoint settings.
After entering a name and leaving Amazon S3 as the Provider setting:
Navigate to My account > Security Credentials > Access Keys to obtain the Amazon S3 secret access key ID.
Access keys are alphanumeric and between 5 and 20 characters.
If you cannot find or remember the secret access key, go to My Account > Security Credentials > Access Keys and create a new key pair.
Enter or copy/paste the access key into Access Key ID.
Enter or copy/paste the Amazon Web Services alphanumeric password that is between 8 and 40 characters into Secret Access Key
(Optional) Enter a value to define the maximum number of chunks for a multipart upload in Maximum Upload Ports.
Setting a maximum is necessary if a service does not support the 10,000 chunk AWS S3 specification.
(Optional) Select Advanced Settings to display the endpoint settings.
To use the default endpoint for the region and automatically fetch available buckets leave this field blank.
For more information refer to the AWS Documentation for a list of Simple Storage Service Website Endpoints.
To detect the correct public region for the selected bucket leave the field blank.
Entering a private region name allows interacting with Amazon buckets created in that region.
c. (Optional) Configure a custom endpoint URL. Select Disable Endpoint Region.
d. (Optional) Select User Signature Version 2 to force using signature version 2 with the custom endpoint URL.
For more information on using this to sign API requests see Signature Version 2.
Click Verify Credentials to check your credentials for any issues.
Click Save
Adding Cloud Credentials that Authenticate with OAuth
Cloud storage providers using OAuth as an authentication method are Box, Dropbox, Google Drive, Google Photo, pCloud and Yandex.
After logging into the provider with the OAuth credentials, the provider provides the access token.
Google Drive and pCloud use one more setting to authenticate credentials.
Enter the name and select the cloud storage provider from the Provider dropdown list.
Enter the provider account email in OAuth Client ID and the password for that user account in OAuth Client Secret.
Click Log In To Provider. The Authentication window opens. Click Proceed to open the OAuth credential account sign in window.
Yandex displays a cookies message you must accept before you can enter credentials.
Enter the provider account user name and password to verify the credentials.
(Optional) Enter the value for any additional authentication method.
For pCloud, enter the pCloud host name for the host you connect to in Hostname.
For Google Drive when connecting to Team Drive, enter the Google Drive top-level folder ID.
If not populated by the provider after OAuth authentication, enter the access token from the provider. Obtaining the access token varies by provider.
Provider
Access Token
Box
For more information the user acess token for Box click here. An access token enables Box to verify a request belongs to an authorized session. Example token: T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl.
The authentication process creates the token for Google Drive and populates the Access Token field automatically. Access tokens expire periodically, so you must refresh them.
Google Photo
does not used an access token.
pCloud
Create the pCloud access token here. These tokens can expire and require an extension.
Click Verify Credentials to make sure you can connect with the entered credentials.
Click Save.
Adding BackBlaze B2 Cloud Credentials
BackBlaze B2 uses an application key and key ID to authenticate credentials.
From the Cloud Credentials widget, click Add and then:
Enter the name and select BackBlaze B2 from the Provider dropdown list.
Log into the BackBlaze account, go to App Keys page and add a new application key. Copy and past this into Key ID.
Generate a new application key on the BackBlaze B2 website.
From the App Keys page, add a new application key. Copy the application Key string Application Key.
Click Verify Credentials.
Click Save.
Adding Google Cloud Storage Credentials
Google Cloud Storage uses a service account json file to authenticate credentials.
From the Cloud Credentials widget, click Add and then:
Enter the name and select Google Cloud Storage from the Provider dropdown list.
Go to your Google Cloud Storage website to download this file to the TrueNAS SCALE server.
The Google Cloud Platform Console creates the file.
Upload the json file to Preview JSON Service Account Key using Choose File to browse the server to locate the downloaded file.
For help uploading a Google Service Account credential file click here.
Click Verify Credentials.
Click Save.
Adding Microsoft OneDrive Cloud Credentials
Microsoft OneDrive Cloud uses OAuth authentication, an access token, and Drives list, account type and IDs to authenticate credentials.
From the Cloud Credentials widget, click Add and then:
Enter the name and select Google Cloud Storage from the Provider dropdown list.
Enter your account credentials in OAuth Client ID and OAuth Client Secret. Click Log In To Provider.
Click Proceed on the Authentication window, and then enter your user credentials on the sign in screen.
Enter the token generated by the Microsoft OneDrive website through the OAuth authentication in Access Token if not populated by this process.
For help with the authentication token click Microsoft Onedrive Access Token.
Enter the Microsoft OneDrive drive information.
a. Select the drive(s) from the Drives List dropdown options of drives and IDs registered to the Microsoft account. This should populate Drive ID.
b. Select the Microsoft account type from the Drive Account Type dropdown options.
c. Enter the unique drive identifier in Drive ID if not already populated by selecting the drive(s) in Drives List.
If necessary to add valid drive IDs, from your Microsoft account and choose a drive from the Drives List dropdown list.
Click Verify Credentials.
Click Save.
Adding OpenStack Swift Cloud Credentials
OpenStack Swift authentication credentials change based on selections made in AuthVersion. All options use the user name, API key or password and authentication URL, and can use the optional endpoint settings.
c. Enter the ID in Tenant ID. Required for v2 and v3. (Optional) Enter a Tenant Domain.
d. (Optional) Enter the alternative authentication token in Auth Token.
(Optional) Enter endpoint settings.
a. Enter a region name in Region Name
b. (Optional) Enter the URL in Storage URL.
c. (Optional) Select service catalogue option from the Endpoint Type dropdown. Options are Public, Internal and Admin. Public is recommended.
Click Verify Credentials.
Click Save.
Using Automatic Authentication
Some providers can automatically populate the required authentication strings by logging in to the account.
To automatically configure the credential, click Login to Provider and entering your account user name and password.
We recommend verifying the credential before saving it.
This article provides information on adding SSH connections, generating SSH keypairs, and adding the SSH public key to the root user.
The SSH Connections and SSH Keypairs widgets on the Backup Credentials screen display a list of SSH connections and keypairs configured on the system.
Using these widgets, users can establish Secure Socket Shell (SSH) connections.
To begin setting up an SSH connection, go to Credentials > Backup Credentials and click the Add button on the SSH Connections widget.
Creating an SSH Connection
This procedure uses the semi-automatic setup method for creating an SSH connection with other TrueNAS or FreeNAS systems.
Semi-automatic simplifies setting up an SSH connection with another FreeNAS or TrueNAS system without logging in to that system to transfer SSH keys.
This requires an SSH keypair on the local system and administrator account credentials for the remote TrueNAS.
You must configure the remote system to allow root access with SSH.
You can generate the keypair as part of the semiautomatic configuration or a manually created one using SSH Keypairs.
Using the SSH Connections configuration screen:
Enter a name and select the Setup Method. If establishing an SSH connection to another TrueNAS server use the default Semi-automatic (TrueNAS only) option.
If connecting to a non-TrueNAS server select Manual from the dropdown list.
Enter the authentication settings.
a. Enter a valid URL scheme for the remote TrueNAS URL in TrueNAS URL. This is a required field.
b. Enter an Admin user name, which is the username on the remote system entered to log in via the Web UI to setup the connection. Or, leave Admin Username set to the default root user and enter the user password in Admin Password.
c. If two-factor authentication is enabled, enter the one-time password in One-Time Password (if neccessary).
d. Enter a Username, which is the user name on the remote system to log in via SSH.
e. Enter or import the private key from a previously created SSH keypair, or create a new one using the SSH Keypair widget.
(Optional) Select a security option from the Cipher dropdown list.
Select Standard for the most secure option, but this has the greatest impact on connection speed.
Select Fast for a less secure option than Standard but it can give reasonable transfer rates for devices with limited cryptographic speed.
Select Disabled to remove all security and maximize connection speed, but only disable security when using this connection within a secure, trusted network.
(Optional) Enter the number of seconds you want to have SCALE wait for the remote TrueNAS/FreeNAS system to connect in Connect Timeout.
Click Save. Saving a new connection automatically opens a connection to the remote TrueNAS and exchanges SSH keys.
The new SSH connection displays on the SSH Connection widget. To edit it, click on the name to open the SSH Connections configuration screen populated with the saved settings.
Manually Configuring an SSH Connection
This procedure provides instructions on setting up an SSH connection to a non-TruNAS or non-FreeNAS system.
To manually set up an SSH connection, you must copy a public encryption key from the local system to the remote system.
A manual setup allows a secure connection without a password prompt.
Using the SSH Connections configuration screen:
Enter a name and select Manual from the Setup Method dropdown list.
Enter the authentication settings.
a. Enter a host name or host IP address for the remote non-TruNAS/FreeNAS system as a valid URL. An IP address example is https://10.231.3.76. This is a required field.
b. Enter the port number of the remote system to use for the SSH connection.
c. Enter a user name for logging into the remote system in Username.
c. Select the private key from the SSH keypair that you used to transfer the public key on the remote NAS from the Private Key dropdown.
d. Enter the remote system SSH key for this TrueNAS SCALE system in Remote Host Key to authenticate the connection.
e. Click Discover Remote Host Key after properly configuring all other fields to connect to the remote system and attempt to copy the key string to the related SCALE field.
(Optional) Select a security option from the Cipher dropdown list.
Select Standard for the most secure option, but this has the greatest impact on connection speed.
Select Fast for a less secure option than Standard but it can give reasonable transfer rates for devices with limited cryptographic speed.
Select Disabled to remove all security in favor of maximizing connection speed, but only disable security when usisg this connection within a secure, trusted network.
(Optional) Enter the number of seconds you want to have SCALE wait for the remote TrueNAS/FreeNAS system to connect in Connect Timeout.
Click Save. Saving a new connection automatically opens a connection to the remote TrueNAS and exchanges SSH keys.
The new SSH connection displays on the SSH Connection widget. To edit it, click on the name to open the SSH Connections configuration screen populated with the saved settings.
Adding a Public SSH Key to the TrueNAS Root Account
This procedure covers adding a public SSH key to the root user account on the TrueNAS SCALE system and generating a new SSH Keypair to add to the remote system (TrueNAS or other).
Copy the SSH public key text or download it to a text file.
Log into the TrueNAS system that generated the SSH keypair and go to Credentials > Backup Credentials.
Click on the name of the keypair on the SSH Keypairs widget to open the keypair for the SSH connection.
Copy the text of the public SSH key or download the public key as a text file.
Add the public key to the root user account on the system where you want to register the public key.
Log into the TrueNAS system that you want to register the public key on and go to Credentials > Local Users.
Edit the root user account. Click on the expand_more icon and then click Edit to open the Edit User screen.
Paste the SSH public key text into the Authorized Keys field on the Edit User configuration screen in the Authentication settings.
Do not paste the SSH private key.
Click Save.
Add a new public SSH key to the remote system.
Generate a new SSH keypair in Credentials > Backup Credentials. Click Add on the SSH Keypairs widget and select Generate New.
Copy or download the value for the new public key.
Add the public key to the remote NAS.
If the remote NAS is not a TrueNAS system, refer to the documentation for that system, and find their instructions on adding a public SSH key.
Generating SSH Keypairs
TrueNAS generates and stores RSA-encrypted SSH public and private keypairs on the SSH Keypairs widget found on the Credentials > Backup Credentials screen.
Keypairs are generally used when configuring SSH Connections or SFTP Cloud Credentials.
TrueNAS does not support encrypted keypairs or keypairs with passphrases.
TrueNAS automatically generates keypairs as needed when creating new SSH Connections or Replication tasks.
To manually create a new keypair, click Add on the SSH Keypairs widget. Click Generate New on the SSH Keypairs screen. Give the new keypair a unique name and click Save. The keypair displays on the SSH Keypairs widget.
Use the download icon or click the more_vert at the bottom of the SSH Keypairs configuration screen to download these strings as text files for later use.
This article provides general information about articles that add or manage certificates, CSRs, CAs and ACME DNS-Authenticators in SCALE.
Use the Credentials > Certificates screen Certificates, Certificate Signing Requests (CSRs), Certificate Authorities (CA), and ACME DNS-Authenticators widgets to manage certificates, certificate signing requests (CSRs), certificate authorities (CA), and ACME DNS-authenticators.
Each TrueNAS comes equipped with an internal, self-signed certificate that enables encrypted access to the web interface, but users can make custom certificates for authentication and validation while sharing data.
Requirements Create an ACME DNS-Authenticator Create a Certificate Signing Request (CSR) Create ACME Certificate TrueNAS SCALE allows users to automatically generate custom domain certificates using Let’s Encrypt.
Requirements An email address for your TrueNAS SCALE Admin user. A custom domain that uses either Cloudflare or AWS Route 53. A DNS server that doesn’t cache for your TrueNAS SCALE system.
This article provides basic instructions on adding and managing SCALE ACME DNS-authenticators.
5.5.1 - Managing Certificates
This article provides information on adding or managing SCALE certificates.
The Certificates screen widgets display information for certificates, certificate signing requests (CSRs), certificate authorities(CAs), and ACME DNS-authenticators configured on the system, and provide the ability to add new ones.
TrueNAS comes equipped with an internal, self-signed certificate that enables encrypted access to the web interface, but users can make custom certificates for authentication and validation while sharing data.
Adding Certificates
By default, TrueNAS comes equipped with an internal, self-signed certificate that enables encrypted access to the web interface, but users can import and create more certificates by clicking Add in the Certificates window.
To add a new certificate:
Click Add on the Certificates widget to open the Add Certficates wizard.
First, enter a name as certificate identifier and select the type.
The Identifier and Type step lets users name the certificate and choose whether to use it for internal or local systems, or import an existing certificate.
Users can also select a predefined certificate extension from the Profiles dropdown list.
Next, specify the certificate options. Select the Key Type as this selection changes the settings displayed.
The Certificate Options step provides options for choosing the signing certificate authority (CSR), the type of private key type to use (as well as the number of bits in the key used by the cryptographic algorithm), the cryptographic algorithm the certificate uses, and how many days the certificate authority lasts.
Now enter the certificate location and basic information.
The Certificate Subject step lets users define the location, name, and email for the organization using the certificate.
Users can also enter the system fully-qualified hostname (FQDN) and any additional domains for multi-domain support.
Lastly, select any extension types you want to apply. Selecting Extended Key displays settings for Key Usage settings as well. Select any extra constraints you need for your scenario.
The Extra Constraints step contains certificate extension options.
Basic Constraints when enabled this limits the path length for a certificate chain.
Authority Key Identifier when enabled provides a means of identifying the public key corresponding to the private key used to sign a certificate.
Key Usage when enabled defines the purpose of the public key contained in a certificate.
Extended Key Usage when enabled it further refines key usage extensions.
Review the certificate options. If you want to change something Click Back to reach the screen with the setting option you want to change, then click Next to advance to the Confirm Options step.
Click Save to add the certificate.
Importing a Certificate
To import a certificate, first select Import Certificate as the Type and name the certificate.
Next, if the CSR exists on your SCALE system, select CSR exists on this system and then select the CSR.
Copy/paste the certificate and private Keys into their fields, and enter and confirm the passphrase for the certificate if one exists.
This article provides basic instructions on adding and managing SCALE certificate authorities (CAs).
The Certificate Authorities widget lets users set up a certificate authority (CA) that certifies the ownership of a public key by the named subject of the certificate.
To add a new CA:
First, add the name and select the type of CA.
The Identifier and Type step lets users name the CA and choose whether to create a new CA or import an existing CA.
Users can also select a predefined certificate extension from the Profiles drop-down list.
Next, enter the certificate options. Select the key type. The Key Type selection changes the settings displayed.
The Certificate Options step provides options for choosing what type of private key to use (as well as the number of bits in the key used by the cryptographic algorithm), the cryptographic algorithm the CA uses, and how many days the CA lasts.
Now enter the certificate subject information.
The Certificate Subject step lets users define the location, name, and email for the organization using the certificate.
Users can also enter the system fully-qualified hostname (FQDN) and any additional domains for multi-domain support.
Lastly, enter any extra constraints you need for your scenario.
The Extra Constraints step contains certificate extension options.
Basic Constraints when enabled this limits the path length for a certificate chain.
Authority Key Identifier when enable provides a means of identifying the public key corresponding to the private key used to sign a certificate.
Key Usage when enabled defines the purpose of the public key contained in a certificate.
Extended Key Usage when enabled it further refines key usage extensions.
Review the CA options. If you want to change something Click Back to reach the screen with the setting option you want to change, then click Next to advance to the Confirm Options step.
This article provides basic instructions on adding and managing SCALE certificate signing requests (CSRs).
The Certificate Signing Requests widget allows users configure the message(s) the system sends to a registration authority of the public key infrastructure to apply for a digital identity certificate.
To add a new CSR:
First enter the name and select the CSR type.
The Identifier and Type step lets users name the certificate signing request (CSR) and choose whether to create a new CSR or import an existing CSR.
Users can also select a predefined certificate extension from the Profiles drop-down list.
Next, select the certficate options for the CSR you selected.
The Certificate Options step provides options for choosing what type of private key type to use, the number of bits in the key used by the cryptographic algorithm, and the cryptographic algorithm the CSR uses.
Now enter the information about the certificate.
The Certificate Subject step lets users define the location, name, and email for the organization using the certificate.
Users can also enter the system fully-qualified hostname (FQDN) and any additional domains for multi-domain support.
Lastly, enter any extra constraints you need for your scenario.
The Extra Constraints step contains certificate extension options.
Basic Constraints when enabled this limits the path length for a certificate chain.
Authority Key Identifier when enable provides a means of identifying the public key corresponding to the private key used to sign a certificate.
Key Usage when enabled defines the purpose of the public key contained in a certificate.
Extended Key Usage when enabled it further refines key usage extensions.
Review the certificate options. If you want to change something Click Back to reach the screen with the setting option you want to change, then click Next to advance to the Confirm Options step.
This article provides basic instructions on adding and managing SCALE ACME DNS-authenticators.
Automatic Certificate Management Environment (ACME) DNS authenticators allows users to automate certificate issuing and renewal. The user must verify ownership of the domain before certificate automation is allowed.
The system requires an ACME DNS Authenticator and CSR to configure ACME certificate automation.
To add an authenticator,
Click Add on the ACME DNS-Authenticator widget to open the Add DNS Authenticator screen.
Enter a name, and select the authenticator you want to configure. The selection changes the screen settings.
If you select Cloudflare as the authenticator, you must enter your Cloudflare account email address, API key, and API token.
If you select Route53 as the authenticator, you must enter you Route53 Access key ID and secret access key.
This article provides information on SCALE two-factor authentication, setting it up and logging in with it enabled.
Two-factor authentication (2FA) is great for increasing security.
TrueNAS offers 2FA to ensure that entities cannot use a compromised administrator root password to access the administrator interface.
About SCALE 2FA
To use 2FA, you need a mobile device with the current time and date, and that has Google Authenticator installed.
Other authenticator applications can be used, but you will need to confirm the settings and QR codes generated in TrueNAS are compatible with your particular app before permanently activating 2FA.
Two-factor authentication is time-based and requires a correct system time setting.
Make sure Network Time Protocol (NTP) is functional before enabling is strongly recommended!
2FA adds an extra layer of security to your system to prevent someone from logging in, even if they have your password.
2FA requires you to verify your identity using a randomized 6-digit code that regenerates every 30 seconds (unless modified) to use when you log in.
Benefits of 2FA
Unauthorized users cannot log in since they do not have the randomized 6-digit code.
Authorized employees can securely access systems from any device or location without jeopardizing sensitive information.
Internet access on the TrueNAS system is not required to use 2FA.
Drawbacks of 2FA
2FA requires an app to generate the 2FA code.
If the 2FA code is not working or users cannot get it, the system is inaccessible through the UI and SSH (if enabled). You can bypass or unlock 2FA using the CLI.
Enabling 2FA
This short video demonstrates adding 2FA.
Video Player is loading.
Current Time 0:00
/
Duration -:-
Loaded: 0%
Stream Type LIVE
Remaining Time -0:00
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Set up a second 2FA device as a backup before proceeding.
Before you begin, download Google Authenticator to your mobile device.
1 Go to Credentials > 2FA to open the Two-Factor Auth screen.
2 Click Enable Two Factor Authentication. The Enable Two-Factor Authentication confirmation dialog opens. Click Confirm.
Disable Two-Factor Authentication displays next to Save to turn 2FA off.
3 Click Show QR. A QR code dialog opens.
4 Start Google Authenticator on the mobile device and scan the QR code. After scanning the code click Close to close the dialog on the Two-Factor Auth screen.
Disabling or Bypassing 2FA
Go to Credentials > 2FA to open the Two-Factor Auth screen. Click Disable Two-Factor Authentication.
If the device with the 2FA app is not available, you can use the system CLI to bypass 2FA with administrative IPMI or by physically accessing the system.
To unlock 2FA in the CLI, enter: midclt call auth.twofactor.update '{ "enabled":false }'
Reactivating 2FA
After disabling 2FA, if you want to enable it again at some point in the future, go to Credentials > 2FA to open the Two-Factor Auth screen.
Click Enable Two-Factor Authentication.
To change the system-generated Secret and Provisioning URI values, click Renew Secret.
If you want to save these values in a text file, click the visibility_off icon in the field to display the alphanumeric string and either enter or copy/paste the value into a text file.
Keep all login codes in protected and backed up location.
Using 2FA to Log in to TrueNAS
Enabling 2FA changes the login process for both the TrueNAS web interface and SSH logins.
Logging In Using the Web Interface
The login screen adds another field for the randomized authenticator code. If this field is not immediately visible, try refreshing the browser.
Enter the code from the mobile device (without the space) in the login window and use the root User name and password.
Logging In Using SSH
Confirm that you set Enable Two-Factor Auth for SSH in Credentials > 2FA.
Go to System Settings > Services and edit the SSH service.
a. Set Log in as Root with Password, then click Save.
b. Click the SSH toggle and wait for the service status to show that it is running.
Open the Google Authentication app on your mobile device.
Open a terminal and SSH into the system using its host name or IP address, the root account user name and password, and the 2FA code.
The Virtualization section allows users to set up Virtual Machines (VMs) to run alongside TrueNAS. Delegating processes to VMs reduces the load on the physical system, which means users can utilize additional hardware resources. Users can customize six different segments of a VM when creating one in TrueNAS SCALE.
TrueNAS assigns a portion of system RAM and a new zvol to each VM.
While a VM is running, these resources are not available to the host computer or other VMs.
TrueNAS VMs use the KVM virtual machine software.
This type of virtualization requires an x86 machine running a recent Linux kernel on an Intel processor with VT (virtualization technology) extensions or an AMD processor with SVM extensions (also called AMD-V).
Users cannot create VMs unless the host system supports these features.
To verify that you have Intel VT or AMD-V, open the Shell and run egrep '^flags.*(vmx|svm)' /proc/cpuinfo.
If device information appears, your system has VT. You can also check the processor model name (in /proc/cpuinfo) on the vendor’s website.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
This article provides instructions on how to create a bridge interface for the VM and provides a Linux and Windows example.
6.1 - Adding and Managing VMs
This article provides instructions on how to add or manage a virtual machine and installing an operating system in the VM.
A Virtual Machine (VM) is an environment on a host computer that you can use as if it were a separate, physical computer.
Users can use VMs to run multiple operating systems simultaneously on a single computer.
Operating systems running inside a VM see emulated virtual hardware rather than the host computer physical hardware.
VMs provide more isolation than Jails but also consumes more system resources.
TrueNAS assigns a portion of system RAM and a new zvol to each VM.
While a VM is running, these resources are not available to the host computer or other VMs.
TrueNAS VMs use the KVM virtual machine software.
This type of virtualization requires an x86 machine running a recent Linux kernel on an Intel processor with VT (virtualization technology) extensions or an AMD processor with SVM extensions (also called AMD-V).
Users cannot create VMs unless the host system supports these features.
To verify that you have Intel VT or AMD-V, open the Shell and run egrep '^flags.*(vmx|svm)' /proc/cpuinfo.
If device information appears, your system has VT. You can also check the processor model name (in /proc/cpuinfo) on the vendor’s website.
Creating a Virtual Machine
Before creating a virtual machine, you need an installer .iso or image file for the OS you intend to install, and a storage pool available for both the virtual disk and OS install file.
To create a new VM, go to Virtualization and click Add or Add Virtual Machines if you have not yet added a virtual machine to your system.
Configure each category of the VM according to your specifications, starting with the Operating System.
For more information see Virtualization Screens for more information on virtual machine screen settings.
Additional notes:
Compare the recommended specifications for your guest operating system with the available host system resources when allocating virtual CPUs, cores, threads, and memory size.
Do not allocate too much memory to a VM.
Activating a VM with all available memory allocated to it can slow the host system or prevent other VMs from starting.
We recommend using AHCI as the Disk Type for Windows VMs.
The VirtIO network interface requires a guest OS that supports VirtIO paravirtualized network drivers.
iXsystems does not have a list of approved GPUs at this time but does have drivers and basic support for the list of nvidia Supported Products.
Adding and Removing Devices
After creating the VM, add and remove virtual devices by expanding the VM entry on the Virtual Machines screen and clicking device_hubDevices.
Device notes:
A virtual machine attempts to boot from devices according to the Device Order, starting with 1000, then ascending.
A CD-ROM device allow booting a VM from a CD-ROM image like an installation CD.
The CD image must be available in the system storage.
Managing a Virtual Machine
After creating the VM and configuring devices for it, manage the VM by expanding the entry on the Virtual Machines screen.
An active VM displays options for settings_ethernetDisplay and keyboard_arrow_rightSerial Shell connections.
If the display connection screen appears distorted, try adjusting the display device resolution.
Use the State toggle or click stopStop to follow a standard procedure to do a clean shutdown of the running VM.
Click power_settings_newPower Off to halt and deactivate the VM, which is similar to unplugging a computer.
If the VM you created has no Guest OS installed, The VM State toggle and stopStop button might not function as expected.
The State toggle and stopStop button send an ACPI power down command to the VM operating system, but since an OS is not installed, these commands time out.
Use the Power Off button instead.
Installing an OS
When the VM is configured in TrueNAS and has an OS .iso, file attached, you can start the VM and begin installing the operating system.
Some operating systems can require specific settings to function properly in a virtual machine.
For example, vanilla Debian can require advanced partitioning when installing the OS.
Refer to the documentation for your chosen operating system for tips and configuration instructions.
Here is an example of installing a Debian OS in a TrueNAS VM. The Debian .iso is uploaded to the TrueNAS system and attached to the VM as a CD-ROM device.
Click on the Virtualization menu then click ADD to start the VM creation process using the wizard.
Operating System:
Guest Operating System: Linux
Name: debianVM
Description: Debian VM
CPU and Memory:
Change the memory size to 1024 MiB.
Disks:
Select Create new disk image.
Select the Zvol Location.
Change the size to 30 GiB.
Network Interface:
Attach NIC: Select the physical interface to associate with the VM.
Installation Media:
In this case the installation ISO is uploaded to /mnt/tank2/isostorage/. Click on the installation ISO, debian-11.0.0-amd64-netinst.iso.
If the ISO is or was not uploaded, you need to set Upload an installer image file.
Select a dataset to store the ISO, click Choose file, then click Upload. Wait for the upload to complete (this can take some time).
GPU:
Leave the default values.
Confirm Options
Verify the information is correct and then click Save.
After the VM is created, start it by expanding the VM entry (select the down-pointing arrow to the right of the VM name) and click Start.
Click Display to open a virtual monitor to the VM and see the Debian Graphical Installation screens.
Debian Graphical Install
Press Return to start the Debian Graphical Install.
Language: English
Location: United States
Keymap: American English
Installation begins
Continue if the network configuration fails.
Do not configure the network at this time.
Enter a name in Hostname.
Enter the root password and re-enter the root password.
Enter a name in New User.
Select the username for your account (it should already be filled in).
Enter and re-enter the password for the user account.
Choose the time zone, Eastern in this case.
Disk detection should begin
Partition disks: select Guided - use entire disk.
Select the available disk.
Select All files in one partition (recommended for new users).
Select Finish partitioning and write changes to disk.
Select Yes to Write the changes to disks?.
Installing the base system
Select No to the question Scan extra installation media.
Select Yes when asked Continue without a network mirror.
Installing software
Select No when asked Participate in the package usage survey.
Select Standard system utilities.
Click Continue when the installation finishes.
After the Debian installation finishes, close the display window.
Remove the device.
In the expanded section for the VM, click Power Off to stop the new VM.
a. Click Devices.
b. Remove the CD-ROM from the devices by clicking the and selecting Delete. Click Delete Device.
Return to the Virtual Machines screen and expand the new VM again.
Click Start.
Click Display.
The grub file does not run when you start the VM, you can do this manually after each start.
At the shell prompt:
Type FS0:Return.
Type cd EFIReturn.
Type cd DebianReturn.
Type grubx64.efiReturn.
To ensure it starts automatically, you create the startup.nsh file at the root directory on the vm. To create the file:
Go to the Shell.
At the shell prompt type edit startup.nsh.
In the editor type:
Type FS0:Return.
Type cd EFIReturn.
Type cd DebianReturn.
Type grubx64.efiReturn.
Use the Control+s keys (Command+s for Mac OS) then Return.
This article provides instructions on how to create a bridge interface for the VM and provides a Linux and Windows example.
If you want to access your TrueNAS SCALE directories from a VM, you must create a bridge interface for the VM to use.
Go to Virtualization, find the VM you want to use to access TrueNAS storage, and toggle it off.
Go to Network and find the active interface you used as the VM parent interface. Note the interface IP Address and subnet mask.
You can also get the IP address and subnet mask by going to Shell and entering ip a.
Click the interface. If selected, clear the DHCP checkbox, then click Apply.
Click Add in the Interfaces widget. Select Bridge for the Type and give it a name (must be in brX format). If selected, clear the DHCP checkbox, then select the active interface on the Bridge Members dropdown list. Click Add under IP Addresses and enter the active interface IP and subnet mask.
Click Apply, then click Test Changes. Once TrueNAS finishes testing the interface, click Save Changes.
Go to Virtualization, expand the VM you want to use to access TrueNAS storage, and click Devices. Click more_vert in the NIC row and select Edit.
Select the new bridge interface from the Nic to attach: dropdown list, then click Save.
You can now access your TrueNAS storage from the VM. You might have to set up shares or users with home directories to access certain files.
Examples
Linux VMs can access TrueNAS storage using FTP, SMB, and NFS.
In the example below, the Linux VM is using FTP to access a home directory for a user on TrueNAS.
Windows VMs can access TrueNAS storage using FTP and SMB.
In the example below, the Windows VM accessing an SMB share on TrueNAS.
This article provides instructions to configure TrueNAS SCALE and install NextCloud to support hosting a wider variety of media file previews such as HEIC, Mp4 and MOV files.
This article provides information on using the Docker image wizard to configure third-party applications like Pi-Hole in TrueNAS SCALE.
7.1 - Using Apps
This article provides information on deploying official apps in TrueNAS SCALE.
Both pre-built official containers and custom application containers can be deployed using the Applications page in the SCALE web interface.
The UI asks to use a storage pool for applications.
We recommend users keep the container use case in mind when choosing a pool.
Select a pool that has enough space for all the application containers you intend to use.
TrueNAS creates an ix-applications dataset on the chosen pool and uses it to store all container-related data.
Since TrueNAS considers shared host paths non-secure, apps that use shared host paths (such as those services like SMB are using) fail to deploy. If you want apps to deploy in shared host paths, disable Enable Host Path Safety Checks in Applications > Settings > Advanced Settings.
You can find additional options for configuring general network interfaces and IP addresses for application containers in Apps > Settings > Advanced Settings.
Official Applications
Official containers are pre-configured to only require a name during deployment.
A button to open the application web interface displays when the container is deployed and active.
Users can adjust the container settings by editing a deployed official container.
Saving any changes redeploys the container.
Video Player is loading.
Current Time 0:00
/
Duration -:-
Loaded: 0%
Stream Type LIVE
Remaining Time -0:00
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
To deploy a custom application container in the Scale web interface, go to Apps and click Launch Docker Image for more on the Docker image wizard screens and settings.
Upgrading Apps
You may want to upgrade apps as they receive big-fixing updates or QOL changes. To upgrade an app to the latest version, click the in an app widget to see the list of app options, then select Upgrade.
To upgrade multiple apps, click the checkbox in the widget of each app you want to update, then click Bulk Actions and select Upgrade.
This article provides basic information on adding or managing application catalogs in SCALE.
TrueNAS SCALE comes with a pre-built official catalog of iXsystems-approved Docker apps that includes Plex, MinIO, Nextcloud, Chia, and IPFS.
Users can also configure custom apps catalogs, although iXsystems does not directly support any non-official apps in a custom catalog.
Managing Catalogs
To manage and add catalogs, click on the Manage Catalogs tab on the Applications screen.
Users can edit, refresh, delete, and view the summary of a catalog by clicking the more_vert button next to the intended catalog.
Edit opens the Edit Catalog screen where users can change the name TrueNAS uses to look up the catalog or change the trains from which the UI should retrieve available applications for the catalog.
Refresh re-pulls the catalog from its repository and applies any updates.
Delete allows users to remove a catalog from the system. Users cannot delete the default Official catalog.
Summary lists all apps in the catalog and sorts them train, app, and version.
Users can filter the list by Train type (All, charts, or test), and by Status (All, Healthy, or Unhealthy).
Adding Catalogs
To add a catalog, click the Add Catalog button at the top right of on the Manage Catalogs tab. Fill out the Add Catalog form. As an example, the data below to add the Truecharts catalog to SCALE.
Enter the name in Catalog Name, for example, type truecharts.
Now select the train TrueNAS should use to retrieve available application information of the catalog. For example, select stable or incubator for the TrueCharts example.
Finially, enter the git repository branch TrueNAS should use for the catalog in Branch. For example, for TrueCharts, enter main.
This article provides information on using the Docker image wizard to configure third-party applications in TrueNAS SCALE.
SCALE includes the ability to run Docker containers using Kubernetes.
Docker is an open platform for developing, shipping, and running applications. Docker enables the separation of applications from infrastructure through OS-level virtualization to deliver software in containers.
Kubernetes is a portable, extensible, open-source container-orchestration system for automating computer application deployment, scaling, and management with declarative configuration and automation.
Always read through the Docker Hub page for the container you are considering installing so that you know all of the settings that you need to configure.
To set up a Docker image, first determine if you want the container to use its own dataset. If yes, create a dataset for host volume paths before you click Launch Docker Image.
Adding Custom Applications
When you are ready to create a container, open the APPS page, select the Available Applications tab, and then click Launch Docker Image.
Fill in the Application Name and click Next. Add the github repository URL in Image Repository for the docker container are setting up. For example, to add Pi-Hole in Launch Docker Image wizard, enter pihole/pihole as the PiHole project image repository on the Container Image configuration screen.
Click Next to move to the Container Environment Variables. Not all applications use environment variables. Check the Docker Hub for details on the application you want to install to verify which variables are required for that particular application.
For Pi-Hole, click Add then enter TZ for timezone, and then America/NewYork for the value. And click Add again to enter the second required variable WEBPASSWORD with a secure password like the exaple used, s3curep4$$word.
Click Next to advance to each of the Launch Docker Image configuration screens. Enter information required for the application you are adding on each screen that requires input.
When you reach Networking, if the container needs special networking configuration, enter it here. Click Next to open Port Forwarding to add ports. Click Add for each port you need to enter.
The PiHole Docker Hub page lists a set of four ports and the node port you need to set. Adjust these values if your system configuration requires changes. TrueNAS SCALE requires setting all Node Ports above 9000.
Click Next after configuring all the ports to open Storage.
Click Add for each host path you need to enter for the application. Pi-Hole uses two blocks of host path settings.
If your application requires directory paths, specific dataset, or storage arrangements, configure these before you starting the Launch Docker Image wizard.
You cannot interrupt the configuration wizard and save settings to leave and go create data storage or directories in the middle of the process.
You need to create these directories in a dataset on SCALE using System Settings > Shell before you begin installing this container.
You can add more volumes to the container later if they are needed.
Click Next to move through the configuration screens, entering settings where required for your application.
When you reach Confirm Options. Verify the the information on the screen and click Save.
TrueNAS SCALE deploys the container.
If correctly configured, the application widget displays on the Installed Applications screen.
When the deployment is completed the container becomes active. If the container does not autostart, click Start on the widget.
Clicking on the App card reveals details.
With PiHole as our example we navigate to the IP of our TrueNAS system with the port and directory address :9080/admin/.
Defining Container Settings
Define any commands and arguments to use for the image.
These can override any existing commands stored in the image.
You can also define additional environment variables for the container.
Some Docker images can require additional environment variables.
Be sure to check the documentation for the image you’re trying to deploy and add any required variables here.
Defining Networking
To use the system IP address for the container, set Host Networking.
The container is not given a separate IP address and the container port number is appended to the end of the system IP address.
See the Docker documentation for more details.
Users can create additional network interfaces for the container if needed.
Users can also give static IP addresses and routes to new interface.
By default, containers use the DNS settings from the host system.
You can change the DNS policy and define separate nameservers and search domains.
See the Docker DNS services documentation for more details.
Defining Port Forwarding List
Choose the protocol and enter port numbers for both the container and node.
Multiple port forwards can be defined.
The node port number must be over 9000.
Make sure no other containers or system services are using the same port number.
Defining Host Path Volumes
Scale storage locations can be mounted inside the container.
To mount Scale storage, define the path to the system storage and the container internal path for the system storage location to appear.
You can also mount the storage as read-only to prevent the container from being used to change any stored data.
For more details, see the Kubernetes hostPath documentation.
Defining Other Volumes
Users can create additional Persistent Volumes (PVs) for storage within the container.
PVs consume space from the pool chosen for Application management.
You need to name each new dataset and define a path where that dataset appears inside the container.
To view created container datasets, go to Storage and expand the pool used for applications.
Expand /ix-applications/releases//volumes/ix-volumes/.
Setting Up Persistent Volume Access
Users developing applications should be mindful that if an application uses Persistent Volume Claims (PVC), those datasets won’t be mounted on the host, and therefore are not accessible within a file browser. This is upstream zfs-localpv behavior which is being used for managing PVC(s)
If you want to consume or have file browser access to data that is present on the host, set up your custom application to use host path volumes.
Alternatively, you can use the network to copy directories and files to and from the pod using k3s kubectl commands.
To copy from a pod in a specific container:
k3s kubectl cp <file-spec-src> <file-spec-dest> -c <specific-container>
To copy a local file to the remote pod:
k3s kubectl cp /tmp/foo <some-namespace>/<some-pod>:/tmp/bar
To copy a remote pod file locally:
k3s kubectl cp <some-namespace>/<some-pod>:/tmp/foo /tmp/bar
Accessing the Shell in an Active Container
To access the shell in an active container, first identify the namespace and pod for the container.
In the Scale UI, go to System Settings > Shell to begin entering commands:
To view container namespaces: k3s kubectl get namespaces.
To view pods by namespace: k3s kubectl get -n <NAMESPACE> pods.
To access container shell: k3s kubectl exec -n <NAMESPACE> --stdin --tty <POD> -- /bin/bash.
View details about all containers: k3s kubectl get pods,svc,daemonsets,deployments,statefulset,sc,pvc,ns,job --all-namespaces -o wide.
Get container status: k3s kubectl describe -n <CONTAINER NAMESPACE> <POD-ID>.
This article provides instructions for a basic Nextcloud installation on TrueNAS SCALE.
Nextcloud provides a suite of client-server software for creating and using file hosting services.
TrueNAS SCALE includes Nextcloud in the catalog of available applications you can install on your system.
Before You Begin
Before using SCALE to install the Nextcloud application you need to configure TrueNAS SCALE storage for Nextcloud application to use.
Set up an account with Nextcloud if you don’t already have one.
Installing Nextcloud
This procedure includes setting up the pool storage for Nextcloud and the basic installation and configuration of the application.
Adding Nextcloud Storage
Nextcloud needs a primary dataset for the application. You can add as many child datasets as your use case requires such as a primary data volume, a postgres data volume (db) and a postgres backup volume (dbbackup), or for extra mount path volume (opt).
You can either create these datasets under an existing dataset you use for applications (apps), or if you have enough disks on your TrueNAS system and want to create a new pool to use just for media files, create a new pool and then add the Nextcloud datasets as child datasets to the root dataset.
To create a new pool, go to Storage and click Create Pool to add a new pool.
To add under an existing dataset, click the for the dataset where you want to add the Nextcloud datasets, and then select Add Dataset.
In our Nextcloud example we use pool tank, parent dataset apps* and then created the *nextcloud* dataset.
Next, select the nextcloud dataset, click and select Add Dataset to add the child dataset data and click Save.
Installing Nextcloud
Official Applications
Official applications listed on Available Applications are pre-configured to only require a name during deployment.
Installing Nextcloud in SCALE
This procedure installs Nextcloud with basic settings and only one dataset.
Go to Apps to open the Applications screen and then click on the Available Applications tab.
Set the pool SCALE applications use.
If you have not installed an application yet, SCALE opens the Choose a pool for Apps dialog.
Select the pool where you created the Nextcloud dataset from the Pools dropdown list and then click Choose to set the pool for all applications.
After SCALE finishes configuring the system to use this pool, a confirmation dialog displays. Click Close
Locate the nextcloud widget and then click Install to open the Nextcloud configuration wizard.
Enter a name for the app in Application Name and then click Next. This example uses nextcloud.
Enter a user name and password to use as a Nextcloud login on the Nextcloud Configuration settings screen, and then click Next.
For a basic installation you can leave the default values in all settings except Username and Password. This example uses admin as the user.
TrueNAS populates Nextcloud host with the IP address for your server, Nextcloud data directory with the correct path, and Node Port to use for Nextcloud with the correct port number.
Enter the storage settings for the Nextcloud dataset.
Enter or browse to the location where you created the nextcloud/data dataset in Host Path for Nextcloud Data Volume.
This example uses the /mnt/tank/apps**/nextcloud/data*** path.
To collapse the directory tree, click the arrow to the left of /mnt.
Do not click on /mnt as this changes the path and you have to reselect your dataset
This completes the basic storage setup for Nextcloud. Click Next.
(Optional) Select Enable cronjobs for nextcloud on the CronJob configuration screen, and then click Next.
Accept the remaining setting defaults and click Next on the Scaling/Upgrade Policy and Advanced DNS Settings screens.
Review the configuration settings and then click Back to fix any errors or Save to complete the installation.
Click on the Installed Applications tab to see the nextcloud widget.
When the nextcloud widget displays ACTIVE, click Web Portal to open the Nextcloud sign in screen in a new browser window.
Refer to the Nextcloud documentation for details about using the Nextcloud platform:
This article provides instructions to configure TrueNAS SCALE and install NextCloud to support hosting a wider variety of media file previews such as HEIC, Mp4 and MOV files.
NextCloud is a drop-in replacement for many popular cloud services, including file sharing, calendar, groupware and more.
One of its more common uses for the home environment is serving as a media backup, and organizing and sharing service.
This procedure demonstrates how to set up NextCloud on TrueNAS SCALE, and configure it to support hosting a wider variety of media file previews, including High Efficiency Image Fromat (HEIC), MP4 and MOV files.
The instructions in this article apply to SCALE 22.02.3 and later.
Before You Begin
Before using SCALE to install the NextCloud application you need to configure TrueNAS SCALE storage for NextCloud application to use.
You also use the SCALE Shell to set the ffmpg binary before you begin the NextCloud installation and configuration.
Set up an account with NextCloud if you don’t already have one.
Installing NextCloud on SCALE
In this procedure you:
Add the storage NextCloud uses
Set up the ffmpg binary
Install the NextCloud app in SCALE
Adding NextCloud Storage
NextCloud needs a primary dataset for the application, and four datasets it uses for the primary data volume, a postgres data volume (db) and one as a postgres backup volume (dbbackup), and an one for extra mount path volume (opt).
You can either create these datasets under an existing dataset you use for applications (apps), or if you have enough disks on your TrueNAS system and want to create a new pool to use just for media files, create a new pool and then add the NextCloud datasets as child datasets to the root dataset.
To create a new pool, go to Storage and click Create Pool to add a new pool.
To add under an existing dataset, click the for the dataset where you want to add the NextCloud datasets, and then select Add Dataset.
In our Nextcloud example we use pool tank, parent dataset apps* and then created the *nextcloud* dataset.
Next, select the nextcloud dataset, click and select Add Dataset to add a child dataset. Enter data in Name and click Save.
Repeat this step three more times to add the three child datasets to the nextcloud dataset, one named db, the next dbbackup, and then finally opt.
When finished you should have the nextcloud parent dataset with four child datasets under it. Our example paths are:
/mnt/tank/apps/nextcloud/data
/mnt/tank/apps/nextcloud/db
/mnt/tank/apps/nextcloud/dbbackup
/mnt/tank/apps/nextcloud/opt
Set Up the ffmpg Binary
Go to System > Shell and enter these six commands:
cd /mnt/tank/apps/nextcloud/opt
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz --wildcards \*static/ffmpeg
rm ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-*-static/ bin/
chown root:root bin/ffmpeg
With the ffmpeg binary set you can now install NextCloud on your TrueNAS SCALE.
Installing NextCloud in SCALE
Go to Apps to open the Applications screen and then click on the Available Applications tab.
Set the pool SCALE applications use.
If you have not installed an application yet, SCALE opens the Choose a pool for Apps dialog. Select the pool where you created the NextCloud datasets from the Pools dropdown list and then click Choose to set the pool for all applications.
After SCALE finishes configuring the system to use this pool, a confirmation dialog displays. Click Close
Locate the nextcloud widget and then click Install to open the Nextcloud configuration wizard.
Enter a name for the app in Application Name and then click Next. This example uses nextcloud.
Enter a user name and password to use as a NextCloud login on the Nextcloud Configuration settings screen, and then click Next.
For a basic installation you can leave the default values in all settings except Username and Password. This example uses admin as the user.
TrueNAS populates Nextcloud host with the IP address for your server, Nextcloud data directory with the correct path, and Node Port to use for Nextcloud with the correct port number.
Enter the storage settings for each of the four datasets created for NextCloud.
Enter or browse to the location where you created the nextcloud/data dataset in Host Path for Nextcloud Data Volume.
This example uses the /mnt/tank/apps**/nextcloud/data*** path.
Click Add to display the Mount Path in Pod and Host Path fields.
Enter /opt in Mount Path in Pod, and then either enter or browse to the location where you created the nextcloud/opt dataset in Host Path.
This example uses the /mnt/tank/apps**/nextcloud/opt*** path.
Select Enable Host Path for Postgres Data Volume, and then enter or browse to the location where you created the nextcloud/db dataset in Host Path for Postgres Data Volume.
Select Enable Host Path for Postgres Backup Volume, and then enter or browse to the location where you created the nextcloud/dbbackup dataset in the Host Path for Progres Backup Volume. This completes the storage setup for NextCloud. Click Next.
Select Enable cronjobs for nextcloud on the CronJob configuration screen, and then click Next.
Accept the remaining setting defaults and click Next on the Scaling/Upgrade Policy and Advanced DNS Settings screens.
Review the configuration settings and then click Back to fix any errors or Save to complete the installation.
Click on the Installed Applications tab to see the nextcloud widget.
When the nextcloud widget displays ACTIVE, click Web Portal to open the NextCloud sign in screen in a new browser window.
This article provides basic installation instruction for the Chia application using both the TrueNAS webUI and CLI commands.
SCALE includes Chia in its Official Apps catalog. Chia Blockchain is a new cryptocurrency that uses Proof of Space and Time. Instead of using expensive hardware that consumes exorbitant amounts of electricity to mine cryptos, it leverages existing empty hard disk space on your computer(s) to farm cryptos with minimal resources, such as electricity.
Install the Chia App
Click on the Chia app Install button in the Available Applications list.
Name your App and click Next. In this example, the name is chia1.
Leave Enable Custom Host Path for Chia Configuration Volume and Enable Custom Host Path for Chia Plots Volume unchecked and click Next.
Click Next in the Chia Environment Variables screen. You add one later.
Confirm the options and click Submit.
Continue through the wizard and create the new application. After a minute or two the new Chia container starts and shows ACTIVE status. Click the three-dot menu on the top-right and launch the Shell.
Leave the defaults for the pod (there is only one) and use the selected /bin/bash shell.
The first time Chia launches, it automatically creates a new private key set (for plotting purposes) and wallet. However, the private key set is not preserved across container restarts. To make sure your keys and wallet persist, save the Mnemonic Seed that was created and make sure it gets used at each container initialization. To do this, start by displaying the current key information by running the following shell command:
/chia-blockchain/venv/bin/chia keys show --show-mnemonic-seed
We suggest you make a backup copy of the information provided here for your reference in case you lose the keyfile. To make sure the same key is used for this container going forward, you save the mnemonic-seed phrase to one of your host volumes on TrueNAS.
Copy and paste the 24 secret words of the mnemonic seed into a new shell command:
echo "my unique 24 secret words here" > /plots/keyfile
Now exit the shell and go back to the Installed Apps page. Click Edit on your Chia container.
Scroll down until you find the Container Environment Variables section and add a new variable as shown below:
Environment Variable Name: keys
Environment Variable Value: /plots/keyfile
If you entered the command correctly, you should see some output that looks like the screenshot.
Save the change, and the chia container should restart automatically. To confirm your changes have persisted you can log into the containers shell again and run the same /chia-blockchain/venv/bin/chia keys show --show-mnemonic-seed command to show your keys. If the keys are identical to what you previously recorded, then you are done! This Chia container persists across reboots, upgrades, and re-deployments.
At this point, you are ready to begin farming Chia. This is a CLI process and beyond the scope of this quick how-to, but we recommend you start by reading up on their CLI reference materials, Quick Start guide and other documentation.
This article provides information on configuring MinIO using the Docker image or the official application widget for MinIO.
On TrueNAS SCALE 20.12-ALPHA and later, users can create a MinIO S3 distributed instance to scale out and handle individual node failures. A node refers to a single TrueNAS storage system in a cluster.
In the images below, we used four TrueNAS systems to create a distributed cluster.
For more information on MinIO distributed setups, refer to the MinIO documentation.
First Steps
Before you configure MinIO, you must create a dataset and shared directory for the persistent MinIO data.
Go to Storage > Pools and select the pool you want to place the dataset in.
You can use an existing pool or create a new one.
After creating the dataset, go to System > Shell and create the directory MinIO stores information the application uses. MinIO uses /data but allows users to replace this with the directory of their choice. Change to the /pool/dataset directory and then use the mkdir /mnt/data command to create the /data directory.
For a distributed configuration, repeat this on all system nodes in advance.
Note the system (node) IP addresses or hostnames and have them ready for configuration. Also, have your S3 username and password ready for later.
Configuring MinIO
You can configure the MinIO application using either the Launch Docker Image button or the Install button on the MinIO application card on the Available Applications tab.
Setting Up Using Launch Docker Image
On your first node, go to Apps and click Launch Docker Image.
First, enter a name in Application Name (for example, minio for a normal configuration or minio-distributed for a distributed MinIO configuration).
A MinIO in distributed mode allows you to pool multiple drives (even if they are different machines) into a single object storage server for better data protection in the event of single or multiple node failures because MinIO distributes the drives across several nodes. For more information, see the [Distributed MinIO Quickstart Guide (https://docs.min.io/docs/distributed-minio-quickstart-guide).
Click Next to continue after completing each section of the configuration form.
Enter minio/minio as the image name under Image Repository. Click Next.
Configure the Container Entrypoint arguments.
Click the Add button to the right of Configure Container Args twice to add two Arg fields.
In the first Arg field type server.
In the second Arg field, type the valid IP or hostname of each TrueNAS system on the network, the MinIO port number, and the directory you created for MinIO. Use this format: http://0.0.0.0/9000/data.
For a distributed cluster, add the valid TrueNAS system (node) IP addresses/hostnames.
The order is important, so use the same order across all the nodes.
MinIO containers use server port 9000. The MinIO Console communicates using port 9001.
Use the /data path which is set up in the next steps.
Next, create the Container Environment Variables and define the MINIO_ROOT USER and MINIO_ROOT_PASSWORD arguments and their values.
For the ROOT_USER value, use a name up to 20 characters. For the ROOT_PASSWORD, use a string of 8 to 40 randomized characters.
MinIO recommends using a long password string of unique random characters.
Refer to MinIO User Management for more information.
Keep all passwords and credentials secured and backed up.
For a distributed cluster, ensure the values are identical between nodes and fill the Environment Variable Value with proper random credentials.
Click Next until the Storage section displays.
Select the dataset you created for the MinIO container for the Host Path and enter the /data directory under Mount Path, then click Next.
Click Next until you reach the Scaling/Upgrade Policy screen.
Select the Update Strategy option you want to deploy.
Use Kill existing pods before creating new ones to recreate the container or Create new pods and then kill old ones if you want rolling upgrades. Click Next.
Confirm your options, then click Save to complete the first node.
Now that the first node is complete, you can configure any remaining nodes (including datasets and directories).
Setting Up Using MinIO Install
Go to Apps and select the Available Applications tab to display the MinIO application card. Click Install on the MinIO card to open the MinIO configuration wizard.
First, enter a name for the MinIO cluster. Click Next. Type the name in all lowercase.
Next, add the Workload Configuration settings.
Select an update strategy. Use Kill existing pods before creating new ones to recreate the container or Create new pods and then kill old ones if you want rolling upgrades.
We recommend Kill existing pods before creating new ones. Click Next.
Now enter the MinIO Configuration settings.
If you want to run your MinIO instance to connect to a distributed MinIO cluster, set Enable Distributed Mode and input your Distributed Minio Instance URI. See the Distributed MinIO Quickstart Guide for more information.
Click the Add button to the right of Configure MinIO Extra Arguments twice to display two Arg fields.
In the first Arg field type server.
In the second Arg field type the valid IP or hostname of each TrueNAS systems on the network, the MinIO port number, and the directory you created for MinIO. Use this format, http://0.0.0.0/9000/data.
Add the other valid TrueNAS system IP addresses/hostnames of your various nodes.
The order is important, so use the same order across all the nodes.
MinIO containers use server port 9000. The MinIO UI communicates using port 9002.
Enter the S3 root user in Root User and the S3 password in the Root Password fields.
Click the Add button to the right of Container Environment Variables and enter the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD arguments and values.
For the ROOT_USER value, use a name up to 20 characters. For the ROOT_PASSWORD, use 8 to 40 randomized characters.
MinIO recommends using a long password string of unique random characters.
Refer to MinIO User Management for more information.
Keep all passwords and credentials secured and backed up.
You can configure the API and UI access node ports and the MinIO domain name if you have TLS configured for MinIO. You can also configure a MinIO certificate if you wish.
Now enter the Storage settings.
If you want to use a host path to store your MinIO data volume, select the Enable Host Path for MinIO Data Volume checkbox and select a path.
Under Configure Extra Host Path Volumes, enter the /data directory under Mount Path in Pod, then select the directory or dataset you created earlier and click Next.
Add the Advanced DNS Settings next.
You can configure additional DNS options in Advanced DNS Settings. Click Add to add more DNS option entries. Click Next.
Finally, confirm options. Make sure the configuration summary meets your needs, then click Save.
Accessing the Minio Setup
Once you’re done creating datasets, you can navigate to the TrueNAS address at port :9000 to see the MinIO UI. If you created a distributed setup, you can see all your TrueNAS addresses.
Log in with the ROOT_USER and ROOT_PASSWORD keys you created as Container Environment Variables.
This article provides information on updating MinIO from 1.6.58 to newer versions.
Overview
MinIO fails to deploy if you update your version 2022-10-24_1.6.58 Minio app to 2022-10-29_1.6.59 or later using the TrueNAS web UI.
Your app logs display an error similar to the following:
ERROR Unable to use the drive /export: Drive /export: found backend type fs, expected xl or xl-single: Invalid arguments specified.
If you get this error after upgrading your MinIO app, use the app Roll Back function and return to 2022-10-24_1.6.58 to make your MinIO app functional again.
Follow the instructions here to make a new, up-to-date MinIO deployment in TrueNAS. Make sure it is version 2022-10-29_1.6.59 or later.
Download MinIO Client
Download the MinIO Client here for your OS and follow the installation instructions. The MinIO Client (mc) lets you create and manage MinIO deployments via your system command prompt.
Add both TrueNAS MinIO Deployments to MC
Open a terminal or CLI.
If you are on a Windows computer, open PowerShell and enter wsl to switch to the Linux subsystem.
Change directories to the folder that contains mc.exe.
Add your old deployment to mc by entering: ./mc alias set old-deployment-name http://IPaddress:port/ rootuser rootpassword.
old-deployment-name is your old MinIO app name in TrueNAS.
http://IPaddress:port/ is the IP address and port number the app uses.
rootuser is the root username.
rootpassword is the root password.
Add your new deployment to mc using the same command with the new alias: ./mc alias set new-deployment-name http://IPaddress:port/ rootuser rootpassword.
new-deployment-name is your new MinIO app name in TrueNAS.
http://IPaddress:port/ is the IP address and port number the app uses.
rootuser is the root username.
rootpassword is the root password.
Port the configurations from the old MinIO deployment into the new one.
Export your old MinIO app configurations by entering ./mc.exe admin config export old-deployment-name > config.txt.
MinIO Client exports the config file to the current directory path.
old-deployment-name is your old MinIO app name in TrueNAS.
In this case, the config file exports to the User Downloads folder.
Import the old app config file into the new app by entering: ./mc.exe admin config import old-deployment-name < config.txt.
new-deployment-name is your new MinIO app name in TrueNAS.
config.txt is the config file name.
Restart the MinIO service
Restart the new MinIO app to apply the configuration changes.
./mc.exe admin service restart new-minio-deployment
new-deployment-name is your new MinIO app name in TrueNAS.
Port bucket data from the old deployment into the new one.
Export the old app bucket metadata by entering ./mc.exe admin cluster bucket export old-minio-deployment.
Import the metadata into the new app with ./mc.exe admin cluster bucket import new-minio-deployment cluster-metadata.zip
old-deployment-name is your old MinIO app name in TrueNAS.
new-deployment-name is your new MinIO app name in TrueNAS.
cluster-metadata.zip is the metadata zip file name.
Port Identity and Access Management (IAM) Settings
Export the old app IAM settings by entering ./mc.exe admin cluster iam export old-minio-deployment.
Import the IAM settings into the new app with ./mc.exe admin cluster iam import new-minio-deployment alias-iam-info.zip.
old-deployment-name is your old MinIO app name in TrueNAS.
new-deployment-name is your new MinIO app name in TrueNAS.
alias-iam-info.zip is the IAM settings zip file name.
Move Objects and Data
Create buckets in your new MinIO app to move data and objects to.
Move the objects and data from your old MinIO app to your new one using ./mc.exe mirror --preserve --watch source/bucket target/bucket.
Repeat for every bucket you intend to move.
source/bucket is your old MinIO app name in TrueNAS and one of its buckets.
target/bucket is your new MinIO app name in TrueNAS and one of its buckets.
Delete Old App
After you have moved all data from the old app to the new one, return to the TrueNAS UI Apps screen and stop both Minio apps.
Delete the old MinIO app. Edit the new one and change the API and UI Access Node Ports to match the old MinIO app.
This article provides information on using the Docker image wizard to configure third-party applications like Pi-Hole in TrueNAS SCALE.
SCALE includes the ability to run Docker containers using Kubernetes.
Docker is an open platform for developing, shipping, and running applications. Docker enables the separation of applications from infrastructure through OS-level virtualization to deliver software in containers.
Kubernetes is a portable, extensible, open-source container-orchestration system for automating computer application deployment, scaling, and management with declarative configuration and automation.
Always read through the Docker Hub page for the container you are considering installing so that you know all of the settings that you need to configure.
To set up a Docker image, first determine if you want the container to use its own dataset. If yes, create a dataset for host volume paths before you click Launch Docker Image.
When you are ready to create a container, open the APPS page and click Launch Docker Image.
Fill in the Application Name and click Next. Add the github repository URL in Image Repository for the docker container are setting up. For the PiHole project enter pihole/pihole.
Click Next to move to the Container Environment Variables.
For Pi-Hole, click Add then enter TZ for timezone, and then America/NewYork for the value.
Click Add again and enter WEBPASSWORD and then a secure password like the example used, s3curep4$$word.
Always refer to the docker hub page for information on what the docker container requires.
Click Next to open Networking. If the container needs special networking configuration, enter it here. Click Next to open Port Forwarding to add the Pi-Hole ports.
The PiHole Docker Hub page lists a set of four ports and the node port you need to set. Adjust these values if your system configuration requires changes. TrueNAS SCALE requires setting all Node Ports above 9000.
Click Next after configuring all the ports to open Storage.
Click Add twice to add two blocks of host path settings. Browse to the dataset and directory paths you created before beginning the container deployment.
PiHole uses volumes store your data between container upgrades.
You need to create these directories in a dataset on SCALE using System Settings > Shell before you begin installing this container.
You can add more volumes to the container if needed.
When all the settings are entered, click Next until you reach Confirm Options. Verify the the information on the screen and click Save.
TrueNAS SCALE deploys the container.
If correctly configured, the Pi-Hole widget displays on the Installed Applications screen.
When the deployment is completed the container becomes active. If the container does not autostart, click Start on the widget.
Clicking on the App card reveals details.
With PiHole as our example we navigate to the IP of our TrueNAS system with the port and directory address :9080/admin/.
This article provides information on changing settings that control how TrueNAS displays report graphs, interacting with graphs, and the TrueCommand Enhancement option.
8.1 - Configuring Reporting
This article provides information on changing settings that control how TrueNAS displays report graphs, interacting with graphs, and the TrueCommand Enhancement option.
TrueNAS has a built-in reporting engine that provides helpful graphs and information about the system.
TrueNAS uses Graphite to gather metrics and create visualizations.
TrueNAS uses collectd to provide reporting statistics.
Reporting data is saved to permit viewing and monitoring usage trends over time.
This data is preserved across system upgrades and restarts.
Because reporting data is written frequently do not store it on the boot pool or operating system device.
TrueNAS clears the report history when you change the report CPU, graph age, or graph points options.
Data files are saved in /var/db/collectd/rrd/.
Configuring Report Settings
Click the settings to open the Reports Configuration configuration screen where you control how TrueNAS displays the graphs.
Select the general options you want to use in your TrueNAS.
Specify either the host name or IP address of the Graphite server you want to use.
Click Save.
TrueCommand Enhancement
To increase TrueNAS reporting functionality connect it to our TrueCommand multi-system management software.
TrueCommand Reports offer enhanced features like creating custom graphs and comparing utilization across multiple systems.
Interacting with Graphs
Click on and drag a certain range of the graph to expand the information displayed in that selected area in the Graph.
Click on the icon to zoom in on the graph.
Click on the icon to zoom out on the graph.
Click the to move the graph forward.
Click the to move the graph backward.
File sharing is one of the primary benefits of a NAS. TrueNAS helps foster collaboration between users through network shares.
TrueNAS SCALE allows users to create and configure block (iSCSI) shares targets, Windows SMB shares, Unix (NFS) shares, and WebDAV shares.
When creating zvols for shares, avoid giving them names with capital letters or spaces since they can cause problems and failures with iSCSI and NFS shares.
About Block (iSCSI) Shares Targets Internet Small Computer Systems Interface (iSCSI) represents standards for using Internet-based protocols for linking binary data storage device aggregations. IBM and Cisco submitted the draft standards in March 2000. Since then, iSCSI has seen widespread adoption into enterprise IT environments.
iSCSI functions through encapsulation. The Open Systems Interconnection Model (OSI) encapsulates SCSI commands and storage data within the session stack. The OSI further encapsulates the session stack within the transport stack, the transport stack within the network stack, and the network stack within the data stack.
Article Summaries Configuring WebDAV Shares This article provides instructions on adding a WebDAV share, configuring and starting the WebDAV service, and then connecting to it with a web browser.
This article provides instructions on adding a WebDAV share, configuring and starting the WebDAV service, and then connecting to it with a web browser.
Article Summaries Adding SMB Shares This article provides instructions to add an SMB share, starting the service, and mounting the share.
Managing SMB Shares This article provides instructions on managing existing SMB shares, adding share ACLs, and managing file system ACLs Using SMB Shadow Copy This article provides information on SMB share shadow copies, enbling shadow copies, and resolving an issue with Microsoft Windows 10 v2004 release.
This article provides instructions to set up SMB home shares.
9.1 - Apple Shares (AFP)
9.1.1 - AFP Migration
This article provides information on migrating AFP shares from CORE to SCALE.
Since the Apple Filing Protocol (AFP) for shares is deprecated and no longer receives updates, it is not included in TrueNAS SCALE.
However, users can sidegrade a TrueNAS CORE configuration into SCALE, so TrueNAS SCALE migrates previously-saved AFP configurations into SMB configurations.
To prevent data corruption that could result from the sidegrade operation, in SCALE go to Windows (SMB) Shares select the more_vert for the share, and then select Edit to open the Edit SMB screen.
Click Advanced Options and scroll down to the Other Options section.
Select Legacy AFP Compatibility to enable compatibility for AFP shares migrated to SMB shares.
Do not select this option if you want a pure SMB share with no AFP relation.
Netatalk service was removed in SCALE version 21.06.
AFP shares are automatically migrated to SMB shares with the Legacy AFP Compatibility option selected.
Do not clear the Legacy AFP Compatibility checkbox as it impacts how data is written to and read from shares.
Any other shares created to access these paths after the migration must also have Legacy AFP Compatibility selected.
Once you have sidegraded from CORE to SCALE, you can find your migrated AFP configuration in Shares >Windows Shares (SMB) with the prefix **AFP_**.
To make the migrated AFP share accessible, start the SMB service.
Internet Small Computer Systems Interface (iSCSI) represents standards for using Internet-based protocols for linking binary data storage device aggregations.
IBM and Cisco submitted the draft standards in March 2000. Since then, iSCSI has seen widespread adoption into enterprise IT environments.
iSCSI functions through encapsulation. The Open Systems Interconnection Model (OSI) encapsulates SCSI commands and storage data within the session stack. The OSI further encapsulates the session stack within the transport stack, the transport stack within the network stack, and the network stack within the data stack.
Transmitting data this way permits block-level access to storage devices over LANs, WANs, and even the Internet itself (although performance may suffer if your data traffic is traversing the Internet).
The table below shows where iSCSI sits in the OSI network stack:
OSI Layer Number
OSI Layer Name
Activity as it relates to iSCSI
7
Application
An application tells the CPU that it needs to write data to non-volatile storage.
6
Presentation
OSI creates a SCSI command, SCSI response, or SCSI data payload to hold the application data and communicate it to non-volatile storage.
5
Session
Communication between the source and the destination devices begins. This communication establishes when the conversation starts, what it talks about, and when the conversion ends. This entire dialogue represents the session. OSI encapsulates the SCSI command, SCSI response, or SCSI data payload containing the application data within an iSCSI Protocol Data Unit (PDU).
4
Transport
OSI encapsulates the iSCSI PDU within a TCP segment.
3
Network
OSI encapsulates the TCP segment within an IP packet.
2
Data
OSI encapsulates the IP packet within the Ethernet frame.
1
Physical
The Ethernet frame transmits as bits (zeros and ones).
Unlike other sharing protocols on TrueNAS, an iSCSI share allows block sharing and file sharing.
Block sharing provides the benefit of block-level access to data on the TrueNAS.
iSCSI exports disk devices (zvols on TrueNAS) over a network that other iSCSI clients (initiators) can attach and mount.
Challenge-Handshake Authentication Protocol (CHAP): an authentication method that uses a shared secret and three-way authentication to determine if a system is authorized to access the storage device. It also periodically confirms that the session has not been hijacked by another system. In iSCSI, the client (initiator) performs the CHAP authentication.
Mutual CHAP: a CHAP type in which both ends of the communication authenticate to each other.
Internet Storage Name Service (iSNS): protocol for the automated discovery of iSCSI devices on a TCP/IP network.
Extent: the storage unit to be shared. It can either be a file or a device.
Portal: indicates which IP addresses and ports to listen on for connection requests.
Initiators and Targets: iSCSI introduces the concept of initiators and targets which act as sources and destinations respectively. iSCSI initiators and targets follow a client/server model. Below is a diagram of a typical iSCSI network. The TrueNAS storage array acts as the iSCSI target and can be accessed by many of the different iSCSI initiator types, including software and hardware-accelerated initiators.
The iSCSI protocol standards require that iSCSI initiators and targets is represented as iSCSI nodes. It also requires that each node is given a unique iSCSI name. To represent these unique nodes via their names, iSCSI requires the use of one of two naming conventions and formats, IQN or EUI. iSCSI also allows the use of iSCSI aliases which are not required to be unique and can help manage nodes.
Logical Unit Number (LUN): LUN represents a logical SCSI device. An initiator negotiates with a target to establish connectivity to a LUN. The result is an iSCSI connection that emulates a connection to a SCSI hard disk. Initiators treat iSCSI LUNs as if they were a raw SCSI or SATA hard drive. Rather than mounting remote directories, initiators format and directly manage filesystems on iSCSI LUNs. When configuring multiple iSCSI LUNs, create a new target for each LUN. Since iSCSI multiplexes a target with multiple LUNs over the same TCP connection, there can be TCP contention when more than one target accesses the same LUN. TrueNAS supports up to 1024 LUNs.
Jumbo Frames: Jumbo frames are the name given to Ethernet frames that exceed the default 1500 byte size. This parameter is typically referenced by the nomenclature as a maximum transmission unit (MTU). A MTU that exceeds the default 1500 bytes necessitates that all devices transmitting Ethernet frames between the source and destination support the specific jumbo frame MTU setting, which means that NICs, dependent hardware iSCSI, independent hardware iSCSI cards, ingress and egress Ethernet switch ports, and the NICs of the storage array must all support the same jumbo frame MTU value. So, how does one decide if they should use jumbo frames?
Administrative time is consumed configuring jumbo frames and troubleshooting if/when things go sideways. Some network switches might also have ASICs optimized for processing MTU 1500 frames while others might be optimized for larger frames. Systems administrators should also account for the impact on host CPU utilization. Although jumbo frames are designed to increase data throughput, it may measurably increase latency (as is the case with some un-optimized switch ASICs); latency is typically more important than throughput in a VMware environment. Some iSCSI applications might see a net benefit running jumbo frames despite possible increased latency. Systems administrators should test jumbo frames on their workload with lab infrastructure as much as possible before updating the MTU on their production network.
TrueNAS Enterprise Feature:
Asymmetric Logical Unit Access (ALUA): ALUA allows a client computer to discover the best path to the storage on a TrueNAS system. HA storage clusters can provide multiple paths to the same storage. For example, the disks are directly connected to the primary computer and provide high speed and bandwidth when accessed through that primary computer. The same disks are also available through the secondary computer, but speed and bandwidth are restricted. With ALUA, clients automatically ask for and use the best path to the storage. If one of the TrueNAS HA computers becomes inaccessible, the clients automatically switch to the next best alternate path to the storage. When a better path becomes available, as when the primary host becomes available again, the clients automatically switch back to that better path to the storage.
Do not enable ALUA on TrueNAS unless it is also supported by and enabled on the client computers. ALUA only works when enabled on both the client and server.
iSCSI Configuration Methods
There are a few different approaches for configuring and managing iSCSI-shared data:
TrueNAS CORE web interface: the TrueNAS web interface is fully capable of configuring iSCSI shares. This requires creating and populating zvol block devices with data, then setting up the iSCSI Share. TrueNAS Enterprise licensed customers also have additional options to configure the share with Fibre Channel.
TrueNAS SCALE web interface: TrueNAS SCALE offers a similar experience to TrueNAS CORE for managing data with iSCSI; create and populate the block storage, then configure the iSCSI share.
TrueCommand instances that have many TrueNAS systems connected can manage iSCSI Volumes from the TrueCommand web interface. TrueCommand allows creating block devices and configuring iSCSI Targets and Initiators from one central location.
TrueNAS Enterprise customers that use vCenter to manage their systems can use the TrueNAS vCenter Plugin to connect their TrueNAS systems to vCenter and create and share iSCSI datastores. This is all managed through the vCenter web interface.
TrueNAS SCALE offers two methods to add an iSCSI block share: the setup wizard or the manual steps using the screen tabs.
Both methods cover the same basic steps but have some differences.
The setup wizard requires you to enter some settings before you can move on to the next screen or step in the setup process.
It is designed to ensure you configure the iSCSI share completely so it can be used immediately.
The manual process has more configuration screens over the wizard and allows you to configure the block share in any order.
Use this process to customize your share for special uses cases.
It is designed to give you additional flexibility to build or tune a share to your exact requirements.
Before you Begin
Have the following ready before you begin adding your iSCSI block share:
Storage pool and dataset.
A path to a Device (zvol or file) that doesn’t use capital letters or spaces.
iSCSI Wizard
This section walks you through the setup process using the wizard screens.
To use the setup wizard,
Add the block device.
a. Enter a name using all lowercase alphanumeric characters plus a dot (.), dash (-), or colon (:). We recommend keeping it short or at most 63 characters.
b. Choose the Extent Type. You can select either Device or File.
If you select Device, select the zvol to share from the Device dropdown list.
If you select File, file settings display. Browse to the location of the file to populate the path, and then enter the size in Filesize.
c. Select the type of platform using the share. For example, if you use an updated Linux OS, choose Modern OS.
d. Click Next.
Add the portal
Now you either create a new portal or select an existing one from the dropdown list.
If you create a new portal, select a Discovery Authentication Method from the dropdown list.
If you select None, you can leave Discovery Authentication Group empty.
If you select either CHAP or MUTUAL CHAP, you must also to select a Discovery Authentication Group from the dropdown list.
If no group exists, click Create New and enter a value in Group ID, User, and Secret.
Select 0.0.0.0 or :: from the IP Address dropdown list. 0.0.0.0 listens on all IPv4 addresses and :: listens on all IPv6 addresses.
Click NEXT
Add the Initiator. After adding the portal set up the initiator or networks that use the iSCSI share.
Decide which initiators or networks can use the iSCSI share.
Leave the list empty to allow all initiators or networks, or add entries to the list to limit access to those systems.
Confirm the iSCSI setup. Review your settings.
If you need or want to change any setting click Back until you reach the wizard screen with the setting.
click Save.
iSCSI Manual Setup
This procedure walks you through adding each configuration setting on the seven configuration tab screens. While the procedure places each tab screen in order, you can select the tab screen to add settings in any order.
Configure share settings that apply to all iSCSI shares.
a. Click Configure on the main Block (iSCSI) Share Targets widget.
The Target Global Configuration tab screen opens.
b. Enter a name using lowercase alphanumeric characters plus dot (.), dash (-), and colon (:) in Base Name.
Use the iqn.format for the name. See the “Constructing iSCSI names using the iqn.format” section of RFC3721.
c. Enter the host names or IP address of the ISNS servers to register with the iSCSI targets and portals of the system. Separate entries by pressing Enter.
d. Click Save.
Add portals. Click Portals to open the screen.
a. Click Add at the top of the screen to open the Sharing > iSCSI > Portals > Add screen.
b. (Optional) Enter a description. Portals are automatically assigned a numeric group.
c. Select the Discovery Authentication Method from the dropdown list.
None alows anonymous discovery and does not require you to select a Discovery Authentication Group.
CHAP and Mutual CHAP require authentication and you to select a group ID in Discovery Authentication Group.
d. (Optional) Based on your Discovery Authentication Method, select a group in Discovery Authentication Group.
e. Click Add to display the IP Address and Port fields. Click Add for each network IP address and port.
Add the IP address. 0.0.0.0 listens on all IPv4 addresses and :: listens on all IPv6 addresses.
Add the TCP port used to access the iSCSI target. Default is 3260.
f. Click Save.
Add initiators groups to create authorized access client groups. Click on the Initiators Groups tab to open the screen.
a. Click Add to open the Sharing > iSCSI > Initiators > Add screen.
b. Select Allow All Initiators or configure your own allowed initiators and authorized networks.
Enter the iSCSI Qualified Name (IQN) in Allowed Initiators (IQN) and click + to add it to the list. Example: iqn.1994-09.org.freebsd:freenas.local.
Enter network addresses allowed to use this initiator in Authorized Networks and click + to add it to the list. Each address can include an optional CIDR netmask. Click + to add the network address to the list. Example: 192.168.2.0/24. |
c. Click Save.
Add network authorized access. Click on the Authorized Access tab to open the screen.
If this is the first iSCSI share, the No Authorized Access screen opens.
a. Click Add Authorized Access in the center of the screen.
To add another network click Add at the top of the screen to open the Sharing > iSCSI > Authorized Access > Add screen.
b. Enter a number in Group ID. Each group ID allows configuring different groups with different authentication profiles.
Example: all users with a group ID of 1 inherits the authentication profile associated with Group 1.
c. Enter a user around to create for CHAP authentication with the user on the remote system. Consider using the initiator name as the user name.
d. Enter the user password of at least 12 to no more than 16 characters long in Secret and Secret (Confirm).
e. (Optional) Enter peer user details in Peer User and Peer Secret and Peer Secret (Confirm).
Peer user is only entered when configuring mutual CHAP and is usually the same value as User. The password must be different from the one entered in Secret.
f. Click Save.
Create storage resources. Click Targets tab to open the screen.
a. Click Add at the top of the screen to open the Add iSCSI Target screen.
b. Enter a name using lowercase alphanumeric characters plus dot (.), dash (-), and colon (:) in the iqn.format.
See the “Constructing iSCSI names using the iqn.format” section of RFC3721.
c. (Optional) Enter a user-friendly name.
d. Click Add under iSCSI Group to display the group settings.
e. Select the group ID from the Portal Group ID dropdown.
f. (Optional) Slect the group ID in Initiator Group ID or leave it set to None.
g. (Optional) Select the Authentication Method from the dropdown list of options.
h. (Optional) Select the Authentication Group Number from the dropdown list.
Leave at None or enter an integer to represent the number of existing authorized access.
i. Click Save.
Add new share storage units (extents). Click Extents to open the Sharing > iSCSI > Extents > Add screen.
a. Enter a name for the extent. If the extent size is not 0, it cannot be an existing file within the pool or dataset.
b. Leave Enable selected.
c. Select the extent type from the Extent Type dropdown.
Device provides virtual storage access to zvols, zvol snapshots, or physical devices.
File provides virtual storage access to a single file.
d. (Optional) Select the option from the Device dropdown. This field only displays when Extent Type is set to Device.
Select the path when Extent Type is set to File. Browse to the location.
Create a new file by browsing to a dataset and appending /{filename.ext} to the path. And Enter the size in Filesize.
e. Select Disable Physical Block Size Reporting if the initiator does not support physical block size values over 4K (MS SQL).
f. (Optional) Select the compatibility settings that apply to your extent. See iSCSI Share Screens for more information.
g. Click Save.
Add associated storage resources. Click Associate Targets tab to open the screen.
a. Click Add to open the Sharing > iSCSI > Associated Targets > Add screen.
b. Select the target from the Target dropdown list.
c. Select the value or enter a value 0 and 1023. Some initiators expect a value below 256. Leave blank to automatically assign the next available ID.
d. Select the option from the Extent dropdown.
e. Click Save
Creating a Quick iSCSI Target
TrueNAS SCALE allows users to add iSCSI targets without having to set up another share.
Go to Shares and click Add in the Block (iSCSI) Shares Targets widget.
Enter a name using lowercase alphanumeric characters plus dot (.), dash (-), and colon (:) in the iqn.format.
See the “Constructing iSCSI names using the iqn.format” section of RFC3721.
(Optional) Enter a user-friendly name in Target Alias.
Click Add under iSCSI Group to display the group settings.
Select the group ID from the Portal Group ID dropdown.
(Optional) Select the group ID in Initiator Group ID or leave it set to None.
(Optional) Select the Authentication Method from the dropdown list of options.
(Optional) Select the Authentication Group Number from the dropdown list.
Leave at None or enter an integer to represent the number of existing authorized access.
Click Save.
Starting the iSCSI Service
To turn on the iSCSI service, from the Block (iSCSI) Shares Targets widget click the more_vert and select Turn On Service.
You can also go to System Settings > Services and locate iSCSI on the list and click the Running toggle to start the service.
Set iSCSI to start when TrueNAS boots up, go to System Settings > Services and locate iSCSI on the list. Select Start Automatically.
Clicking the edit returns to the options in Shares > Block (iSCSI) Shares Targets.
This article provides information on setting up a Linux or Windows system to use a TrueNAS-configured iSCSI block share.
Connecting to and using an iSCSI share can differ between operating systems.
This article provides instructions on setting up a Linux and Windows system to use the TrueNAS iSCSI block share.
Using Linux iSCSI Utilities and Service
This section describes preparing your system to start the iSCSI service, log in to the share and obtian the basename and target TrueNAS configured. It provides information on partitioning the iSCSI disk, making a file system for the share, mounting it, and sharing data.
Before you begin, open the command line and ensure you have installed the open-iscsi utility.
To install the utility on an Ubuntu/Debian distribution, enter command sudo apt update && sudo apt install open-iscsi.
After the installation completes, ensure the iscsid service is running using the sudo service iscsid start command.
First, with the iscsid service started, run the iscsiadm command with the discovery arguments and get the necessary information to connect to the share.
Next, discover and log into the iSCSI share.
Run the command sudo iscsiadm \--mode discovery \--type sendtargets \--portal {IPADDRESS}.
The output provides the basename and target name that TrueNAS configured.
Alternatively, enter sudo iscsiadm -m discovery -t st -p {IPADDRESS} to get the same output.
Note the basename and target name given in the output. You need them to log in to the iSCSI share.
When a Portal Discovery Authentication Method is CHAP, add the three following lines to /etc/iscsi/iscsid.conf.
discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = user
discovery.sendtargets.auth.password = secret
The user for discovery.sendtargets.auth.username is set in the Authorized Access used by the iSCSI share Portal.
Likewise, the password to use for discovery.sendtargets.auth.password is the Authorized Access secret.
Without those lines, the iscsiadm does not discover the portal with the CHAP authentication method.
Enter comand sudo iscsiadm \--mode node \--targetname {BASENAME}:{TARGETNAME} \--portal {IPADDRESS} \--login,
where {BASENAME} and {TARGETNAME} is the discovery command information.
Now you partition an iSCSI disk.
When the iSCSI share login succeeds, the device shared through iSCSI shows on the Linux system as an iSCSI Disk.
To view a list of connected disks in Linux, enter command sudo fdisk -l.
Because the connected iSCSI disk is raw, you must partition it.
Identify the iSCSI device in the list and enter sudo fdisk {/PATH/TO/iSCSIDEVICE}.
Shell lists the iSCSI device path in the sudo fdisk -l output.
Use the fdisk command defaults when partitioning the disk.
Remember to type w when finished partitioning the disk.
The w command tells fdisk to save any changes before quitting.
After creating the partition on the iSCSI disk, a partition slice displays on the device name.
For example, /dev/sdb1.
Enter fdisk -l to see the new partition slice.
Next, make a file system on the iSCSI disk.
Finally, use mkfs to make a file system on the new partition slice.
To create the default file system (ext2), enter sudo mkfs {/PATH/TO/iSCSIDEVICEPARTITIONSLICE}.
Mount the iSCSI device and share the data.
Enter sudo mount {/PATH/TO/iSCSIDEVICEPARTITIONSLICE}.
For example, sudo mount /dev/sdb1 /mnt mounts the iSCSI device /dev/sdb1 to file /mnt.
Using the iSCSI Share with Windows
This section provides instructions on setting up Windows iSCSI Initiator Client to work with TrueNAS iSCSI shares.
To access the data on the iSCSI share, clients need to use iSCSI Initiator software. An iSCSI Initiator client is pre-installed in Windows 7 to 10 Pro, and Windows Server 2008, 2012, and 2019. Windows Professional Edition is usually required.
First, click the Start Menu and search for the iSCSI Initiator application.
Next, go to the Configuration tab and click Change to replace the iSCSI initiator with the name created earlier. Click OK.
Next, switch to the Discovery Tab, click Discover Portal, and type in the TrueNAS IP address.
If TrueNAS changed the port number from the default 3260, enter the new port number.
If you set up CHAP when creating the iSCSI share, click Advanced…, set Enable CHAP log on, and enter the initiator name and the same target/secret set earlier in TrueNAS.
Click OK.
Go to the Targets tab, highlight the iSCSI target, and click Connect.
After Windows connects to the iSCSI target, you can partition the drive.
Search for and open the Disk Management app.
The current state of your drive should be unallocated. Right-click the drive and click New Simple Volume….
Complete the wizard to format the drive and assign a drive letter and name.
Finally, go to This PC or My Computer in File Explorer. The new iSCSI volume should display under the list of drives. You should now be able to add, delete, and modify files and folders on your iSCSI drive.
This article provides information on increasing available storage in zvols and file LUNs for iSCSI block shares.
Expanding LUNs
TrueNAS lets users expand Zvol and file-based LUNs to increase the available storage that the iSCSI shares.
Zvol LUNs
To expand a Zvol LUN, go to Storage and click the more_vert next to the Zvol LUN, then select Edit Zvol.
Enter a new size in Size for this zvol, then click SAVE.
TrueNAS prevents data loss by not allowing users to reduce the Zvol size.
TrueNAS also does not allow users to increase the Zvol size past 80% of the pool size.
File LUNs
You need to know the path to the file to expand a file-based LUN. Go to Shares and click Configure in the Block (iSCSI) Shares Targets window, then select the Extents tab.
Click the more_vert next to the file-based LUN and select Edit.
Highlight and copy the path, then click Cancel.
Go to Shell and input truncate -s +[size] [path to file], then press Enter.
Where [size] is how much space you want to grow the file by, and [path to file] is the file path you copied earlier.
An example command could look like this: truncate -s +2g /mnt/Pool1/Dataset1/File LUN
Lastly, go back to the extent in Shares > Block (iSCSI) Shares Targets and make sure the Filesize is set to 0 so that the share uses the actual file size.
This article provides instructions on adding NFS shares, starting NFS service and accessing the share.
9.3.1 - Adding NFS Shares
This article provides instructions on adding NFS shares, starting NFS service and accessing the share.
About UNIX (NFS) Shares
Creating a Network File System (NFS) share on TrueNAS makes a lot of data available for anyone with share access.
Depending on the share configuration, it can restrict users to read or write privileges.
To create a new share, make sure a dataset is available with all the data for sharing.
Creating an NFS Share Tutorial Video
Video Player is loading.
Current Time 0:00
/
Duration -:-
Loaded: 0%
Stream Type LIVE
Remaining Time -0:00
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Go to Shares > Unix (NFS) Shares and click Add to open the Add NFS configuration screen.
Click Add to display Add paths settings, and then enter the path or use the arrow_right icon to the left of folder/mnt to locate the dataset and populate the path.
You can enter an optional text to help identify the share in Description.
Click Save to create the share.
After adding the first NFS share, the system opens an enable service dialog.
Enable Service turns the NFS service on and changes the toolbar status to Running.
If you wish to create the share but not immediately enable it, select Cancel.
Adding NFS Share Network and Hosts
If you want to enter allowed networks, click Add to the right of Add Networks.
Enter an IP address in the Authorized Networks field and select the mask CIDR notation.
Click Add for each network address and CIDR you want to define as an authorized network.
Defining an authorized network restricts access to all other networks. Leave empty to allow all networks.
If you want to enter allowed systems, click Add to the right of Add hosts.
Enter a host name or IP address to allow that system access to the NFS share.
Click Add for each allowed system you want to define.
Defining authorized systems restricts access to all other systems.
Leave the field empty to allow all systems access to the share.
Adjusting Access Permissions
If you want to tune the NFS share access permissions or define authorized networks, click Advanced Options.
Select Read Only to prohibit writing to the share.
To map user permissions to the root user, enter a string or select the user from the Maproot User dropdown list. To map the user permissions to all clients, enter a string or select the user from the Mapall User dropdown list.
To map group permissions to the root user, enter a string or select the group from the Maproot Group dropdown list. To map the group permissions to all clients, enter a string or select the group from the Mapall Group dropdown list.
Editing an NFS Share
To edit an existing NFS share, go to Shares > Unix Shares (NFS) and click the share you want to edit.
The Edit NFS screen settings are identical to the share creation options.
Starting the NFS Service
To begin sharing, click the more_vert on the toolbar displays options turn the NFS service on or off. Turn Off Service displays if the service is running or Turn On Service if the service is stopped.
Or you can go to System Settings > Services, locate NFS and click the toggle to running.
Select Start Automatically if you want NFS to activate when TrueNAS boots.
Configuring NFS Service
To configure NFS service settings click edit on the System Settings > Services screen.
Unless you need a specific setting, we recommend using the default NFS settings.
When TrueNAS is already connected to Active Directory, setting NFSv4 and Require Kerberos for NFSv4 also requires a Kerberos Keytab.
Connecting to the NFS Share
Although you can connect to an NFS share with various operating systems, it is recommended to use a Linux/Unix operating system.
First, download the nfs-common kernel module.
You can do this using the installed distribution package manager.
For example, on Ubuntu/Debian, enter command sudo apt-get install nfs-common in the terminal.
After installing the module, connect to an NFS share by entering command sudo mount -t nfs {IPaddressOfTrueNASsystem}:{path/to/nfsShare} {localMountPoint}.
Where {IPaddressOfTrueNASsystem} is the remote TrueNAS system IP address that contains the NFS share, {path/to/nfsShare} is the path to the NFS share on the TrueNAS system, and {localMountPoint} is a local directory on the host system configured for the mounted NFS share.
For example, sudo mount -t nfs 10.239.15.110:/mnt/Pool1/NFS_Share /mnt mounts the NFS share NFS_Share to the local directory /mnt.
You can also use the linux nconnect function to let your NFS mount to support multiple TCP connections.
To enable nconnect, enter command sudo mount -t nfs -o rw,nconnect=16 {IPaddressOfTrueNASsystem}:{path/to/nfsShare} {localMountPoint}.
Where {IPaddressOfTrueNASsystem}, {path/to/nfsShare}, and {localMountPoint} are the same you used when connecting to the share.
For example, sudo mount -t nfs -o rw,nconnect=16 10.239.15.110:/mnt/Pool1/NFS_Share /mnt.
By default, anyone that connects to the NFS share only has read permission.
To change the default permissions, edit the share, open the Advanced Options, and change the Access settings.
ESXI 6.7 or later is required for read/write functionality with NFSv4 shares.
This article provides instructions on adding a WebDAV share, configuring and starting the WebDAV service, and then connecting to it with a web browser.
9.4.1 - Configuring WebDAV Shares
This article provides instructions on adding a WebDAV share, configuring and starting the WebDAV service, and then connecting to it with a web browser.
A Web-based Distributed Authoring and Versioning (WebDAV) share makes it easy to share a TrueNAS dataset and its contents over the web.
To create a new share, make sure a dataset is available with all the data for sharing.
Configuring a WebDAV Share
Go to Shares and click on Add on the WebDAV launch widget.
The first WebDAV share added to your system opens the No WebDAV screen.
Click Add WebDAV to open the Add WebDAV configuration screen.
Enter a share Name.
Add the path to the pool or dataset in Path. Enter or use the arrow_right icon to the left of folder/mnt to browse to the dataset and populate the path.
An optional Description helps to identify the share.
To prevent user accounts from modifying the shared data, set Read Only.
To change existing ownership of all files in the share to the webdav user and group accounts leave Change User & Group Ownership selected.
This default simplifies WebDAV share permission, but is unexpected, so the web interface displays a warning:
If you clear the Change User & Group Ownership checkbox this warning does not display and you must manually set shared file ownership to the webdav or www user and group accounts.
Click Save to add the share. The Enable service dialog opens. Click Enable Service to start the service or click Cancel to start the service at a later time.
Configuring WebDAV Service
To automatically start the service when TrueNAS boots, select Start Automatically.
Click edit to change the service settings.
For better data security, set Protocol to HTTPS.
If you require it, you must choose an SSL certificate (freenas_default is always available).
Define a number in the Port field. But do not use the default 8080 or reuse the same port number.
Make sure the network is not already using the WebDAV service port.
To prevent unauthorized access to the shared data, set HTTP Authentication to either Basic or Digest and create a new Webdav Password. Do not use the default password davtest as it is a known password.
TrueNAS requires a username and password when setting the Authentication WebDAV service option to Basic or Digest.
Enter the user name webdav and the password defined in the WebDAV service.
Click Save after making changes.
Activating the WebDAV Service
Creating a share allows users to activate the WebDAV service.
You can enable the serivce from the Sharing screen Enable Service dialog or from the WebDAV launch widget toolbar option.
Click more_vert and then click Turn On Service.
Or you can go to System Settings > Services and scroll down to WebDAV and click the toggle to Start.
Connecting to the WebDAV Share
WebDAV shared data is accessible from a web browser.
To see the shared data, open a new browser tab and enter {PROTOCOL}://{TRUENASIP}:{PORT}/{SHAREPATH} where the elements in curly brackets {} are variables to replace with your chosen WebDAV share and service settings.
For example: https://10.2.1.1:8081/newdataset
This article provides instructions to set up SMB home shares.
9.5.1 - Adding SMB Shares
This article provides instructions to add an SMB share, starting the service, and mounting the share.
About Windows (SMB) Shares
SMB (also known as CIFS) is the native file sharing system in Windows.
SMB shares can connect to most operating systems, including Windows, MacOS, and Linux.
TrueNAS can use SMB to share files among single or multiple users or devices.
SMB supports a wide range of permissions, security settings, and advanced permissions (ACLs) on Windows and other systems, as well as Windows Alternate Streams and Extended Metadata.
SMB is suitable for managing and administering large or small pools of data.
TrueNAS uses Samba to provide SMB services.
The SMB protocol has multiple versions. An SMB client typically negotiates the highest supported SMB protocol during SMB session negotiation. Industry-wide, SMB1 protocol (sometimes referred to as NT1) usage is being deprecated for security reasons.
However, most SMB clients support SMB 2 or 3 protocols, even when they are not default.
Legacy SMB clients rely on NetBIOS name resolution to discover SMB servers on a network. TrueNAS disables the NetBIOS Name Server (nmbd) by default. Enabled in Network if you require its functionality.
MacOS clients use mDNS to discover SMB servers present on the network. TrueNAS enables the mDNS server (avahi) by default.
Windows clients use WS-Discovery to discover the presence of SMB servers, but network discovery can be disabled by default depending on the Windows client version.
Discoverability through broadcast protocols is a convenience feature and not required to access an SMB server.
Adding SMB Shares Video Tutorial
Video Player is loading.
Current Time 0:00
/
Duration -:-
Loaded: 0%
Stream Type LIVE
Remaining Time -0:00
1x
Chapters
descriptions off, selected
captions settings, opens captions settings dialog
captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
Now you create the SMB share. You can create a basic SMB share or for more specific share types or feature requirements, use the Advanced Options instructions before you save the share.
Before creating the SMB share, first add the dataset the share uses for data storage.
We recommend creating a new dataset with the Share Type set to SMB for the new SMB share.
TrueNAS creates the ZFS dataset with these settings:
ACL Mode set to Restricted
The ACL Type influences the ACL Mode setting. When ACL Type is set to Inherit or POSIX, you cannot change the ACL Mode setting.
When ACL Type is set to NFSv4 you can change the ACL Mode setting to Restricted.
Case Sensitivity set to Insensitive
TrueNAS also applies a default access control list to the dataset.
This default ACL is restrictive and only allows access to the dataset owner and group.
You can modify the ACL later according to your use case.
Creating Local User Accounts
Use Credentials > Local Users to add new users to your TrueNAS.
By default, all new local users are members of a built-in SMB group called builtin_users.
For more information on the builtin_users group, go to Credentials > Local Users and click the Toggle Built-In Users button at the top right of the screen.
Scroll down to the smbguest user and click on the name.
Click Edit to view the Edit User screen. The Auxiliary Group field displays the builtin_user group.
You can use the group to grant access to all local users on the server or add more groups to fine-tune permissions to large numbers of users.
You cannot access SMB shares with the root user, or user accounts built-in to TrueNAS or those without the smb flag.
Anonymous or guest access to the share is possible, but it is a security vulnerability.
Major SMB client vendors are deprecating it, partly because signing and encryption are not possible for guest sessions.
If you want LDAP server users to access the SMB share, go to Credentials > Directory Services.
If an LDAP server is configured, select the server and click Edit to display the LDAP configuration screen.
If not configured, click Configure LDAP to display the LDAP configuration screen.
Click Advanced Options and select Samba Schema (DEPRECATED - see help text.
Only set LDAP authenication for SMB share is required and the LDAP server is already configured with Samba attributes.
Support for Samba Schema is officially deprecated in Samba 4.13. This feature will be removed after Samba 4.14.
Users should begin upgrading legacy Samba domains to Samba AD domains.
Local TrueNAS user accounts no longer have access to the share.
Tuning the Dataset ACL
After creating a dataset and accounts, you need to investigate your access requirements and adjust the dataset ACL to match.
Many home users typically add a new ACL entry that grants FULL_CONTROL to the builtin_users group with the flags set to INHERIT.
To change or add permissions for the builtin_users group, go to Storage,
Click the for your SMB dataset and then click on View Permissions.
Click the edit pencil icon. The Edit ACL screen for the dataset displays.
Check the Access Control List to see if this user is on the list and has the correct permissions. If not add this ACE item.
a. Enter Group in the Who field or use the dropdown list to select Group.
b. Begin typing builtin_users in the Group field to display a filtered list of groups you can select from and then select builtin_users.
c. Verify Full Control displays in Permissions. If not, select it from the dropdown list.
d. Click Save Access Control List to add the ACE item.
If you want to allows users to move through directories within an SMB share without have read or write access, you must use the Traverse permission. Traverse is useful if you intend to have nested groups within an SMB share that have different levels of access.
See Permissions for more information on editing dataset permissions.
You cannot access SMB shares with the root user. Always change SMB dataset ownership to the intended SMB user.
Creating the SMB Share
To create a basic Windows SMB share, go to Shares.
Click on Windows Shares (SMB) to select it and then click Add. The Add SMB configuration screen displays the Basic Options settings.
Enter the SMB share Path and Name.
The Path is the directory tree on the local file system that TrueNAS exports over the SMB protocol.
The Name is the SMB share name, which forms part of the full share pathname when SMB clients perform an SMB tree connect.
Because of how the SMB protocol uses the name, it must be less than or equal to 80 characters and it cannot have any invalid characters as specified in Microsoft documentation MS-FSCC section 2.1.6.
If you do not enter a name the share name becomes the last component of the path.
(Optional) Select a preset from the Purpose dropdown list to apply and lock or unlock pre-determined Advanced Options settings for the share.
To retain control over all the share Advanced Options settings, select No presets.
(Optional) Enter a Description to help explain the share purpose.
Select Enabled to allow sharing of this path when the SMB service is activated.
Leave it cleared if you want to disable but not delete the share configuration.
Click Save to create the share and add it to the Shares > Windows (SMB) Shares list.
You can also choose to enable the SMB service at this time.
Configuring Share Advanced Options Settings
For a basic SMB share you do not need to use the Advanced Options settings, but if you set Purpose to No Presets, click Advanced Options to finish customizing the SMB share for your use case.
The following are possible use cases, but for all settings see SMB Shares Screens.
Enabling ACL Support
To add ACL support to the share, select Enable ACL, and then see Managing SMB Shares for more on configuring permissions for the share and the file system.
Setting Up Guest Access
If you want to allow guest access to the share, select Allow Guest Access.
The privileges are the same as the guest account.
Guest access is disabled by default in Windows 10 version 1709 and Windows Server version 1903.
Additional client-side configuration is required to provide guest access to these clients.
MacOS clients: Attempting to connect as a user that does not exist in FreeNAS does not automatically connect as the guest account.
Connect As: Guest Specifically choose this option in macOS to log in as the guest account.
See the Apple documentation for more details.
Setting Up Read or Write Access
To prohibit writes to the share, select Export Read Only.
To restrict share visibility to users with read or write access to the share, select Access Based Share Enumeration. See the smb.conf manual page.
Setting Up Host Allow and Host Deny
To control allowed or denied host names or IP addresses, use the Host Allow and Host Deny options.
Use the Hosts Allow field to enter a list of allowed hostnames or IP addresses. Separate entries by pressing Enter. You can find a more detailed description with examples here.
Use the Hosts Deny field to enter a list of denied hostnames or IP addresses. Separate entries by pressing Enter.
The Hosts Allow and Hosts Deny fields work together to produce different situations:
If neither Hosts Allow or Hosts Deny contains an entry, then SMB share access is allowed for any host.
If there is a Hosts Allow list but no Hosts Deny list, then only allow hosts on the Hosts Allow list.
If there is a Hosts Deny list but no Hosts Allow list, then allow all hosts on the Hosts Deny list.
If there is both a Hosts Allow and Hosts Deny list, then allow all hosts on the Hosts Allow list. If there is a host not on the Hosts Allow and not on the Hosts Deny list, then allow it.
Approving Apple Software Compatibility
AFP shares are deprecated and not available in SCALE. To customize your SMB share to work with a migraged AFP share or with your MacOS, use the Advanced Options settings provided for these uses cases.
Legacy AFP Compatibility controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). Only set this when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or macOS SMB clients.
Use Apple-style Character Encoding converts NTFS illegal characters in the same manner as MacOS SMB clients. By default, Samba uses a hashing algorithm for NTFS illegal characters.
Starting the SMB Service
To connect to an SMB share you must start the related system service.
You can start the service from the Windows SMB Share header on the Sharing screen or on the System Settings > Services screen.
Starting the Service Using the Windows SMB Share
From the main Sharing screen, click on the Windows (SMB) Sharesmore_vert to display the service options which are Turn Off Service if the service is running or Turn On Service if the service is stopped.
Each SMB share on the list also has a toggle you can use to enable or disable the service for that share.
Starting the Service Using the System Settings
To make SMB share available on the network, go to System Settings > Services and click the toggle to running for SMB.
Set Start Automatically if you want the service to activate when TrueNAS boots.
Service Configuration
Configure the SMB service by clicking edit.
Unless you need a specific setting or are configuring a unique network environment, we recommend the default settings.
Mounting the SMB Share
The instructions in this section cover mounting the SMB share on system with the following operating systems.
Mounting on Linux System
Verify that your Linux distribution has the required CIFS packages installed.
Create a mount point: sudo mkdir /mnt/smb_share.
Mount the volume. sudo mount -t cifs //computer_name/share_name /mnt/smb_share.
If your share requires user credentials, add the switch -o username= with your username after cifs and before the share address.
Mounting on Windows System
Have the information on the Windows drive letter, computer name and share name ready before you start.
To mount the SMB share to a drive letter on Windows, open the command line and run the following command with the appropriate drive letter, computer name, and share name.
net use Z: \\computer_name\share_name /PERSISTENT:YES
Mounting on Apple System
Have the user name and password for the user assigned to pool or for the guest if the share has guest access ready before you begin.
Open Finder > Go > Connect To Server
Enter the SMB address: smb://192.168.1.111.
Input the username and password for the user assigned to that pool or guest if the share has guest access.
Mounting on FreeBSD System
Mounting on a FreeBSD system involves creating the mount point and then mounting the volume.
Create a mount point: sudo mkdir /mnt/smb_share.
Mount the volume. sudo mount_smbfs -I computer_name\share_name /mnt/smb_share.
This article provides instructions on managing existing SMB shares, adding share ACLs, and managing file system ACLs
To access SMB share management options from the Sharing > Windows (SMB) Shares screen you need to access the Sharing >SMB screen that lists all SMB shares on the system.
To access this, after going to Shares, click the Windows (SMB) Shares launch launch icon.
Managing SMB Shares
To manage an SMB share use the Sharing > SMB details screen.
Click the for the share you want to manage.
Click on the dropdown list option for the operation you want to perform.
Click Edit to open the Edit SMB screen where you can change any setting for the share.
Click Edit Share ACL to open the Sharing > SMB > Share ACL screen where you can add or edit ACL entries.
Click Edit Filesystem ACL to open the Storage > Edit POSIX.1e ACL screen where you can edit the SMB dataset permissions.
The SMB dataset ACL options you set determine the ACL Editor screen displayed.
Click Delete to open a delete confirmation dialog where you delete the share and remove it from the system. Delete does not affect shared data.
Modifying ACL Permissions for SMB Shares
You have two options that modify ACL permissions for SMB shares:
To modify SMB share ACL permissions that apply to the users and groups and permissions of the entire SMB share use Edit Share ACL.
To modify ACL permissions at the dataset level for the users and groups that own or have specific permissions to the shared dataset.
See both the Permissions article for more details on configuring ACLs and Edit ACL Screen article for more information on the ACL editor screens and setting options.
Also see Tuning the Dataset ACL for an example of modifying ACL permissions for an SMB share.
Configuring SMB Share ACL
To configure an Access Control List (ACL) entry for an SMB share use the Edit Share ACL option. This opens the SMB> Share ACL screen.
This screen is separate from file system permissions and applies at the entire SMB share level.
Changes made to permissions on this screen for the selected SMB share do not apply to other file sharing protocol clients or other SMB shares that export the same share Path.
You cannot access SMB shares with the root user. Always change SMB dataset ownership to the intended SMB user.
This ACL determines the browse list if you enable Access Based Share Enumeration. See SMB Share Screens for more information on settings.
Open is the default.
From the main Sharing screen, click on either Windows (SMB) Share or View Details to open the Sharing > SMB details screen.
Click the more_vert icon for the SMB share you want to edit ACL permissions for and then click Edit Share ACL.
Either select new values for the ACL entry or click Add to add a new block of Add share_ACL settings.
Click Save when you finish your changes.
Configuring Dataset File System ACL
To configure an Access Control List (ACL) entry for the SMB share the path (defined in Path) at the dataset level, use the Edit Filesystem ACL option.
The ACL type setting on the Add Dataset or Edit Dataset configuration screen, in Advanced Options, determines the ACL editor screen or windows you see when you click Edit Filesystem ACL.
If you set the dataset ACL Type to POSIX, the Select a preset ACL window displays first.
After you select a preset and click Continue a POSIX type ACL Editor screen displays.
If you set the dataset ACL Type to NFSv4, the NFSv4 type ACL Editor displays.
Since SCALE gives users the option to use either POSIX or NFSv4 share ACL types, the ACL Editor screen differs depending on which ACL type the file system uses.
Both the POSIX and NFSv4 ACL Editors allow you to define ACL user accounts or groups that own or have specific permissions to the shared dataset.
The User and Group values show which accounts own or have full permissions to the dataset.
Change the default settings to your preferred primary account and group and select Apply permissions recursively before saving any changes.
To define permissions for a specific user account or group for this SMB share at the dataset level, click Add Item.
Select a User or Group from the Who dropdown list, then select a specific user or group account.
Define how the settings apply to the account, then specify the permissions to apply.
For example, to only allow the newuser user permission to view dataset contents but not make changes, set the ACL Type to Allow and Permissions to Read.
See both the Permissions for more details on configuring ACLs and Edit ACL Screen for information on the ACL editor screens and setting options.
Using Preset ACL Entries (ACEs) on an NFSv4 ACL Editor
To rewrite the current ACL with a standardized preset, click Use ACL Preset and select an option:
NFS4_OPEN to give the owner and group full dataset control. All other accounts can modify the dataset contents. NFS4_RESTRICTED to give the owner full dataset control. Group can modify the dataset contents.
NFS4_HOME to give the owner full dataset control. Group can modify the dataset contents. All other accounts can navigate the dataset.
When finished, click Save Access Control List to add this to the Access Control List.
Using ACL Entries (ACEs) on a POSIX ACL Editor
If the file system uses a POSIX ACL, the first option presented is to select a preset.
To rewrite the current ACL with a standardized preset, click Use ACL Preset and select an option:
POSIX_OPEN to give owner and group full dataset control. All other accounts can modify the dataset contents. POSIX_RESTRICTED to give owner full dataset control. Group can modify the dataset contents.
POSIX_HOME to give owner full dataset control. Group can modify the dataset contents. All other accounts can navigate the dataset.
This article provides information on SMB share shadow copies, enbling shadow copies, and resolving an issue with Microsoft Windows 10 v2004 release.
Enable Shadow Copies exports ZFS snapshots as Shadow Copies for Microsoft Volume Shadow Copy Service (VSS) clients.
About SMB Shadow Copies
Shadow Copies, also known as the Volume Shadow Copy Service (VSS) or Previous Versions, is a Microsoft service for creating volume snapshots.
You can use shadow copies to restore previous versions of files from within Windows Explorer.
By default, all ZFS snapshots for a dataset underlying an SMB share path are presented to SMB clients through the volume shadow copy service or are accessible directly with SMB when the hidden ZFS snapshot directory is within the SMB share path.
Before you activate Shadow Copies in TrueNAS, there are a few caveats:
Shadow Copies might not work if the Windows system is not patched to the latest service pack.
If previous versions of files to restore are not visible, use Windows Update to ensure the system is fully up-to-date.
Shadow Copies support only works for ZFS pools or datasets.
SMB share dataset or pool permissions must be configured appropriately.
Enabling Shadow Copies
To enable shadow copies, go to Shares > Windows (SMB) Shares and click Windows (SMB) Shares launch launch icon to display the list view Sharing > SMB screen.
Click the more_vert for the share you want to change, and then click Edit. The Edit SMB screen displays.
Scroll down to the bottom and click Advanced Options.
Scroll down to Other Options and select Enable Shadow Copies.
Click Save
Some users might experience issues in the Windows 10 v2004 release where they cannot access network shares.
The problem appears to come from a bug in gpedit.msc, the Local Group Policy Editor.
Unfortunately, setting the Allow insecure guest logon flag value to Enabled in Computer Configuration > Administrative Templates > Network > Lanman Workstation in the Windows appears to have no effect on the configuration.
To work around this issue, edit the Windows registry.
Use Regedit and go to HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.
The DWORD AllowInsecureGuestAuth is an incorrect value: 0x00000000. Change this value to 0x00000001 (Hexadecimal 1) to allow adjusting the settings in gpedit.msc.
You can use a Group Policy Update to apply this to a fleet of Windows machines.
Deleting Shadow Copies
Users with an SMB client cannot delete Shadow copies. Instead, the administrator uses the TrueNAS web interface to remove snapshots.
Disable shadow copies for an SMB share by clearing the Enable shadow copies checkbox on the Edit SMB screen for the SMB share.
Disabling does not prevent access to the hidden .zfs/snapshot directory for a ZFS dataset when the directory is located within the path for an SMB share.
This article provides instructions to set up SMB home shares.
As of SCALE 22.12 (Bluefin), TrueNAS SCALE SMB no longer supports End of Life (EoL) Windows clients, including MS-DOS.
The Samba project, which TrueNAS SCALE integrates to provide SMB sharing features, had previously deprecated the SMB1 protocol for security concerns. TrueNAS SCALE 22.12 (Bluefin) updated Samba to version 4.17, which eliminated SMB1 support entirely. Client systems that can only use the SMB1 protocol for SMB shares are no longer capable of connecting to SMB shares created in TrueNAS SCALE 22.12 or later. Refer to the Samba release notes for more information.
Setting Up SMB Home Shares
TrueNAS offers the Use as Home Share option for organizations or SMEs that want to use a single SMB share to provide a personal directory to every user account.
Each user is given a personal home directory when connecting to the share.
These home directories are not accessible by other users.
Only one share can be used as the home share, but other non-home shares can be created.
Creating an SMB home share requires configuring the system storage and joining Active Directory.
Go to Storage and open the more_vert next to the root dataset in the pool you just created, then click Add Dataset.
Name the dataset and set Share Type to SMB.
After creating the dataset, go to Storage and open more_vert next to the new dataset.
Select View Permissions, then click edit.
Click the Group dropdown list and change the owning group to your Active Directory domain admins.
Click Use an ACL Preset and choose NFS4_HOME. Then, click Continue.
Create the Share
Go to Shares > Windows (SMB) Shares and click Add.
Set the Path to the prepared dataset.
The Name automatically becomes identical to the dataset. Leave this as the default.
Set the Purpose to No presets, then click Advanced Options and set Use as Home Share. Click Save.
Enable the SMB service in System Settings > Services to make the share is available on your network.
Add Users
Go to Credentials > Local Users and click Add.
Create a new user name and password.
By default, the user Home Directory title comes from the user account name and is added as a new subdirectory of Home_Share_Dataset.
If existing users require access to the home share, go to Credentials > Local Users and edit an existing account.
Adjust the user home directory to the appropriate dataset and give it a name to create their own directory.
After adding the user accounts and configuring permissions, users can log in to the share and see a folder matching their user name.
SCALE system management options are collected in this section of the UI and organized into a few different screens:
Update controls when the system applies a new version.
There are options to download and install an update, have the system check daily and stage updates, or apply a manual update file to the system.
General shows system details and has basic, less intrusive management options, including web interface access, localization, and NTP server connections.
This is also where users can input an Enterprise license or create a software bug ticket.
Advanced contains options that are more central to the system configuration or meant for advanced users.
Specific options include configuring the system console, log, and dataset pool, adding custom system controls, kernel-level settings, scheduled scripting or commands, and determining any isolated GPU devices.
Warning: Advanced settings can be disruptive to system function if misconfigured.
Boot lists each ZFS boot environment stored on the system.
These restore the system to a previous version or specific point in time.
Services displays each system component that runs continuously in the background.
These typically control data sharing or other external access to the system.
Individual services have their own configuration screens and activation toggles, and can be set to run automatically.
Shell allows users to enter commands directly into the TrueNAS Operating System.
Shell accepts Unix-like commands, and there is an experimental TrueNAS-specific command-line interface (CLI) for configuring the system separately from the web interface.
Enclosure appears when the system is attached to compatible SCALE hardware.
This is a visual representation of the system with additional details about disks and other physical hardware components.
Ready to get started? Choose a topic or article from the left-side Navigation pane.
Click the < symbol to expand the menu to show the topics under this section.
10.1 - Updating SCALE
TrueNAS has several software branches (linear update paths) known as trains. SCALE is currently a Prerelease Train. Prerelease Trains have various preview/early build releases of the software.
SCALE has several trains available for updates. However, the web interface only displays trains you can select as an upgrade. To view a list of the available trains, click on the arrow to the right of your current train.
For more information on other available trains, see TrueNAS Upgrades.
See the Software Status page for the latest recommendations for software usage.
Bluefin and Nightlies are non-production trains.
If you are using a non-production train, be prepared to experience bugs or problems.
Testers are encouraged to submit bug reports and debug files at https://jira.ixsystems.com.
The TrueNAS SCALE Update screen lets users update their system using two different methods: manual or automatic.
We recommend updating TrueNAS when the system is idle (no clients connected, no disk activity, etc). Most updates require a system reboot.
Update during scheduled maintenance times to avoid disrupting user activities.
All auxiliary parameters are subject to change between major versions of TrueNAS due to security and development issues. We recommend removing all auxiliary parameters from TrueNAS configurations before upgrading.
Automatic
Select the Check for Updates Daily and Download if Available option to automatically download updates.
If an update is available, click Apply Pending Update to install it.
Manual
To do a manual update, click Download Updates and wait for the file to download to your system.
The TrueNAS SCALE General Settings section provides settings options for support, graphic user interface, localization, NTP servers, and system configuration.
This article provides instructions for SCALE users to access TrueNAS Community and Social Media, get system support, report problems, and find system license information.
This article provides information on downloading your TrueNAS configuration to back up system settings, or uploading a new configuration file, and resetting back to default settings.
This article provides information on the WebUI settings for your local region language, adding an NTP server, and configuring other web interface settings.
10.2.1 - Getting Support
This article provides instructions for SCALE users to access TrueNAS Community and Social Media, get system support, report problems, and find system license information.
There are several options to get support for your TrueNAS installation.
TrueNAS SCALE users can engage with the TrueNAS community to answer questions and resolve issues. TrueNAS Enterprise hardware customers can also access the fast and effective support directly provided by iXsystems.
TrueNAS SCALE users are welcome to report bugs and vote for or suggest new TrueNAS features in the project Jira instance.
Have questions? We recommend searching through the software documentation and community resources for answers.
Using the TrueNAS Community
The TrueNAS Community is an active online resource for asking questions, troubleshooting issues, and sharing information with other TrueNAS users.
You must register to post.
We encourage new users to briefly introduce themselves and review the forum rules before posting.
Community Resources are user-contributed articles about every facet of using TrueNAS.
They are organized into broad categories and incorporate a community rating system to better highlight content that the whole community has found helpful.
Using TrueNAS Social Media
You are always welcome to network with other TrueNAS users using the various social media platforms!
For users with a valid TrueNAS license, click Add License. Copy your license into the box and click Save.
You are prompted to reload the page for the license to take effect, click RELOAD NOW.
Log back into the WebUI where the End User License Agreement (EULA) displays.
Read it thoroughly and completely.
After you finish, click I AGREE. The system information updates to reflect the licensing specifics for the system.
Silver and Gold level Support customers can also enable Proactive Support on their hardware to automatically notify iXsystems if an issue occurs.
To find more details about the different Warranty and Service Level Agreement (SLA) options available, see iXsystems Support.
When the system is ready to be in production, update the status by selecting This is a production system and then click the Proceed button. This sends an email to iXsystems declaring that the system is in production.
While not required for declaring the system is in production, TrueNAS has an option to include a initial debug with the email that can assist support in the future.
Filing a Ticket
TrueNAS SCALE users are encouraged to report bugs and to vote for or suggest new TrueNAS features in the project Jira instance.
Have questions? We recommend searching through the software documentation and community resources for answers.
If you encounter a bug or other issue while using TrueNAS SCALE, use the File Ticket option on the System Settings > General screen to create a bug report in the TrueNAS Jira Project.
The web interface provides a form to report issues without logging out and that prompts you to provide the information and attachments we need to assist users.
At present, all Jira tickets are marked as iX Private to safeguard user personal and private data, so it is not possible to search the project first to see if another user already reported the issue.
To report an issue using the web interface, go to System Settings > General and click File Ticket to open the File Ticket form.
Click Login to JIRA and enter your credentials in the fields provided.
After logging in, select Allow to give TrueNAS read and write access to your data on the Jira site. A token is added to the OAuth section of this form.
After logging into Jira, select either Bug or Feature as the Type of ticket to create, then choose the appropriate Category for your request.
Attach a debug file to all bug tickets. Click Attach Debug to give the TrueNAS Team pertinent information about the system and what could be causing any issues.
If the debug file is too large to attach to your ticket, the following displays:
Provide a brief summary of the issue in Subject.
Enter much details about the issue as possible as the reason for submitting the ticket in the Description field.
Attach any applicable screenshots and click Save.
After the ticket generates, you can view it by clicking the link provided in the WebUI.
Using Proactive Support
Silver/Gold Coverage Customers can enable iXsystems Proactive Support. This feature automatically emails iXsystems when certain conditions occur in a TrueNAS system.
To configure Proactive Support, click the Get Support dropdown and select Proactive Support.
Complete all available fields and select Enable iXsystems Proactive Support if it is not check-marked, then click Save.
Contacting iXsystems Support
Customers who purchase iXystems hardware or that want additional support must have a support contract to use iXystems Support Services. The TrueNAS Community forums provides free support for users without an iXsystems Support contract.
Monday - Friday, 6:00AM to 6:00PM Pacific Standard Time:
US-only toll-free: 1-855-473-7449 option 2 Local and international: 1-408-943-4100 option 2
Telephone
After Hours (24x7 Gold Level Support only):
US-only toll-free: 1-855-499-5131 International: 1-408-878-3140 (international calling rates apply)
Related Content
10.2.2 - Managing the System Configuration
This article provides information on downloading your TrueNAS configuration to back up system settings, or uploading a new configuration file, and resetting back to default settings.
TrueNAS SCALE allows users to manage the system configuration by uploading or downloading configurations, or by resetting the system to the default configuration.
System Configuration Options
The Manage Configuration option on the system Settings > General screen provides three options:
Download File that downloads your system configuration settings to a file on your system.
Upload File that allows you to upload a replacement configuration file.
Reset to Defaults that resets system configuration settings back to factory settings.
Downloading the File
The Download File option downloads your TrueNAS SCALE current configuration to the local machine.
When you download the configuration file, you have the option to Export Password Secret Seed, which includes encrypted passwords in the configuration file.
This allows you to restore the configuration file to a different operating system device where the decryption seed is not already present.
Users must physically secure configuration backups containing the seed to prevent unauthorized access or password decryption.
We recommend backing up the system configuration regularly.
Doing so preserves settings when migrating, restoring, or fixing the system if it runs into any issues.
Save the configuration file each time the system configuration changes.
Uploading the File
The Upload File option gives users the ability to replace the current system configuration with any previously saved TrueNAS SCALE configuration file.
All passwords are reset if the uploaded configuration file was saved without the selecting Save Password Secret Seed.
Resetting to Defaults
The Reset to Defaults option resets the system configuration to factory settings.
After the configuration resets, the system restarts and users must set a new login password.
Save the system current configuration with the Download File option before resetting the configuration to default settings!
If you do not save the system configuration before resetting it, you could lose data that was not backed up, and you cannot revert to the previous configuration.
This article provides information on the WebUI settings for your local region language, adding an NTP server, and configuring other web interface settings.
The TrueNAS SCALE General Settings section provides settings options for support, graphic user interface, localization, NTP servers, and system configuration.
Configuring GUI Options
The GUI widget allows users to configure the TrueNAS SCALE web interface address. Click Settings to open the GUI Settings configuration screen.
Changing the GUI SSL Certificate
The system uses a self-signed certificate to enable encrypted web interface connections. To change the default certificate, select a different certificate that was created or imported in the Certificates section from the GUI SSL Certificate dropdown list.
Setting the Web Interface IP Address
To set the WebUI IP address, if using IPv4 addresses, select a recent IP address from the Web Interface IPv4 Address dropdown list. This limits the usage when accessing the administrative GUI. The built-in HTTP server binds to the wildcard address of 0.0.0.0 (any address) and issues an alert if the specified address becomes unavailable. If using an IPv6 address, select a recent IP address from the Web Interface IPv6 Address dropdown list.
Configuring HTTPS Options
To allow configuring a non-standard port to access the GUI over HTTPS, enter a port number in the Web Interface HTTPS Port field.
Select the cryptographic protocols for securing client/server connections from the HTTPS Protocols dropdown list. Select the Transport Layer Security (TLS) versions TrueNAS SCALE can use for connection security.
To redirect HTTP connections to HTTPS, select Web Interface HTTP -> HTTPS Redirect. A GUI SSL Certificate is required for HTTPS.
Activating this also sets the HTTP Strict Transport Security (HSTS) maximum age to 31536000 seconds (one year).
This means that after a browser connects to the web interface for the first time, the browser continues to use HTTPS and renews this setting every year.
A warning displays when setting this function. Setting HTTPS redirects can have unintended consequences if an app does not support secure connections.
If this occurs, to reset, clear this option and click Save. Then clear the browser cache before trying to connect to the app again.
To send failed HTTP request data which can include client and server IP addresses, failed method call tracebacks, and middleware log file contents to iXsystems, select Crash Reporting.
Sending Usage Statistics to iXsystems
To send anonymous usage statistics to iXsystems, select the Usage Collection option.
Showing Console Messages
To display console messages in real time at the bottom of the browser, select the Show Console Messages option.
Localizing TrueNAS SCALE
To change the WebUI on-screen language and set the keyboard to work with the selected language, click Settings on the System Settings > General > Localization widget. The Localization Settings configuration screen opens.
Select the language from the Language dropdown list, and then the keyboard layout in Console Keyboard Map.
Enter the time zone in Timezone and then select the local date and time formats to use.
Click Save.
Adding NTP Servers
The NTP Servers widget allows users to configure Network Time Protocol (NTP) servers.
These sync the local system time with an accurate external reference.
By default, new installations use several existing NTP servers. TrueNAS SCALE supports adding custom NTP servers.
This article provides information on adding sysctl variables, setting the system dataset pool, and setting the number of simultaneous replication tasks the system can run.
This article provides information on setting up or changing the Console setup menu port, port speed, the banner users see, and determine whether it requires a password to use.
This article provides information on setting up or changing the syslog server, the level of logging and the information included in the logs, and using TLS as the transport protocol.
This article provides information on isolating Graphic Processing Units (GPUs) installed in your system for use by a VM in SCALE.
10.3.1 - Managing Advanced Settings
This article provides information on adding sysctl variables, setting the system dataset pool, and setting the number of simultaneous replication tasks the system can run.
TrueNAS SCALE advanced settings screen provides configuration options for the console, syslog, sysctl, replication, cron jobs, init/shutdown scripts, system dataset pool, isolated GPU device(s), and self-encrypting drives.
Advanced settings have reasonable defaults in place. A warning message displays for some settings advising of the dangers making changes.
Changing advanced settings can be dangerous when done incorrectly. Use caution before saving changes.
This article provides information on sysctl, system dataset pool and setting the maximum number of simultaneous replication tasks the system can perform.
Managing Sysctl Variables
Use ADD on the Sysctl widget to add a tunable that configures a kernel module parameter at runtime.
The Add Sysctl or Edit Sysctl configuration screens display the settings.
Enter the sysctl variable name in Variable. Sysctl tunables are used to configure kernel module parameters while the system is running and generally take effect immediately.
Enter a sysctl value to use for the loader in Value.
Enter a description and then select Enable. To disable but not delete the variable, clear the Enable checkbox.
Click Save.
Managing the System Dataset Pool
System Dataset Pool widget displays the pool configured as the system dataset pool. The widget allows users to select the storage pool they want to hold the system dataset.
The system dataset stores debugging core files, encryption keys for encrypted pools, and Samba4 metadata, such as the user and group cache and share level permissions.
Click Configure to open the System Dataset Pool configuration screen. Select a pool from the dropdown list and click Save.
If the system has one pool, TrueNAS configures that pool as the system dataset pool. If your system has more than one pool, you can select the system dataset pool from the dropdown list of available pools. Users can move the system dataset to unencrypted pools or encrypted pools without passphrases.
Users can move the system dataset to a key-encrypted pool, but cannot change the pool encryption type afterward. If the encrypted pool already has a passphrase set, you cannot move the system dataset to that pool.
Setting the Number of Replication Tasks
The Replication widget displays the number of replication tasks that can execute simultaneously configured on the system. It allows users to adjust the maximum number of replication tasks the system can execute simultaneously.
Click Configure to open the Replication configuration screen.
Enter a number for the maximum number of simultaneous replication tasks you want to allow the system to process and click Save.
This article provides information on adding or modifying cron jobs in SCALE.
Cron jobs allow users to configure jobs that run specific commands or scripts on a regular schedule using cron(8). Cron Jobs help users run repetitive tasks.
Advanced settings have reasonable defaults in place. A warning message displays for some settings advising of the dangers making changes.
Changing advanced settings can be dangerous when done incorrectly. Use caution before saving changes.
The Cron Jobs widget on the System > Advanced screen displays No Cron Jobs configured until you add a cron job, and then it displays information on cron job(s) configured on the system.
Click Add to open the Add Cron Job configuration screen to create a new cron job, or if you want to modify an existing job, click anywhere on the item to open the Edit Cron Jobs configuration screen populated with the settings for that cron job.
The Add Cron Job and Edit Cron Job configuration screens display the same settings.
Enter a description for the cron job.
Next, enter the full path to the command or script to run in Command. For example, a command string to create a list of users on the system and write that list to a file enter cat /etc/passwd > users_$(date +%F).txt.
Select a user account to run the command from the Run As User dropdown list. The user must have permissions allowing them to run the command or script.
Select a schedule preset or choose Custom to open the advanced scheduler.
Note that an in-progress cron task postpones any later scheduled instance of the same task until the running task is complete.
If you want to hide standard output (stdout) from the command, select Hide Standard Output. If left cleared, TrueNAS emails any standard output to the user account cron that ran the command.
To hide error output (stderr) from the command, select Hide Standard Error. If left cleared, TrueNAS emails any error output to the user account cron that ran the command.
Select Enabled to enable this cron job. If you leave this checkbox cleared it disables the cron job without deleting it.
This article provides information on setting up or changing the Console setup menu port, port speed, the banner users see, and determine whether it requires a password to use.
The Console widget on the System Setting > Advanced screen displays current console settings for TrueNAS.
Click Configure to open the Console configuration screen. The Console configuration settings determine how the Console setup menu displays, the serial port it uses and the speed of the port, and the banner users see when it is accessed.
To display the console without being prompted to enter a password, select Show Text Console without Password Prompt. Leave it clear to add a login prompt to the system before showing the console menu.
Select Enable Serial Console to enable the serial console but do not select this if the serial port is disabled.
Enter the serial console port address in Serial Port and set the speed (in bits per second) from the Serial Speed dropdown list. Options are 9600, 19200, 38400, 57600 or 115200.
Finally, enter the message you want to display when a user logs in with SSH in MOTD Banner.
This article provides information on setting up or changing the syslog server, the level of logging and the information included in the logs, and using TLS as the transport protocol.
The Syslog widget on the System > Advanced screen allows users determine how and when the system sends log messages to the syslog server.
The Syslog widget displays the existing system logging settings.
Before configuring your syslog server to use TLS as the Syslog Transport method, first make sure you add a certificate and certificate authority (CA) to the TrueNAS system. Go to Credentials > Certificates and use the Certificate Authority (CA) and Certificates widgets to verify you have the required certificates or to add them.
Click Configure to open the Syslog configuration screen.
The Syslog configuration screen settings specify the logging level the system uses to record system events, the syslog server DNS host name or IP, the transport protocol it uses, and if using TLS, the certificate and certificate authority (CA) for that server, and finally if it uses the system dataset to store the logs.
Enter the remote syslog server DNS host name or IP address in Syslog Server. To use non-standard port numbers like mysyslogserver:1928, add a colon and the port number to the host name. Log entries are written to local logs and sent to the remote syslog server.
Enter the transport protocol for the remote system log server connection in Syslog Transport. Selecting Transport Layer Security (TLS) displays the Syslog TLS Certificate and Syslog TSL Certificate Authority fields.
Next, select the transport protocol for the remote system log server TLS certificate from the Syslog TLS Certificate dropdown list, and select the TLS CA for the TLS server from the Syslog TLS Certificate Authority dropdown list.
Select Use FQDN for Logging to include the fully-qualified domain name (FQDN) in logs to precisely identify systems with similar host names.
Select the logging level the syslog server uses when creating system logs from Syslog Level the dropdown list. The system only sends logs matching this level.
Select Use System Dataset to store system logs on the system dataset. Leave clear to store system logs in /var/ on the operating system device.
This article provides information on adding or modifying init/shutdown scripts in SCALE.
The Init/Shutdown Scripts widget on the System > Advanced screen allows you to add scripts to run before or after initialization (start-up), or at shutdown. For example, creating a script to backup your system or run a systemd command before exiting and shutting down the system.
Advanced settings have reasonable defaults in place. A warning message displays for some settings advising of the dangers making changes.
Changing advanced settings can be dangerous when done incorrectly. Use caution before saving changes.
The Init/Shutdown Scripts widget displays No Init/Shutdown Scripts configured until you add either a command or script, and then the widget lists the scripts configured on the system.
Click Add to open the Add Init/Shutdown Script configuration screen.
Enter a description and then select Command or Script from the Type dropdown list. Selecting Script displays additional options.
Enter the command string in Command, or if using a script, enter or use the browse to the path in Script. The script runs using dash(1).
Select the option from the When dropdown list for the time this command or script runs.
Enter the number of seconds after the script runs that the command should stop in Timeout.
Select Enable to enable the script. Leave clear to disable but not delete the script.
Click Save.
Editing an Init/Shutdown Script
Click a script listed on the Init/Shutdown Scripts widget to open the Edit Inti/Shutdown Script configuration screen populated with the settings for that script.
You can change from a command to a script, modify the script or command as needed.
To disable but not delete the command or script, clear the Enabled checkbox.
This article provides information on adding or modifying self-encrypting drive (SED) user and global passwords in SCALE.
The Self-Encrypting Drive(s) widget on the System > Advanced screen allows you set the user and global SED password in SCALE.
Managing Self-Encrypting Drives
The Self-Encrypting Drive (SED) widget displays the ATA security user and password configured on the system.
Click Configure to open the Self-Encrypting Drive configuration screen.
The Self-Encrypting Drive configuration screen allows users set the ATA security user and create a SED global password.
Select the user passed to camcontrol security -u to unlock SEDs from the ATA Security User dropdown list. Options are USER or MASTER.
Enter the global password to unlock SEDs in SED Password and in Confirm SED Password.
This article provides information on isolating Graphic Processing Units (GPUs) installed in your system for use by a VM in SCALE.
The Isolate GPU PCI’s ID widget on the System > Advanced screen allows you to isolate a GPU installed in your system for use by a virtual machine (VM).
Advanced settings have reasonable defaults in place. A warning message displays for some settings advising of the dangers making changes.
Changing advanced settings can be dangerous when done incorrectly. Use caution before saving changes.
The Isolated GPU Device(s) widget displays an graphics processing unit (GPU) device(s) configured on your system.
Click Configure to open the Isolate GPU PCI’s ID screen where you can select a GPU to isolate it for GPU passthrough.
GPU passthrough allows the TrueNAS SCALE kernel to directly present an internal PCI GPU to a virtual machine (VM).
The GPU device acts like the VM is driving it, and the VM detects the GPU as if it is physically connected. Select the GPU device ID from the dropdown list.
To isolate a GPU you must have at least two in your system; one allocated to the host system for system functions and the other available to isolate for use by a VM or application.
Isolating the GPU prevents apps and the system from accessing it.
This article provides instructions on managing TrueNAS boot environments.
TrueNAS supports a ZFS feature known as boot environments. These are snapshot clones that TrueNAS can boot into. Only one boot environment can be used for booting.
A boot environment allows rebooting into a specific point in time and greatly simplifies recovering from system misconfigurations or other potential system failures.
With multiple boot environments, the process of updating the operating system becomes a low-risk operation.
The updater automatically creates a snapshot of the current boot environment and adds it to the boot menu before applying the update.
If anything goes wrong during the update, the system administrator can boot TrueNAS into the previous environment to restore system functionality.
Managing Boot Environments
To view the list of boot environments on the system, go to System Settings > Boot. Each boot environment entry contains this information:
Name: the name of the boot entry as it appears in the boot menu.
Active: indicates which entry boots by default if a boot environment is not active.
Created: indicates the boot environment creation date and time.
Space: shows boot environment size.
Keep: indicates whether or not TrueNAS deletes this boot environment when a system update does not have enough space to proceed.
To access more options for a boot environment, click to display the list of options.
Activating a Boot Environment
The option to activate a boot environment only displays for boot entries not set to Active
Activating an environment means the system boots into the point of time saved in that environment the next time it is started.
Click the more_vert for an inactive boot environment, and then select Activate to open the Activate dialog.
Click Confirm, and then click Activate.
The System Boot screen status changes to Reboot and the current Active entry changes from Now/Reboot to Now, indicating that it is the current boot environment but is not used on next boot.
Cloning a Boot Environment
Cloning copies the selected boot environment into a new entry.
Click the more_vert for a boot environment, and then select Clone to open the Clone Boot Environment window.
Enter a new name using only alphanumeric characters, and/or the allowed dashes (-), underscores (_), and periods (.) characters.
The Source field displays the boot environment you are cloning. If the displayed name is incorrect, close the window and select the correct boot environment to clone.
Click Save.
Renaming a Boot Environment
You can change the name of any boot environment on the System > Boot screen.
Click the more_vert for a boot environment, and then select Rename to open the Rename Boot Environment window.
Enter a new name using only alphanumeric characters, and/or the allowed dashes (-), underscores (_), and periods (.) characters.
Verify the boot environment in Name is the one you want to rename.
Click Save.
Deleting a Boot Environment
Deleting a boot environment removes it from the System > Boot screen and from the boot menu.
Click the more_vert for a boot environment, and then select Delete to open the Delete dialog.
Select Confirm and then click Delete.
You cannot delete the default and any active entries.
Because you cannot delete an activated boot entry, this option does not display for activated boot environments
To delete the active boot environment, first activate another entry and then delete the environment you want to remove.
Keeping a Boot Environment
Keep toggles with the Unkeep option, and they determine whether the TrueNAS updater can automatically delete this boot environment if there is not enough space to proceed with an update.
Click the more_vert for a boot environment, and then select Keep to open the Keep dialog.
Select Confirm and then click Keep Flag.
The boot environment action list removes the Keep option and adds Unkeep.
This makes the boot environment subject to automatic deletion if the TrueNAS updater needs space for an update.
Adding a Boot Environment
You can make a new boot environment to your TrueNAS.
To add a new boot environment, click Actions at the top right of the System > Boot screen and click add to open the Create Boot Environment window.
Enter a new name using only alphanumeric characters, and/or the allowed dashes (-), underscores (_), and periods (.) characters.
Click Save.
Changing the Scrub Interval
The Stats/Settings option displays current system statistics and provides the option to change the scrub interval, or how often the system runs a data integrity check on the operating system device.
Click Actions at the top right of the System > Boot screen and click Stats/Settings.
The Stats/Settings window displays statistics for the operating system device: Boot pool Condition as ONLINE or OFFLINE, Size in GiB and the space in use in Used, and Last Scrub Run with the date and time of the scrub.
By default, the operating system device is scrubbed every 7 days.
To change the default scrub interval, input a different number in Scrub interval (in days) and click Update Interval.
Checking Boot Pool Status
You an attach or replace the boot environment.
Click Actions at the top right of the System > Boot screen and click Boot Pool Status to open the Boot Pool Status screen that shows current operating system device (boot pool), the path for the pool, and the read, write, or checksum errors for the device.
Click the more_vert to open the Actions options.
Click Attach to select a device from the Member Disk dropdown.
Select Use all disk space to use the entire capacity of the new device.
Click Save.
If you want to replace the device, click Replace, select the device from the Member Disk dropdown, and then click Save.
To return to the System > Boot screen, click Boot in the breadcrumb header.
Scrubbing a Boot Pool
You can perform a manual data integrity check (scrub) of the operating system device at any time.
Click Actions at the top right of the System > Boot screen and click Scrub Boot Pool to open the Scrub dialog.
Click Confirm and then Start Scrub.
Changing Boot Environments
Sometimes, rolling back to an older boot environment can be useful.
For example, if an update process does not go as planned, it is easy to roll back to a previous boot environment.
TrueNAS automatically creates a boot environment when the system updates.
Use the Activate option on the more_vert for the desired boot environment.
This changes the Active column to Reboot for the boot environment, and means the boot environment becomes active on the next system boot.
The system configuration also changes to the state it was in when the boot environment was created.
This article provides general information on the TrueNAS services, and a summary of each indiviual service article in the Services area.
System Settings > Services displays each system component that runs continuously in the background. These typically control data-sharing or other external access to the system. Individual services have configuration screens and activation toggles, and you can set them to run automatically.
Documented services related to data sharing or automated tasks are in their respective Shares and Tasks articles.
This article provides information on configuring an rsync module and TCP port to use as an alternative to SSH when communicating with a TrueNAS as a remote rsync server.
This article provides information on configuring the WebDAV service.
10.5.1 - Configuring Dynamic DNS Service
This article provides instructions on how to configure dynamic DNS service in TrueNAS SCALE.
Dynamic Domain Name Service (DDNS) is useful when you connect TrueNAS to an Internet service provider (ISP) that periodically changes the system’s IP address.
With Dynamic DNS, the system automatically associates its current IP address with a domain name and continues to provide access to TrueNAS even if the system IP address changes.
Configuring Dynamic DNS
DDNS requires registration with a DDNS service such as DynDNS before configuring TrueNAS.
Have the DDNS service settings available or open in another browser tab when configuring TrueNAS.
Log in to the TrueNAS web interface and go to System Settings > Services > Dynamic DNS.
Select the provider from the dropdown list, or if not listed, select Custom Provider.
If you select Custom Provider also enter the DynmicDNS server name in Custom Server and the path to the server obtained from that provider in Custom Path.
Select CheckIP Server SSL if you want to use HTTPS to connect to the CheckIP server, and then enter the name and port number of the server that reports the external IP addresses and the path to the CheckIP server.
Select SSL if you want to use HTTPS to connect o the server that updates the DNS record.
Enter the fully qualified domain name of the host with the dynamic IP address in Domain Name.
Enter the number of seconds for how often you want to check the IP address in Update Period.
Click Save.
Start the DDNS service after choosing your Provider options and saving the settings.
This article provides instructions on configuring the storage, user, and access permissions FTP service uses, and configuring the FTP service.
The File Transfer Protocol (FTP) is a simple option for data transfers.
The SSH and Trivial FTP options provide secure or simple config file transfer methods respectively.
Options for configuring FTP, SSH, and TFTP are in System Settings > Services.
Click the edit to configure the related service.
Configuring FTP Services Storage
FTP requires a new dataset and a local user account.
Go to Storage to add a new dataset to use as storage for files.
Next, add a new user. Go to Credentials > Local Users and click Add to create a local user on the TrueNAS.
Assign a user name and password, and link the newly created FTP dataset as the user home directory.
You can do this for every user, or create a global account for FTP (for example, OurOrgFTPaccnt).
Edit the file permissions for the new dataset. Go to Storage > Usage > Manage Datasets. Click on the name of the new dataset. Scroll down to Permissions and click the Edit button.
Enter or select the new user account in the User and Group fields.
Select Apply User and Apply Group.
Select the Read, Write and Execute for User, Group and Other that you want to apply.
Click Save.
Configuring FTP Service
To configure FTP, go to System Settings > Services and find FTP, then click edit to open the Services > FTP screen.
Configure the options according to your environment and security considerations. Click Advanced Settings to display more options.
To confine FTP sessions to the home directory of a local user, select both chroot and Allow Local User Login.
Do not allow anonymous or root access unless it is necessary.
For better security, enable TLS when possible (especially when exposing FTP to a WAN).
TLS effectively makes this FTPS.
Click Save and then start the FTP service.
Connecting with FTP
Use a browser or FTP client to connect to the TrueNAS FTP share.
The images below use FileZilla, a free option.
The user name and password are those of the local user account on the TrueNAS.
The default directory is the same as the user home directory.
After connecting, you can create directories and upload or download files.
This article provides instuctions on configuring the Link Layer Discovery Protocol (LLDP) service.
Network devices use the Link Layer Discovery Protocol (LLDP) to advertise their identity, capabilities, and neighbors on an Ethernet network.
TrueNAS uses the ladvd LLDP implementation.
When the local network contains managed switches, configuring and starting LLDP tells TrueNAS to advertise itself on the network.
To configure LLDP, go to System Settings > Services, find LLDP and click the edit.
Enter the two-letter country code as found in ISO 3166-1 alpha-2 used to enable LLDP location support.
Enter the physical location of the host in Interface Description.
To save any peer information received, select Interface Description.
This article provides information on configuring NFS service in SCALE.
The Services > NFS configuration screen displays settings to customize the TrueNAS NFS service.
You can access it from System Settings > Services screen. Locate NFS and click edit to open the screen, or use the Config Service option on the Unix (NFS) Share widget options menu found on the main Sharing screen.
Select Start Automatically to activate NFS service when TrueNAS boots.
Configuring NFS Service
Unless a specific setting is required, we recommend using the default NFS settings.
Select the IP address from the Bind IP Addresses dropdown list if you want to use a specific static IP address, or to list on all available addresses leave this blank.
Enter an optimal number of threads used by the kernel NFS server in Number of threads.
If you are using NFSv4 select Enable NFSv4. NFSv3 ownership model for NFSv4 clears, allowing you to select or leave it clear.
If you want to force NFS shares to fail if the Kerberos ticket is unavailable, select Require Kerberos for NFSv4.
Next enter a port to bind to in the field that applies:
Enter a port to bind mountd(8) in mountd(8) bind port.
Enter a port to bind rpc.statd(8)in rpc.statd(8) bind port.
Enter a port to bind rpc.lockd(8) in rpc.lockd(8) bind port.
Select Serve UDP NFS clients if NFS clients need to use UDP.
Select Allow non-root mount only if required by the NFS client to allow serving non-root mount requests.
Select Support > 16 groups when a user is a member of more than 16 groups. This assumes group membership is configured correctly on the NFS server.
Click Save.
Start the NFS service.
When TrueNAS is already connected to Active Directory, setting NFSv4 and Require Kerberos for NFSv4 also requires a Kerberos Keytab.
This article provides configuration information for OpenVPN Client and Server services.
A virtual private network (VPN) is an extension of a private network over public resources.
It lets clients securely connect to a private network even when remotely using a public network.
TrueNAS provides OpenVPN as a system-level service to provide VPN server or client functionality.
TrueNAS can act as a primary VPN server that allows remote clients to access system data using a single TCP or UDP port.
Alternatively, TrueNAS can integrate into a private network, even when the system is in a separate physical location or only has access to publicly visible networks.
Before configuring TrueNAS as either an OpenVPN server or client, you need an existing public key infrastructure (PKI) with Certificates and Certificate Authorities created in or imported to TrueNAS.
Certificates allow TrueNAS to authenticate with clients or servers by confirming a valid master Certificate Authority (CA) signed the network credentials.
To read more about the required PKI for OpenVPN, see the OpenVPN PKI Overview.
In general, configuring TrueNAS OpenVPN (server or client) includes selecting networking credentials, setting connection details, and choosing additional security or protocol options.
OpenVPN Client
Go to System Settings > Services and find OpenVPN Client.
Click the edit to configure the service.
Choose the certificate to use as an OpenVPN client.
The certificate must exist in TrueNAS and be active (unrevoked).
Enter the Remote OpenVPN server’s hostname or IP address.
Continue to review and choose any other Connection Settings that fit your network environment and performance requirements.
The Device Type must match the OpenVPN server Device Type.
Nobind prevents using a fixed port for the client and is enabled by default so the OpenVPN client and server run concurrently.
Finally, review the Security Options and ensure they meet your network security requirements.
If the OpenVPN server uses TLS Encryption, copy the static TLS encryption key and paste it into the TLS Crypt Auth field.
OpenVPN Server
Go to System Settings > Services and find OpenVPN Server.
Click the edit to configure the service.
Choose a Server Certificate for the OpenVPN server.
The certificate must exist in TrueNAS and be active (unrevoked).
Now define an IP address and netmask for the OpenVPN Server.
Select the remaining Connection Settings that fit your network environment and performance requirements.
If using a TUNDevice Type, you can choose a virtual addressing topology for the server in Topology:
NET30: Use one /30 subnet per client in a point-to-point topology. Use when connecting clients are Windows systems.
P2P: Point-to-point topology that points the local server and remote client endpoints to each other. Each client gets one IP address. Use when none of the clients are Windows systems.
SUBNET: The interface uses an IP address and subnet. Each client gets one IP address. Windows clients require the TAP-Win32 driver version 8.2 or newer. TAP devices always use the SUBNET Topology.
TrueNAS applies the Topology selection to any connected clients.
When TLS Crypt Auth Enabled is selected, TrueNAS generates a static key for the TLS Crypt Auth field after saving the options.
To change this key, click Renew Static Key.
Clients connecting to the server require the key.
TrueNAS stores keys in the system database and includes them in client config files. We recommend always backing up keys in a secure location.
Finally, review the Security Options and choose settings that meet your network security requirements.
After configuring and saving your OpenVPN Server, generate client configuration files to import to any OpenVPN client systems connecting to this server.
You need the certificate from the client system already imported into TrueNAS.
To generate the configuration file, click Download Client Config and select the Client Certificate.
Common Options (Client or Server)
Many OpenVPN server or client configuration fields are identical.
This section covers these fields and lists specific configuration options in the Server and Client sections.
The Additional Parameters field manually sets any core OpenVPN config file options.
See the OpenVPN Reference Manual for descriptions of each option.
Connection Settings
Setting
Description
Root CA
The Certificate Authority (CA) must be the root CA you used to sign the client and server certificates.
Port
The port that the OpenVPN connection is to use.
Compression
Choose a compression algorithm for traffic. Leave empty to send data uncompressed.
LZO is a standard compression algorithm that is backward compatible with previous (pre-2.4) versions of OpenVPN.
LZ4 is newer and typically faster and requires fewer system resources.
Protocol
Choose between UDP or TCP OpenVPN protocols. UDP sends packets in a continuous stream. TCP sends packets sequentially.
UDP is usually faster and less strict about dropped packets than TCP.
To force the connection to be IPv4 or IPv6, choose one of the 4 or 6 UDP or TCP options.
Device Type
Use a TUN or TAP virtual networking device and layer with OpenVPN. The device must be identical between the OpenVPN server and clients.
Security Options
OpenVPN includes several security options since using a VPN involves connecting to a private network while sending data over less secure public resources.
Security options are not required, but they help protect data users send over the private network.
Setting
Description
Authentication Algorithm
Validates packets sent over the network connection. Your network environment might require a specific algorithm. If not, SHA1 HMAC is a reliable algorithm to use.
Cipher
Encrypts data packets sent through the connection. Ciphers aren’t required but can increase connection security. You might need to verify which ciphers your networking environment requires. If there are no specific cipher requirements, AES-256-GCM is a good default choice.
TLS Encryption
When TLS Crypt Auth Enabled is selected, OpenVPN adds another layer of security by encrypting all TLS handshake messages. This setting requires sharing a static key between the OpenVPN server and clients.
Service Activation
Click Save after configuring the server or client service.
Start the service by clicking the related toggle in System Settings > Services.
Hover over the toggle to check the service current state.
Selecting Start Automatically starts the service whenever TrueNAS completes booting.
This article provides information on configuring an rsync module and TCP port to use as an alternative to SSH when communicating with a TrueNAS as a remote rsync server.
Rsync is a utility that copies data across a network. The Services > Rsync screen has two tabs: Configure and Rsync Module.
Use the Configure screen to add the TCP port number for the rsync service. Port 22 is reserved for TrueNAS.
Use the Rsync Module screen to configure an rsync module on a TrueNAS system. You must configure at least one rsync module. This module is used as the communication mode when you set up a data protection rsyc task.
Adding an Rsync Module TCP Port
Go to Services and click the Configure icon for Rsync to open the Configure screen.
Enter a new port number if not the default in TCP Port. This is the port the rsync server listens on.
Enter any additional parameters from rsyncd.conf(5) you want to use in Auxiliary Parameters.
Click Save.
Adding an Rsync Module
When you set up an rsync task on the Data Protection screen, you can use either Module or SSH as the rsync mode. If you select Module in Rsync Mode on the Add Rsync Task screen, it uses the rysnc module set up in the rsync service as a custom-defined remote module of the rsync server.
To configure an rsync module click Add or Add Rsync Modules on the Services > Rsync > Rsync Module screen.
Click either Add RSYNC Modules if a remote module does not exist, or Add to open the Add Rsync screen to configure a module to use as the mode.
Enter a name, and then either enter the path or use the arrow_right to the left of folder/mnt to browse to the pool or dataset to store received data.
Click on the dataset or zvol name to populate the path field.
To collapse the dataset tree, click the arrow_right to the left of folder/mnt again.
Select Enable to activate the module for use with rsync.
Select the permission access level in Access Mode.
Select the user and group that runs the rsync command during file transfer to and from this module.
Enter any allow and or deny hosts. Separate multiple entries by pressing Enter after each entry in Hosts Allow and/or Hosts Deny.
When a Hosts Allow list is defined, only the IPs and hostnames on the list are able to connect to the module.
Enter any additional rsync configuration parameters from rsyncd.conf(5) in Auxilliary Parameters.
Click Save.
You can now configure an rsync task that uses Module in Rsync Mode on the Add Rsync Task screen, or change an existing rsync task from SSH to Module.
This article provides information on configuring S3 service in SCALE.
S3 allows you to connect to TrueNAS from a networked client system with the MinIO browser, s3cmd, or S3 browser.
S3 is an object storage protocol that many major cloud providers like Amazon Web Services™ use.
On TrueNAS, the service is another way to store files and can be viewed with a web browser.
Because S3 is the de facto standard for cloud-based storage, setting up an S3 service allows organizations or online application developers to use TrueNAS to replace or archive expensive cloud storage.
Setting up the S3 service
Having large numbers of files (>100K for instance) in a single bucket with no sub-directories can harm performance and cause stability issues.
Go to the System Settings > Services and find S3, then click edit to open the Services > S3 screen to configure the service.
First, select a clean dataset, one that does not have existing data files. If you do not have a clean dataset, create a dataset.
MinIO manages files as objects that you cannot mix with other dataset files.
Configure the remaining options as needed in your environment and start the service after saving any changes.
Making MinIO Connections
When Enable Browser is selected, test the MinIO browser access by opening a web browser and typing the TrueNAS IP address with the TCP port.
You must allow the port entered in the Services > S3 screen Port through the network firewall to permit creating buckets and uploading files.
Example: https://192.168.0.3:9000.
MinIO supports two different connection methods.
Using s3cmd
Linux or macOS users must have the s3cmd service installed before beginning this setup.
On Windows, users can also refer to S3Express for a similar command-line experience.
Ubuntu or other Linux distributions can access the configuration by running s3cmd --configure to walk through critical settings.
Enter the specified access key and the secret key.
Enter the TrueNAS IP address followed by TCP port under S3 Endpoint, and reply N to the DNS-style bucket+hostname.
Save the file.
On Linux, the default is in the home directory ~/.s3cfg.
If the connection has issues, open .s3cfg again to troubleshoot.
In Ubuntu, use nano .s3cfg or vi .s3cfg or gedit .s3cfg depending on the preferred text editor.
For other operating systems, .s3cfg file location and editing tools might vary.
Scroll down to the host_bucket area and ensure the configuration removed the %(bucket)s. portion and the address points to the IP_address:TCP_port for the system.
In the settings, select S3 Compatible Storage as the Account Type, then enter the MinIO access point similar to the s3cmd setup (TrueNAS_IP_address:9000 or other port if set differently).
Select the SSL settings appropriate for the particular setup.
The S3 browser assumes SSL by default, but it can be unset for a LAN attached session.
It is possible to access, create new buckets, or upload files to created buckets.
This article provides instructions on configuring the SMB service in SCALE.
The Services > SMB screen displays after going to the Shares screen, finding the Windows (SMB) Shares section, and clicking more_vert + Config Service.
Alternately, you can go to System Settings > Services and click the edit edit icon for the SMB service.
Configuring SMB Service
The SMB Services screen displays setting options to configure TrueNAS SMB settings to fit your use case.
In most cases you can set the required fields and accept the rest of the setting defaults. If you have specific needs for your uses case, click Advanced Options. This displays more settings
Enter the name of the TrueNAS host system if not the default displayed in NetBIOS Name. This name is limited to 15 characters and cannot be the Workgroup name.
Enter any alias name or names that do not exceed 15 characters in NetBIOS Alias. Separate alias names with a space between them.
Enter a name that matches the Windows workgroup name in Workgroup. When unconfigured and Active Directory or LDAP is active, TrueNAS detects and sets the correct workgroup from these services.
If using SMB1 clients, select Enable SMB1 support to allow legacy SMB1 clients to connect to the server. Note: SMB1 is being deprecated. We advise you to upgrade clients to operating system versions that support modern SMB protocol versions.
If you plan to use the insecure and vulnerable NTLMv1 encryption, select NTLMv1 Auth to allow smbd attempts to authenticate users. This setting allows backward compatibility with older versions of Windows, but is not recommended. Do not use on untrusted networks.
Enter any notes about the service configuration in Description
Use Auxiliary Parameters to enter additional smb.conf options, or to log more details when a client attempts to authenticate to the share, add log level = 1, auth_audit:5. Refer to the [Samba Guide]9http://www.oreilly.com/openbook/samba/book/appb_02.html) for more information on these settings.
This article provides information on configuring SNMP service on SCALE.
SNMP (Simple Network Management Protocol) monitors network-attached devices for conditions that warrant administrative attention.
TrueNAS uses Net-SNMP to provide SNMP.
To configure SNMP, go to System Settings > Services page, find SNMP, and click the edit.
Port UDP 161 listens for SNMP requests when starting the SNMP service.
Management Information Bases (MIBs)
Available Management Information Bases (MIBs) are located in /usr/local/share/snmp/mibs.
This directory contains many files routinely added or removed from the directory.
Check the directory on your system by going to System Settings > Shell and entering ls /usr/local/share/snmp/mibs.
Here is a sample of the directory contents:
Allowing external connections to TrueNAS is a security vulnerability!
Do not enable SSH unless you require external connections.
See Security Recommendations for more security considerations when using SSH.
Configuring SSH Service
To configure SSH go to System Settings > Services, find SSH, and click edit to open the basic settings General Options configuration screen.
Configure the options as needed to match your network environment.
We recommend you add these SSH service options in Auxiliary Parameters:
Add NoneEnabled no to disable the insecure none cipher.
Increase the ClientAliveInterval if SSH connections tend to drop.
Increase the ClientMaxStartup value (10 is default) when you need more concurrent SSH connections.
Remember to enable the SSH service in System Settings > Services after making changes.
To create and store specific SSH connections and keypairs, go to Credentials > Backup Credentials.
Using SSH File Transfer Protocol (SFTP)
SFTP (SSH File Transfer Protocol) is available by enabling SSH remote access to the TrueNAS system.
SFTP is more secure than standard FTP as it applies SSL encryption on all transfers by default.
Go to System Settings > Services, find the SSH entry, and click the edit to open the Services > SSH basic settings configuration screen.
Select Allow Password Authentication and decide if you need Log in as Root with Password.
SSH with root is a security vulnerability. It allows users to fully control the NAS remotely with a terminal instead of providing SFTP transfer access.
Review the remaining options and configure them according to your environment or security needs.
Using SFTP Connections
Open an FTP client (like FileZilla) or command line.
This article shows using FileZilla as an example.
Using FileZilla, enter SFTP://{TrueNAS IP} {username} {password} {port 22}. Where {TrueNAS IP} is the IP address for your TrueNAS system, {username} is the administrator login user name, and {password} is the adminstrator password, and {port 22} to connect.
SFTP does not offer chroot locking.
While chroot is not 100% secure, lacking chroot lets users move up to the root directory and view internal system information.
If this level of access is a concern, FTP with TLS might be the more secure choice.
This article provides instructions on configuring TFTP service in SCALE.
The File Transfer Protocol (FTP) is a simple option for data transfers.
The SSH and Trivial FTP options provide secure or simple config file transfer methods respectively.
Options for configuring FTP, SSH, and TFTP are in System Settings > Services.
Click the edit to configure the related service.
TFTP Service
The Trivial File Transfer Protocol (TFTP) is a lightweight version of FTP typically used to transfer configuration or boot files between machines, such as routers, in a local environment.
TFTP provides a limited set of commands and provides no authentication.
If TrueNAS is only storing images and configuration files for network devices, configure and start the TFTP service.
Starting the TFTP service opens UDP port 69.
Select the path to where you want to store files, and then select the file access permissions for both user and group. If you want to allow new file transfers select Allow new Files.
Add the host and port connection settings and select the user that can access TFTP services.
Enter any additional TFTP settings in the Auxiliary Parameters field.
This article provides information on configuring UPS service in SCALE.
TrueNAS uses Network UPS Tools NUT to provide UPS support.
After connecting the TrueNAS system UPS device, configure the UPS service by going to System settings > Services, finding UPS, and clicking edit.
See [UPS Service Screen]({{ relref “UPSServicesScreenSCALE.md” }}) for details on the UPS service settings.
Some UPS models are unresponsive with the default polling frequency (default is two seconds).
TrueNAS displays the issue in logs as a recurring error like libusb_get_interrupt: Unknown error.
If you get an error, decrease the polling frequency by adding an entry to Auxiliary Parameters (ups.conf): pollinterval = 10.
upsc(8) can get status variables like the current charge and input voltage from the UPS daemon.
Run this in System Settings > Shell using the syntax upsc ups@localhost.
The upsc(8) manual page has other usage examples.
upscmd(8) can send commands directly to the UPS, assuming the hardware supports it.
Only users with administrative rights can use this command. You can create them in the Extra Users field.
For USB devices, the easiest way to determine the correct device name is to set Show console messages in System Settings > Advanced.
Plug in the USB device and look for a /dev/ugen or /dev/uhid device name in the console messages.
A UPS with adequate capacity can power multiple computers.
One computer connects to the UPS data port with a serial or USB cable.
This primary system makes UPS status available on the network for other computers.
The UPS powers the secondary computers, and they receive UPS status data from the primary system.
See the NUT User Manual and NUT User Manual Pages.
This article provides information on configuring the WebDAV service.
The Services > WebDAV configuration screen displays settings to customize the TrueNAS WebDAV service.
You can access it from System Settings > Services screen. Locate WebDAV and click edit to open the screen, or use the Config Service option on the WebDAV widget options menu found on the main Sharing screen.
Select Start Automatically to activate the service when TrueNAS boots.
If you require it, you must choose an SSL certificate (freenas_default is always available).
All Protocol options require you to define a number in the Port field.
Make sure the network is not already using the WebDAV service port.
Select the protocol option from the Protocol dropdown list. For better security, select HTTPS.
Enter a port number for unencrypted connections in HTTP Port. The default 8080 is not recommended. Do not reuse a port number.
Select the authentication method from the HTTP Authentication dropdown list. Select Basic Authentication for unencrypted or Digest Authentication for encrypted. No Authentication to not use any authentication method. To prevent unauthorized access to the shared data, set the HTTP Authentication to either Basic or Digest and create a new Webdav Password.
Enter and then confirm a password but do not use the know default davtest password.
This article provides information on using SCALE Shell.
The SCALE Shell is convenient for running command lines tools, configuring different system settings, or finding log files and debug information.
The Shell screen opens with the root user logged in.
Warning! The supported mechanisms for making configuration changes are the TrueNAS WebUI, CLI, and API exclusively.
All other are not supported and result in undefined behavior that can result in system failure!
The Set font size slider adjusts the Shell displayed text size.
Restore Default resets the font size to default.
The Shell stores the command history for the current session.
Leaving the Shell screen clears the command history.
Click Reconnect to start a new session.
Navigating In Shell
This section provides keyboard navigation shortcuts you can uses in Shell.
Action
Keyboard/ Command
Description
Scroll up
Up arrow expand_less
Scroll up through previous commands.
Scroll down
Down arrow expand_more
Scroll down through following commands.
Re-enter command
Enter
After entering a command, press Enter to re-enter the command.
Home
Moves the cursor to the top of the screen entries and results.
End
Moves the cursor to the bottom of the screen command entries and results.
Delete
Deletes what you highlight.
Tab
Type a few letters and press Tab to complete a command name or filename in the current directory.
right-click
Right-clicking in the terminal window displays a reminder about using Command+c and Command+v or Ctrl+Insert and Shift+Insert for copy and paste operations.
exit
Entering exit leaves the session.
Ctrl+Insert
Enter Ctrl+Insert to copy highlighted text in Shell.
Shift+Insert
Enter Shift+Insert to paste copied text in Shell.
Ctrl+c
Enter Ctrl+c to kill a process running in Shell. For example, the ping command.
Changing the Default Shell
Clicking other web interface menus closes the shell session and stops commands running in the Shell screen.
zsh is the default Shell, but you can change this by editing the root user.
Go to Credentials > Local Users and expand the root user.
Click Edit to open the Edit User screen.
Scroll down to Shell and select a different option from the dropdown list. Most Linux command-line utilities are available in the Shell.
Click Save.
Tmux allows you to detach sessions in Shell and then reattach them later.
Commands continue to run in a detached session.
Experimental CLI
The experimental SCALE command-line interface (CLI) lets you directly configure SCALE features.
SCALE CLI is experimental and still in active development.
We are not accepting bug reports or feature requests at this time.
To switch to the experimental CLI, enter cli.
Command
Description
..
up one level
exit
exit the CLI
ls
list the available directories and commands
? or help
list the built-in commands
The CLI features an auto-suggest mechanism for commands.
When you begin typing a command, the CLI shows a list of all matching commands.
We intend the CLI to be an alternative method for configuring TrueNAS features.
Because of the variety of available features and configurations, we include CLI-specific instructions in their respective UI documentation sections.
This article describes how to use the SCALE CLI Shell for basic networking, updating, and storage management.
The TrueNAS CLI Shell functions like a text-based version of the web UI. Users can enter commands to “navigate” to different menus within SCALE and perform actions. This article covers basic operations like setting up networking, performing updates, and listing storage pools/datasets.
Launch the TrueNAS CLI Shell
To open the TrueNAS CLI Shell, go to the Console Setup Menu and enter 6.
To close the TrueNAS CLI Shell, enter quit.
Basic Networking
Interfaces
This section covers assigning an IP address to a network interface.
Enter network interface.
If you don’t already know the interface you want to configure, enter query to display a list of all physical network interfaces.
To edit the interface, enter update interfacename aliases=["ipaddress/subnetmask"] ipv4_dhcp=false
The CLI displays the message: “You have pending network interface changes. Please run ‘network interface commit’ to apply them.”
Enter commit to apply the changes, then enter checkin to make them permanent.
Enter query to make sure the Truenas applies the changes successfully.
Enter .. to exit interface and go up one level to the network menu.
Global Configuration
This section covers configuring the default gateway.
Enter configuration (or network configuration if you just opened the CLI Shell).
Enter update ipv4gateway="ipaddress"
If entered properly, your system networking is now configured.
Performing Manual Updates
To perform a manual update via the TrueNAS CLI Shell, you will first have to upload a manual update file onto the system.
Connect to your system with your choice of FTP program (such as WinSCP) and place the manual update file in /var/tmp/firmware.
Once it finishes uploading, go to the console setup menu and launch the TrueNAS CLI Shell.
Enter system update manual path="/var/tmp/firmware/updatefilename"
Listing Storage Pools and Datasets
To list all configured storage pools, enter storage pool query.
Enter q to exit the query.
To list all configured datasets, enter storage dataset query.
Enter q to exit the query.
12 - Community Tutorials
Because TrueNAS is both Open Source and complicated, the massive user community often creates tutorials for very specific hardware or use cases. User-created tutorials are available in this location, but be aware these are provided “as-is” and are not officially supported by iXsystems, Inc.
Abstract This guide explains in details how to create a Hardened Backup Repository for VeeamBackup with TrueNAS Scale that means a repository that will survive to any remote attack.
The main idea of this guide is the disabling of the webUI with an inititialisation script and a cron job to prevent remote deletion of the ZFS snapshots that guarantee data immutability.
The key points are:
Rely on ZFS snapshots to guarantee data immutability Reduce the surface of attack to the minimum When the setup is finished, disable all remote management interfaces Remote deletion of snapshots is impossible even if all the credentials are stolen.
This article describes how to configure a SCALE SMB (Samba) share to support the Spotlight search API
12.1 - Hardened Backup Repository for Veeam
Abstract
This guide explains in details how to create a Hardened Backup
Repository for VeeamBackup with TrueNAS Scale
that means a repository that will survive to any remote attack.
The main idea of this guide is the disabling of the webUI
with an inititialisation script and a cron job
to prevent remote deletion of the ZFS snapshots
that guarantee data immutability.
The key points are:
Rely on ZFS snapshots to guarantee data immutability
Reduce the surface of attack to the minimum
When the setup is finished, disable all remote management interfaces
Remote deletion of snapshots is impossible even if all the credentials are stolen.
The only way to delete the snapshot is having physically access to the TrueNAS Server Console.
This article targets specifically TrueNAS Scale and Veeam Backup,
but it may also apply to some extent to TrueNAS Core
and/or other backup software.
Installation
Install TrueNAS Scale 22.02 on a physical machine.
If possible the computer should have at least 2 network interfaces:
one dedicated network interface for the management
the other one for the data sharing
A virtualized TrueNAS server is not suitable for a hardened backup
repository because a malware can easily take the control of TrueNAS server and destroy its data after compromising the hypervisor.
Create a ZFS pool
Go to Storage | Create Pool
Name: tank1
Even if you can use any pool name, the guide is easier to
follow if you use tank1 as pool name.
Click on SUGGEST LAYOUT to let TrueNAS guessing the best layout for you.
In most situations, it will just work very well.
Review the proposed layout, then click on CREATE
For a backup repository, the following layouts will provide
a good balance between IOPS, available space and level of redundancy:
2 to 4 disks: Stripe of mirrors
6 disks: RaidZ2
8 to 11 disks: RaidZ3
12 disks and more: Stripe of Raidz2/Raidz3
Configure SMART Tests
SMART
(Self-Monitoring, Analysis and Reporting Technology)
is a monitoring system included in hard disk drives
to anticipate imminent hardware failures.
Go to Data Protection | S.M.A.R.T Test | Add
All Disks
Type: LONG
Description: Long SMART test
Schedule: Monthly (0 0 1 * *) on the first day of the month at 00:00 (12:00 AM)
SAVE
Configure the network
For a hardened repository, it is better to use a fixed IP address than
a DHCP configuration, because a compromised DHCP server can provide
malicious DNS settings.
Global Network Configuration
Go to Network | Global Configuration
Hostname and Domain
Configure Hostname and Domain
Service Annoucement
NetBIOS-NS
mDNS
WS-Discovery
For a hardened repository it is preferable to disable any service annoucement
DNS Servers
Nameserver 1: 1.1.1.1
Nameserver 2: 8.8.8.8
For a hardened server, it is preferable to use the IP addresses of very well known
and secure public DNS than your own internal DNS server.
Cloudflare: 1.1.1.1
Google: 8.8.8.8
Default Gateway
Setup IPv4 (or IPv6) Default Gateway according to your network
Outbound Network
(o) Allow Specific
Enable Mail and Update
Other Settings
HTTP Proxy: stay empty
Connecting to Internet through a proxy is a good security practice
because it prevents malwares to communicate easily with their control
and command servers, but it is out of the scope of this guide.
SAVE
Network Interfaces Configuration
Go to Network | Interfaces
Click on the first interface and configure it as the management interface
Management interface
Description: management
DHCP
Autoconfigure IPv6
Other Settings
Disable Hardware Offloading
MTU: 1500
For a hardened repository, it is preferable to keep the default value
(1500) for the MTU, because using jumbo frame makes the network
configuration more complex to manage.
IP Addresses
Add the IP address of the management interface
APPLY
TEST CHANGES
When you are testing the new network settings, you have 60 seconds to confirm
that it works by clicking on SAVE CHANGES, otherwise the system automatically rolls back to the previous network configuration to avoid kicking you out of the network.
Data interface
Management interface
Description: data sharing
DHCP
Autoconfigure IPv6
Other Settings
Disable Hardware Offloading
MTU: 1500
IP Addresses
Add the IP address of the data sharing interface
APPLY
TEST CHANGES
SAVE CHANGES
Configure the user accounts
Setup root account
Go to Credentials | Local Users
Edit the root user
Fill the Email field
System notification are sent by email to the root user, so this
email address is very important.
If you wish to use SSH for management, fill also SSH Public Key
SSH is more convenient than the web shell interface to enter commands
that are missing from the web user interface.
Create a account for Veeam
Go to Credentials | Local Groups | Add
GID: 10000
Name: veeam
Permit Sudo
Samba Authentication
Allow Duplicated GIDs
SAVE
Go to Credentials | Local Users | Add
Full Name: Veeam Backup
Username: veeam
Password: use a very long and strong password
Password confirmation:
Email: stay empty
User ID and Groups
User ID: 10000
New Primary Group
Primary Group: veeam
Auxiliary group: stay empty
Directories and Permissions
Home Directory: /nonexistent
Home Directory Permission: clear all permissions, except user permissions
SSH Public Key: stay empty
Disable password: no
Shell: nologin
Lock User
Permit Sudo
Microsoft Account
Samba Authentication
SAVE
Configure SSH
Go to System Settings | Services | SSH and click on the pencil ()
Click ADVANCED SETTINGS
TCP Port: 22
Log in As Root with Password
Allow Password Authentication
Allow Kerberos Authentication
Allow TCP Port Forwarding
Bind Interfaces: use the management network interface
where 192.168.0.10 is the IP address of your desktop computer you use to manage the TrueNAS server.
SAVE
Toggle the running button to start the SSH service
but do not start automatically SSH
Do not start automatically SSH because we will disable the SSH service
later to harden the repository.
Configure the mail notification
Configuring the mail notification is very important, because it will
be the only way to know that happens (for example if a disk is dying)
after disabling the web management interface to harden the repository.
Edit mail notification
Click on the bell icon on the top right corner
Click on the gear icon
Select Email
Fill the web form according to your email provider
Send Test Mail
Check that you receive the testing email
SAVE
Create a dataset for Veeam
Go to System Settings | Shell (or connect with SSH)
zfs create tank1/veeam
zfs set org.freenas:description="veeam hardened repo" tank1/veeam
zfs set compression=off tank1/veeam
chown veeam:veeam /mnt/tank1/veeam
chmod 700 /mnt/tank1/veeam
Description of shell commands
Create a dataset name tank1/veeam
Set dataset description (“veeam hardened repo”)
Set compression level to off because Veeam backup are already compressed
Set ownership of user veeam and group veeam on directory /mnt/tank1/veeam
Set restrictive user permissions on /mnt/tank1/veeam
If you really following this guide from scratch, then the dataset tank1/veeam
is empty, then you can create an empty snapshot and lock it to prevent deleting by mistake the dataset from the web user interface or with the command zfs destroy
zfs snap tank1/veeam@LOCKED
zfs hold LOCKED tank1/veeam@LOCKED
Description of shell commands
Create a snapshot named LOCKED on tank1/veeam.
Hold a lock named LOCKED on the snapshot. Indeed the name of the snapshot and the name of the lock
can be different, but it is easier to use twice the same name.
More information about ZFS locked snapshot
To lock a snapshot use zfs hold LOCK_NAME SNAPSHOT_NAME
Snapshot can have multiple locks, each lock must have a different name
A locked snapshot cannot be deleted
To unlock a snapshot, use zfs release LOCK_NAME SNAPSHOT_NAME
To list the lock names of a particular snapshot, use zfs holds SNAPSHOT_NAME
A dataset with a locked snapshot cannot be deleted neither with the webui nor with the zfs destroy command, so it avoid human errors.
Configure ZFS periodic snapshots
Create 3 periodic (hourly, daily and weekly) ZFS snapshots to recover
the data if they are deleted or modified.
Hourly snapshots
Go to Data Protection | Periodic Snapshot Tasks
Datasettank1
Exclude: stay empty
Recursive
Snapshot lifetime: 1 day
Naming Schema: auto-%Y%m%d_%H%M-hourly
Schedule: Hourly (0 * * * * ) at the start of each hour
Begin: 00:00:00
End: 23:59:00
Allow Taking Empty Snapshots
Enabled
SAVE
It is easier to setup the periodic snapshot at the root dataset and
to enable recursive snapshot.
Daily snapshots
Go to Data Protection | Periodic Snapshot Tasks
Datasettank1
Exclude: stay empty
Recursive
Snapshot lifetime: 1 week
Naming Schema: auto-%Y%m%d_%H%M-daily
Schedule: Daily (0 0 * * * ) at 00:00 (12:00 AM)
Allow Taking Empty Snapshots
Enabled
SAVE
Weekly snapshots
Go to Data Protection | Periodic Snapshot Tasks
Datasettank1
Exclude: stay empty
Recursive
Snapshot lifetime: 1 month
Naming Schema: auto-%Y%m%d_%H%M-weekly
Schedule: Weekly (0 0 * * sun ) on Sundays at 00:00 (12:00 AM)
Allow Taking Empty Snapshots
Enabled
SAVE
If you have enough disk space, you can use longer retention time.
The longer the snapshot are kept, the better your safety is.
Configure Samba Service
Go to System Settings | Services | SMB and click on the pencil ()
Click ADVANCED SETTINGS
NetBIOS Name: strongbox (you can use any name here)
NetBIOS Alias: stay empty
Workgroup: WORKGROUP
Description: Hardened TrueNAS
Enable SMB1 support
NTLMv1 Auth
UNIX Charset: UTF-8
Log Level: Minimum
Use Syslog Only
Local Master
Enable Apple SMB2/3 Protocol Extensions
Administrators Group: stay empty
Guest Account: nobody
File Mask: 0600
Directory Mask: 0700
Bind IP Address: bind on the IP address of the data network interface
Auxiliary Parameters: stay empty
SAVE
Toggle the running button to start the SMB service
Start Automatically SMB
Configure Samba share for Veeam
Go to Shares | Windows (SMB) Shares | ADD
Click on ADVANCED OPTIONS
Basic
Path: /mnt/tank1/veeam
Name: veeam
Purpose: Multi-protocol (NFSv3/SMB) shares
Description: hardened veeam repository
Enabled
Access
Enable ACL
Export Read Only
Browseable to Network client
Allow guest access
Allow based shared enumeration
Host Allow: put the IP of the Veeam Software server here
For the credentials, use the veeam account creates on the hardened backup resporitory (see above)
Hardened the repository
To hardened the backup repository, just remove any possibility to
remotely destroy the ZFS snapshots.
Enable password for console access
Go to System Settings | Advanced | Console | Configure
Show Text Conosle wihout Password Prompt
SAVE
Disconnect IPMI
If your server has a IPMI interface, physically disconnect the network cable.
If a malware takes the control of your management computer,
it can use the IPMI interface to destroy your backups.
Be cautious and just disconnect the cable.
Check that NTP works as expected
Go to System Settings | General | NTP Servers
By default TrueNAS Scale comes with the following NTP servers
0.debian.pool.ntp.org
1.debian.pool.ntp.org
2.debian.pool.ntp.org
Open a shell
Go to System Settings | Shell
Enter the command ntpq -p
The output will look like
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntppub.darksky. 172.18.1.20 2 u 326 1024 377 11.447 +0.475 0.531
+ip139.ip-5-196- 145.238.203.14 2 u 208 1024 377 11.484 -0.249 0.279
+ns2.euskill.com 193.107.56.120 4 u 33 1024 377 22.541 +0.167 0.538
Do not worry if you have different remote hostnames or IP addresses
for NTP servers, it is normal because domain names of ntp.org
point to a pool of servers.
Configure HTTPS
Create an Internal Certificat Authority
Go to Credentials | Certificates | Certificates Authorities | Add
Letting SSH service running is dangerous: if someone steals your SSH private
key and passphrase, he can remotely connect to the backup repository and destroy the data.
Check SSH does not automatically start
Go to System Settings | Services
Check that SSH does not start automatically
Stop SSH service on boot
Add a startup script to stop the SSH service in case it has been enabled
by mistake
Go to System Settings | Advanced | Init/Shutdown Scripts | Add
Description: Stop SSH at startup
Type: Command
Command: /usr/bin/systemctl stop ssh
When: Post Init
Enabled
Timeout: 10
SAVE
Stop SSH service at midnight
To avoid the SSH service stays enabled forever, stop it automatically
at midnight
Go to System Settings | Advanded | Cron Job | Add
Description: stop ssh at midnight
Command: /usr/bin/systemctl stop ssh
Run as user: root
Schedule: *daily (0 0 * * ) at 00:00 (12:AM)
hide standard output
hide standard error
Enabled
SAVE
Disable Web User Interface for normal operations
Stop WebUI on boot
Go to System Settings | Advanced | Init/Shutdown Scripts | Add
Description: Stop webUI at startup
Type: Command
Command: /usr/bin/systemctl stop nginx
When: Post Init
Enabled
Timeout: 10
SAVE
Stop WebUI at midnight
To avoid the WebUI stays enabled forever, stop it automatically
at midnight
Go to System Settings | Advanded | Cron Job | Add
Description: stop webUI at midnight
Command: /usr/bin/systemctl stop nginx
Run as user: root
Schedule: *daily (0 0 * * ) at 00:00 (12:AM)
hide standard output
hide standard error
Enabled
SAVE
Change the message of the day
Go to System Settings | Advanced | Console | Configure
MOTD Banner: Hardened repository without remote management, to enable temporary the web interface type “systemctl start nginx”
SAVE
Backup the server configuration
Go to System Settings | General | Manage Configuration
DOWNLOAD FILE
Test the setup
Reboot the server to check that the web interface is disabled when the
computer boots
Daily management
You can temporary enable the web interface to change the configuration
Enable the web interface
Connect to the console and type:
systemctl start nginx
If you forgot to stop the webUI when you have finished your work,
the cron job will do if for you at midnight
Disable the web interface
To immediately disable the web interface connect to the console and type:
systemctl stop nginx
Recover data after an attack
If your Veeam backup files have been altered it means that the
password to access the SAMBA share has been compromised, so you have
to change it immediately.
Change the password for the veeam account
Go to Credentials | Local Users | veeam
Unroll the options, click EDIT
Change Password
SAVE
Lock the snapshot to preserve the data
It may take few day to audit your system after an attack, therefore it
is a good idea to lock all snapshots to avoid they are automatically
deleted when they reached their end of life.
Run the following command in the shell
for s in `zfs list -r -t snap -H -o name tank1/veeam`; do zfs hold LOCKED $s ; done
Clone the healthy snapshot
Go to Storage | Snapshots
Pick the healthy snapshot
Unroll the option
Click CLONE TO NEW DATASET
Name: tank1/veeam-snap-clone
SAVE
Create a new Samba Share to export the cloned dataset
Use the above instruction to share tank1/veeam-snap-clone with SAMBA.
Reinstall Veeam on a new server
Connect to the new SAMBA share
Restore your data.
The guide for a hardened repository is finished
Enjoy your hardened repository, and sleep more peacefully at night.
12.2 - Spotlight Support on a SCALE SMB Share
This article describes how to configure a SCALE SMB (Samba) share to support the Spotlight search API
This is a fast spun up tutorial to demonstrate how to have a Samba share on TrueNAS SCALE (in short: TNS) supporting macOS' Spotlight search API. My goal was to have my scans saved inside a network folder being indexed and spotlight enabled. So I write this tutorial for my “scans” share.
For having this to work we will install an ElasticSearch engine, a script called fscrawler and tesseract libraries and will also show you how you could configure each part of the toolchain to make this work. We will heavily rely on docker images, as I don’t want to spin up an extra VM within my VM ;)
ElasticSearch
or in short within this tutorial only “ES” (Elastic LINK) is an engine that enables you to process searches in an “elastic” way. That means after querying it the search hits will be returned immediately and not after the search was completed. So results will shown may increase after some time, depending on the database ES utilizes. We will use ES 8.4.3 with our docker image
FS Crawler
is the script that builds the index in the ES database. It can be optimized to index specific values of your files and folders, according to your needs. For example if you prefer to search for titles it may be better for you to not have a fulltext search enabled. Someone else likes to keep an eye only on the size of the files and wants to search for file and folder size only. If you need more details, feel free to dive deeper into this topic with the fscrawler documentation (FS Crawler LINK). We will use FS Crawler 2.10-SNAPSHOT.
FS Crawler alternative: fs2es-indexer
Tesserract
is an ocr engine. ocr is the abbreviation for “optical character recognition”. fscrawler can be configured to hand over picture and pdf files to an ocr engine to have it searching for characters. This enables fscrawler not only to build an index of filenames and metadata but also for written content within binary files. Because ocr works with an engine that compares objects found in an image, for example, with existing similar objects from installed fonts, it needs a lot of space for its Docker image.
optional: kibana
is a tool to manually query ES via webUI.
fancy bread crumbs
If I use the stylish symbols “-” and “>” in combination “->” it means I want you to click on something, enter some text or change a value or entry somewhere.
Prerequisites
As this tutorial will not cover the basic installation of a TNS I assume you have
TNS already running
at least one storage pool
already configured a place for additional Apps
let’s get it on
Install ES
Now, to get our hands dirty, we install ES as a docker image. Sadly neither TreuNAS SCALE offical
repo nor the elastic one provides a docker we can use. So I googled all night and found this beautiful blog (Heavy Setup LINK).
To sum up what we need do:
-> Add a new catalog (TrueCHARTS, https://github.com/truecharts/charts.git)
-> leave everything on default and
-> save.
Now you could grab yourself a cup of coffee as this process takes some time (it took about half an hour with my setup).
After the charts (i.e. Community Apps) are indexed, you will find A LOT of additional apps ready to install. But not our most wanted one.
-> So get to the catalog view again
-> go to the settings of the new imported catalog and edit it
-> select “Incubator”
-> switch to apps
-> search for “tubearchivist-es”
-> install it! (you may follow the instructions from the blog linked above (Heavy Setup LINK))
If you now click on open you should be asked for user:password (elastic:verysecret) and then get the presented something similar to this:
You might change the user name and password (elastic:verysecret), you find the how to here (LINK)
install FS Crawler (and OCR)
Luckily there is a docker image that already combines fscrawler and ocr:
dadoonet/fscrawler
For those who don’t want to use ocr and feel 1.2GB+ is too heavy for their docker space can deploy a docker image without ocr:
dadoonet/fscrawler:noocr
As it is offered by hub.docker.com you can simply deploy it via one of the commands above. Don’t forget to add access to your directory(/ies) you want to index.
We will configure everything else from the shell TNS has built in, so this is all we have to do here.
After that start your docker image. Open a shell and double check your files accessibility. I have mounted my scans folder under /media/scans, so I do a
ls -lah /media/scans/
and get something like this:
Now we will need to create an initial fscrawler configuration, so execute the following command (you may adjust the name of the crawler instance, IMPORTANT! Only use lowercase characters, as upper case is not allowed!)
bin/fscrawler instancename
That creates a yaml config file under:
/root/.fscrawler/instancename/_settings.yaml
We want to edit this and so we need an editor. So let’s install one:
apt-get update | apt-get install nano
and now edit the file:
nano /root/.fscrawler/instancename/_settings.yaml
I adjusted everything to my needs, so yours will differ…
Most important are the settings under elasticsearch as this will impact the connection to the ES docker.
Save and exit via ‘ctrl + x’ and ‘y’. Start fscrawler again with the above command. It should immediately start scanning your directory.
Samba configuration
We need to tell Samba, that it is now capable to utilize an elasticsearch engine.
SMB server preparation
We do this in the advanced settings of the samba server:
-> System Settings -> Services -> SMB settings (pencil) -> Advanced Options -> Auxiliary Parameters:
spotlight backend = elasticsearch
elasticsearch:address = [ip or dn of your SCALE]
elasticsearch:port = 9200
SMB share preparation
-> Shares -> [select the share you want to enable spotlight on] -> Advanced Options -> Auxiliary Parameters:
spotlight = yes
Final words
Now you’re ready to go. After a couple of minutes my spotlight search was working and ES responses were shown in my finder.
As I prefer a TL;DR approach there are still a lot of things to optimize within this How To that I or maybe someone else might add.
Definitely open todos:
autostart fscrawler script when docker image was started