Setting Up Data Sharing
4 minute read.
Last Modified 2022-07-14 16:34 EDTAfter 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.
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 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.
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 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.
b. Click on the
edit icon to display the Edit ACL screen.c. Select Use ACL Preset. The Select a preset ACL dialog displays. Select NFS4_OPEN from the dropdown list and then 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. 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.
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
- Adding Network Settings
- Installing SCALE
- Console Setup Menu Configuration
- Migrating from TrueNAS CORE
- Setting Up Storage
- Creating Storage Pools
- Importing Storage Pools
- First Time Login
- Backing Up TrueNAS