When the container starts chown should only run over the files in /config that don't have matching UID/GIDs
Desired Behavior
On startup the container should use find to filter through all the directories to find files and directories which do not have the correct user and group set. It should then use the exec flag to set ownership on these specific files and directories.
Doing a quick search I think something similar to this SO answer could work. But I haven't tested it.
Current Behavior
Currently we change ownership of all files regardless of ownership.
On COW systems (such as ZFS) where snapshots (for backups) exist this incurs a significant startup penalty on HDDs and unnecessary writes on SSDs as it triggers copy creation.
Startup time quickly becomes proportional to library/config size as metadata (such as thumbnails) get stored into /config by default too.
Alternatives Considered
Note: this is unrelated to #62 (and the subsequent discussion). From a user POV the observable effects should be the same.
I'm happy to prototype / throw up a PR with the required changed, but I'd like to get the go-ahead before committing time to this.
When the container starts
chown
should only run over the files in/config
that don't have matching UID/GIDsDesired Behavior
On startup the container should use
find
to filter through all the directories to find files and directories which do not have the correct user and group set. It should then use the exec flag to set ownership on these specific files and directories.Doing a quick search I think something similar to this SO answer could work. But I haven't tested it.
Current Behavior
Currently we change ownership of all files regardless of ownership. On COW systems (such as ZFS) where snapshots (for backups) exist this incurs a significant startup penalty on HDDs and unnecessary writes on SSDs as it triggers copy creation.
Startup time quickly becomes proportional to library/config size as metadata (such as thumbnails) get stored into
/config
by default too.Alternatives Considered
Note: this is unrelated to #62 (and the subsequent discussion). From a user POV the observable effects should be the same.
I'm happy to prototype / throw up a PR with the required changed, but I'd like to get the go-ahead before committing time to this.