I’m hoping someone has a workaround or advice for disabling atomic writes in Home Assistant, or at least handling them differently.
My setup:
- Home Assistant runs in Docker.
- All my config files (
configuration.yaml
,automations.yaml
, etc.) are bind-mounted into the container from my git repo, alongside mydocker-compose.yml
. - Every 15 minutes, a cron job on the host commits and pushes any config changes to git, so my YAML files are always backed up and versioned.
Why do it this way?
- I can edit all my config files directly on the host using my preferred editor. No problem there.
- Version control is simple: my repo stays in sync with my Home Assistant instance.
The problem:
When I try to save config changes using any of the built-in Home Assistant UI editors (like the Automations or Scripts editors), saving fails. The log shows an error like:
OSError: [Errno 16] Resource busy: ‘/config/tmpabc123’ → ‘/config/scripts.yaml’
- This happens because Home Assistant writes config changes using an atomic write pattern (write temp file, then rename/move it over the original).
- This pattern doesn’t work on individually bind-mounted files, because Docker treats the target as a mount point and refuses to overwrite it.
- Editing on the host still works fine—but the UI editors are basically useless unless I rework my whole mount strategy.
I get the risk of corruption if something goes wrong mid-save, but I accept that risk because I’m always backed up to git anyway.
Has anyone found a workaround for this that still allows using both host editing and the Home Assistant UI editors with bind-mounted config files?