The Important Files: Part 3
All notes in this series:
In these notes I create a dataset in FreeNAS, then set up the Windows (SMB) and Linux (NFS) shares.
To create the user and Windows shares, I was helped by this guide.
Create user §
Using the tree view at the left of the FreeNAS UI, select Account → Users → Add User. Specify the following:
- Username
- Enable “Create a new primary group for the user”
- Full name
- Password
Create dataset §
Assuming you already have an existing volume named “storage”:
- In the tree view select Storage → Volumes → /mnt/storage → Create Dataset.
- Specify the share name (e.g. media) and set the share type to Windows.
- Select “Add Dataset”.
- In the tree view select Storage → Volumes → /mnt/storage → Change Permissions.
- Set the user and group to the user created earlier, and set the permission type to Windows, then select “Change” to apply.
Set up Windows share §
- In the tree view select Sharing → Windows (SMB) Shares → Add Windows (SMB) Share.
- Select /mnt/storage/media as the path, and media as the name, then “OK”.
- Go to the services page and ensure SMB is running (and enabled for start on boot).
Connect client to Windows share §
The following assumes a Windows 10 client.
- In Windows Explorer, open “Map Network Drive”.
- Set drive letter to M:, and folder to “\192.168.0.2\media”, and ensure “Reconnect at sign-in” and “Connect using different credentials” are selected, then press “Finish”.
- At the prompt, enter the username and password for the user from earlier.
- The media dataset is now available on the M: drive, and will persist after reboot.
Set up Linux share §
To create the Linux share I was helped by the Arch Linux Wiki page on NFS.
The following assumes an Arch Linux client.
- In the tree view select Sharing → Unix (NFS) Shares → Add Unix (NFS) Share
- Select /mnt/storage/media as the path, then “OK”.
- Go to the services page and ensure NFS is running (and enabled for start on boot).
Connect client to Linux share §
- Install
nfs-utils
.
- Verify that we can see the share.
- Create the folder we will mount to.
- Open
/etc/fstab
for editing and append the following:
- Restart the autoload service for this mount.
- The media dataset is now available at
/mnt/media
.