Get a Quote     (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

Setting Up Data Sharing

  5 minute read.

Last Modified 2022-12-01 14:39 EST

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.

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.

Sharing Data Methods

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

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

Setting UP SMB for Windows

To set up SMB sharing:

  1. Create a dataset with Share Type set to SMB: Go to Datasets and click on the Add Dataset button.

    AddDatasetSCALE

    The Add Dataset menu displays on the right side of the screen.

    Enter a Parent path and Name for the SMB share.

    AddDatasetSCALEMenu1

    Select the Share Type as SMB from the dropdown list.

    AddDatasetSCALEMenu2

    Click Save.

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

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

    AddUserIdentificationSettings

    AddUserUserIDAndGroupsSettings

    b. Enter the values in each required field, and then verify the checkmark for Samba Authentication exists.

    AddUserDirPermsAuthSettings

    c. Click Save.

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

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

    EditDatasetSMBPermissions

    Click the Edit button to edit the permissions.

    EditACLSMBShare1SCALE

    b. Select Use ACL 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.

  4. Create the new SMB share. Go to Shares > Windows (SMB) Shares and click Add.

    a. 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

    b. Enter a name for the share.

    c. Click Save.

  5. Turn the SMB service on. Click the for the share and select Turn On Service from the Sharing screen.

    SMBShareOptions

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

    a. In the navigation bar, enter \\ and the TruNAS system name or IP address. A login or 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 Share

To set up NFS sharing:

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

    a. Go to Datasets and click on the Add Dataset button.

    b. Enter a name and select Generic in the Share Type field.

    c. Click Save.

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

  3. Create the NFS share. Go to Shares > UNIX (NFS) Share Targets and click Add. The Add NFS configuration form displays.

    a. 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

    b. 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 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.a. 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 scop of this getting started guide, but detailed articles are available in the UI Reference section under Shares.

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

Related Content

Related Shares Articles