TrueNAS SCALETrueNAS SCALE Version Documentation
This content follows the TrueNAS SCALE 23.10 (Cobia) releases. Use the Product and Version selectors above to view content specific to different TrueNAS software or major version.

Setting Up Data Sharing

  6 minute read.

Last Modified 2024-03-19 08:38 EDT

After setting up storage on your TrueNAS, it is time to begin sharing data! There are several sharing solutions available on SCALE, but in this article we discuss the most common.

Sharing Data Methods

TrueNAS SCALE provides four types of sharing methods, but this article only discusses three:

  • SMB for Windows shares
  • NFS for Unix-like shares
  • ISCSi block shares

For more information on TrueNAS SCALE shares, see the Shares tutorials.

Regardless of what type of share you create, the first step is to create a dataset to use for the share.

Creating a Share Dataset

The share creation process starts with creating a dataset to use for the share.

To create a dataset using the default settings, go to Datasets. Default settings include the settings datasets inherit from the parent dataset.

Select a dataset (root, parent, or child), then click Add Dataset.

Enter a value in Name.

Select either Sensitive or Insensitive from the Case Sensitivity dropdown.

Select the Share Type, then click Save. Options are Generic, Multiprotocol, SMB, or Apps.

You can create datasets optimized for SMB shares or with customized settings for your dataset use cases.

If you plan to deploy container applications, the system automatically creates the ix-applications dataset, but it is not used for application data storage. If you want to store data by application, create the dataset first, then deploy your application. When creating a dataset for an application, select App as the Share Type setting. This optimizes the dataset for use by an application.

Review the Share Type and Case Sensitivity options on the configuration screen before clicking Save. You cannot change these or the Name setting after clicking Save.

Setting up SMB Shares for Windows

For more information on adding SMB shares, see Adding SMB Shares.

To set up a basic SMB share:

  1. Create a dataset with Share Type set to SMB.

  2. Create the TrueNAS user accounts with Samba Authentication set.

    a. Go to Credentials > Local Users and click Add to create a user.

    AddUserIdentificationSettings

    AddUserUserIDAndGroupsSettings

    b. Enter the values in each required field, and then verify Samba Authentication is selected. For more information on the fields and adding users, see Creating User Accounts.

    AddUserDirPermsAuthSettings

    c. Click Save.

  3. Edit the SMB share dataset permissions to set the Select an ACL Preset to Open.

    a. Go to Datasets. Select the name of the dataset for the SMB share you created. Scroll down to the Permissions widget on the right side of the screen.

    EditDatasetSMBPermissions

    Click Edit to open the ACL Editor screen and edit the permissions.

    EditACLSMBShare1SCALE

    b. Select Use Preset. The Select a preset ACL dialog displays. Select NFS4_OPEN from the dropdown list.

    UseACLPresetSCALE

    c. Click Continue.

    d. Click Save Access Control List.

    For more information on Access Control Lists and editing permissions, see Setting Up Permissions.

  4. Create the new SMB share.

    a. Click Shares on the main navigation panel, then click Add on the Windows (SMB) Shares widget to open the Add SMB configuration screen.

    b. Select the dataset you created for the share in the Path field. You can click on the to the left of mnt, and then at the pool to expand the options, and then click on the dataset to populate the field with the full path.

    AddSMBPath

    c. Enter a name for the share.

    d. Click Save.

  5. Turn the SMB service on. If the dialog to enable the service does not open, click the for the share and select Turn On Service.

    SMBShareOptions

    As of SCALE 22.12 (Bluefin) and later, TrueNAS does not support SMB client operating systems that are labeled by their vendor as End of Life or End of Support. This means MS-DOS (including Windows 98) clients, among others, cannot connect to TrueNAS SCALE SMB servers.

    The upstream Samba project that TrueNAS uses for SMB features notes in the 4.11 release that the SMB1 protocol is deprecated and warns portions of the protocol might be further removed in future releases. Administrators should work to phase out any clients using the SMB1 protocol from their environments.

  6. Connect to the share. On a Windows 10 system, open the File Browsers and then:

    a. In the navigation bar, enter \\ and the TrueNAS system name or IP address. A login credentials dialog displays.

    b. Enter the TrueNAS user account credentials you created on the TrueNAS system.

    FileExplorerEnterSMBCredentials

    c. Begin browsing the dataset.

Setting up NFS for Unix-Like Shares

For more information on creating NFS shares, see Adding NFS Shares.

To set up NFS sharing:

  1. Create a dataset with Share Type set to Generic.

  2. Add additional packages like nfs-common to any client systems that require them.

  3. Create the NFS share.

    a. Select Shares on the main navigation panel, then click Add on the UNIX (NFS) Share Targets to open the Add NFS configuration screen.

    b. Select the dataset you created for the share in the Path field. You can click on the to the left of mnt, and then at the pool to expand the options, and then click on the dataset to populate the field with the full path.

    AddNFSPath

    c. Click Save.

  4. Access the dataset. On a Unix-like system, open a command line and enter command showmount -e {IPADDRESS} where {IPADDRESS} is your TrueNAS system IP address.

    tmoore@ChimaeraPrime:~$ showmount -e 10.238.15.194
    Export list for 10.238.15.194:
    /mnt/pool1/testds (everyone)
    
  5. Make a local directory for the NFS mount. Enter command sudo mkdir nfstemp/

    tmoore@ChimaeraPrime:~$ sudo mkdir nfstemp/
    
  6. Mount the shared directory. Enter command sudo mount -t nfs {IPADDRESS:dataset path} where {IPADDRESS} is your system IP address and {:dataset path} is the full path displayed in step 3.b. above.

    tmoore@ChimaeraPrime:~$ sudo mount -t nfs 10.238.15.194:/mnt/pool1/testds nfstemp/
    
  7. From here, cd into the local directory and view or modify the files as needed.

Setting up an iSCSI Block Share

Setting up block sharing is a complicated scenario that requires detailed configuration steps and knowledge of your network environment. A simple configuration is beyond the scope of this getting started guide, but detailed articles are available in the SCALE Tutorials section.

With simple sharing now set up, you can back up your configuration and set up data backup.

Related Configuration Articles

Related Shares Articles