Sam Hooke

The Important Files: Part 3

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”:

  1. In the tree view select Storage → Volumes → /mnt/storage → Create Dataset.
  2. Specify the share name (e.g. media) and set the share type to Windows.
  3. Select “Add Dataset”.
  4. In the tree view select Storage → Volumes → /mnt/storage → Change Permissions.
  5. 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 §

  1. In the tree view select Sharing → Windows (SMB) Shares → Add Windows (SMB) Share.
  2. Select /mnt/storage/media as the path, and media as the name, then “OK”.
  3. 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.

  1. In Windows Explorer, open “Map Network Drive”.
  2. 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”.
  3. At the prompt, enter the username and password for the user from earlier.
  4. 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.

  1. In the tree view select Sharing → Unix (NFS) Shares → Add Unix (NFS) Share
  2. Select /mnt/storage/media as the path, then “OK”.
  3. Go to the services page and ensure NFS is running (and enabled for start on boot).

Connect client to Linux share §

  1. Install nfs-utils.
pacman -S nfs-utils
  1. Verify that we can see the share.
showmount -e 192.168.0.2
  1. Create the folder we will mount to.
mkdir /mnt/media
  1. Open /etc/fstab for editing and append the following:
# /mnt/media
192.168.0.2:/mnt/storage/media   /mnt/media  nfs  noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0
  1. Restart the autoload service for this mount.
systemctl restart mnt-media.automount
  1. The media dataset is now available at /mnt/media.

See all notes.

← Previous Note: The Important Files: Part 2
Next Note: Freeing up disk space on Arch Linux →