Setting Up Data Sharing
5 minute read.
Last Modified 2022-12-01 14:39 -0500After 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.
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
To set up SMB sharing:
-
Create a dataset with Share Type set to SMB: Go to Datasets and click on the Add Dataset button.
The Add Dataset menu displays on the right side of the screen.
Enter a Parent path and Name for the SMB share.
Select the Share Type as SMB from the dropdown list.
Click Save.
-
Create the TrueNAS user accounts with Samba Authentication set.
a. Go to Credentials > Local Users and click Add to create users.
b. Enter the values in each required field, and then verify the checkmark for Samba Authentication exists.
c. Click Save.
-
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.
Click the Edit button to edit the permissions.
b. Select Use ACL Preset. The Select a preset ACL dialog displays. Select NFS4_OPEN from the dropdown list.
c. Click Continue.
d. Click Save Access Control List.
-
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.
b. Enter a name for the share.
c. Click Save.
-
Turn the SMB service on. Click the for the share and select Turn On Service from the Sharing screen.
-
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.
c. Begin browsing the dataset.
To set up NFS sharing:
-
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.
-
Add additional packages like
nfs-common
to any client systems that require them. -
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.
b. Click Save.
-
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)
-
Make a local directory for the NFS mount. Enter command
sudo mkdir nfstemp/
tmoore@ChimaeraPrime:~$ sudo mkdir nfstemp/
-
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/
-
From here,
cd
into the local directory and view or modify the files as needed.
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
- Creating Storage Pools
- Adding Network Settings
- Installing SCALE
- Console Setup Menu Configuration
- Migrating from TrueNAS CORE
- Importing Data
- Setting Up Storage
- First Time Login
- Backing Up TrueNAS