Skip to content

NAS

If you have more than 1 share you need to mount, see the Additional NAS docs below after doing this configuration.

The main mount point is defined in hms_docker_mount_path in file inventory/group_vars/all/main.yml

The main NAS share type is defined in hms_docker_media_share_type in file inventory/group_vars/all/main.yml

Required settings for the hms_docker_media_share_type of nfs:

inventory/group_vars/all/nas_nfs.yml
nas_client_remote_nfs_path: # the path to the network share (e.g. `nas.example.com:/share`)
nas_client_nfs_opt: # the options for the network share (Google can help you find the correct options)

The CIFS credentials will be stored in plaintext within the hms_docker_data_path folder, but will be owned by root:root with 0600 permissions, so only those with root or sudo access can read

Required settings for the hms_docker_media_share_type of cifs:

inventory/group_vars/all/nas_cifs.yml
nas_client_remote_cifs_path: # the path to the network share (e.g. `//nas.example.com/share`)
nas_client_cifs_username: # the username of the network share
nas_client_cifs_password: # the password of the network share
nas_client_cifs_opts: # the options for the network share (Google can help you find the correct options)

If you have more than 1 network share you want to mount, set nas_client_use_additional_paths in inventory/group_vars/all/nas_additional.yml to yes

Use the below variables to create a list of mappings in the nas_client_remote_additional_paths variable in inventory/group_vars/all/nas_additional.yml.

Confused? See the Example below, a version of it already exists in inventory/group_vars/all/nas_additional.yml so just modify that.

  • name: Friendly name of the path
  • local_mount_path: Local path to the folder
  • create_library_folders: If the library folder structure should be created (default: false)
  • type: Type of path, valid: local
  • name: Friendly name of the path
  • remote_path: Remote path to the folder
  • local_mount_path: Local path to where it will be mounted
  • create_library_folders: If the library folder structure should be created (default: false)
  • type: Type of path, valid: nfs
  • nfs_opts: NFS options, default: defaults
  • name: Friendly name of the path
  • remote_path: Remote path to the folder
  • local_mount_path: Local path to where it will be mounted
  • create_library_folders: If the library folder structure should be created (default: false)
  • type: Type of path, valid: cifs
  • cifs_username: CIFS username, default: ""
  • cifs_password: CIFS password, default: ""
  • cifs_opts: CIFS options, default: rw,soft

Below is an example configuration that defines both an NFS mount (the first) and a CIFS mount (the second) that also uses the default mounting location defined in the variable hms_docker_mount_path in file inventory/group_vars/all/main.yml

inventory/group_vars/all/nas_additional.yml
nas_client_remote_additional_paths:
[
{
name: "Media 4K",
remote_path: "192.168.1.5:/Media_4K",
local_mount_path: "{{ hms_docker_mount_path }}/Media_4k",
create_library_folders: true,
type: nfs,
nfs_opts: "rw,defaults"
},
{
name: "Media NAS 3",
remote_path: "//nas.example.com/media_3",
local_mount_path: "{{ hms_docker_mount_path }}/custom_path_3",
create_library_folders: false,
type: cifs,
cifs_username: "insecureusername",
cifs_password: "veryinsecurepassword",
cifs_opts: "rw,soft",
},
]