The Syncthing curated app script gets the app installed and appearing to work properly. The user can create and share folders, but under the hood it this configuration will put data in unexpected locations and / or cause permanent data loss.
In TrueNAS you can convert the installed application to YAML. Inspecting this shows several issues that may lead to incorrect behavior and / or data loss
Problems
/var/syncthing is mapped to ApplicationsPerformance/syncthing/config
- In the app,
/var/syncthing is prompted as the 'default' location, and a shortcut to this folder is provided (~/). If the user creates ~/MyAwesomeFolder, then this will be created in the ApplicationsPerformance/syncthing/config dataset
-
HexOS locations are mapped to directories in the container. While this looks like a good idea at first, it is actually a really bad idea and will lead to data loss
- If the user gets this wrong, or assumes that creating
/sync/MyAwesomeFolder is valid, a shared folder will be created. Any data put into this folder by a remote computer WILL be lost when the container / server is rebooted.
- The user has manually setup and has no way of knowing that
/sync/Documents maps to maps to the HexOS Documents location
-
There are duplicate bindings that may cause data in shared folders to end up in the wrong TrueNAS data set
Music location is bound to /sync/Music and /sync/Shows
Photos location is bound to /sync/Media and /sync/Photos
Videos location is bound to /sync/Movies and /sync/Videos
Proposed Solution
- Modify the script so that there is a
Sync dataset for syncthing shared folders, bound to /var/syncthing
- The config dataset will still be mapped into
/var/syncthing/config
- Bind the HexOS Locations (Documents / Photos / Videos / etc) to
/var/syncthing/{location}
- Modify the syncthing config.xml to share these folders by default
- If this isn't possible, provide the user with a list of shared folders they should create when they are setting up the app
The Syncthing curated app script gets the app installed and appearing to work properly. The user can create and share folders, but under the hood it this configuration will put data in unexpected locations and / or cause permanent data loss.
In TrueNAS you can convert the installed application to YAML. Inspecting this shows several issues that may lead to incorrect behavior and / or data loss
Problems
/var/syncthingis mapped toApplicationsPerformance/syncthing/config/var/syncthingis prompted as the 'default' location, and a shortcut to this folder is provided (~/). If the user creates~/MyAwesomeFolder, then this will be created in theApplicationsPerformance/syncthing/configdatasetHexOS locations are mapped to directories in the container. While this looks like a good idea at first, it is actually a really bad idea and will lead to data loss
/sync/MyAwesomeFolderis valid, a shared folder will be created. Any data put into this folder by a remote computer WILL be lost when the container / server is rebooted./sync/Documentsmaps to maps to the HexOS Documents locationThere are duplicate bindings that may cause data in shared folders to end up in the wrong TrueNAS data set
Musiclocation is bound to/sync/Musicand/sync/ShowsPhotoslocation is bound to/sync/Mediaand/sync/PhotosVideoslocation is bound to/sync/Moviesand/sync/VideosProposed Solution
Syncdataset for syncthing shared folders, bound to/var/syncthing/var/syncthing/config/var/syncthing/{location}