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

Setting Up Data Sharing

  4 minute read.

Last Modified 2022-07-14 16:34 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
  • 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 Storage > Pools

    a. Go to Storage > Pools and click on the and click Add Dataset.

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

    c. Click Save.

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

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

    LocalUserAddUser

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

    LocalUserAddUser2

    c. Click Save.

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

    a. Go to Storage > Pools and click on the for the dataset, and select View Permissions. The View Permissions widget for the selected dataset displays on the right side of the screen.

    ViewDatasetPermissionsWidgett

    b. Click on the edit edit icon to display the Edit ACL screen.

    EditACLScreen

    c. Select Use ACL Preset. The Select a preset ACL dialog displays. Select NFS4_OPEN from the dropdown list and then click Continue.

    SelectPresetACLNFS4OPEN

    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. Go to Storage > Pools

    a. Go to Storage > Pools and click on the and click Add Dataset.

    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