This guide explains how to setup a remote distribution point using FreeNAS as the SMB server and storage location for your images.
FreeNAS SMB Share
This example uses a ZFS volume named storage and a dataset named cd_images. Make any changes to match your environment.
- Select Account -> Groups -> Add Group from the left navigation menu
- Enter cdsharewriters for the group name and click ok
- Select Account -> Users -> Add User from the left menu
- Enter cd_share_rw for the username
- Deselect Create a new primary group
- Change the primary group to cdsharewriters
- Fill in a full name and password – Remember the password, you will need it later
- Create another user called cd_share_ro this time leave the default primary group settings as is – Remember the password, you will need it later
- Create a new ZFS Dataset named cd_images on the storage volume. I would disable compression and dedup but I’ll leave that up to you, Also ensure it has enough space to hold your images.
- Open the FreeNAS Shell from the left navigation menu
cd /mnt/storage/cd_images
mkdir images
mkdir resources
exit
- Select Storage from the top menu and select the cd_images dataset
- Select Change Permissions
- Change Owner (group): to cdsharewriters
- Check all mode checkboxes except Other Write
- Check Set permission recursively
- Click Change
- Select Sharing from the left menu and select Windows Shares -> Add Windows Share
- Enter cd_share for the name
- For the path enter
/mnt/storage/cd_images
- Click Advanced Mode and paste the following in Auxiliary Parameters
valid users = @cdsharewriters, cd_share_ro create mask = 02775 directory mask = 02775 guest ok = no writable = yes browsable = yes read list = @cdsharewriters, cd_share_ro write list = @cdsharewriters force create mode = 02775 force directory mode = 02775 force group = +cdsharewriters
- Click Ok
That’s all for the FreeNAS side, to setup CloneDeploy to use the share, follow the guide for changing the image storage location.