core icon indicating copy to clipboard operation
core copied to clipboard

Cannot mount backups because it is not empty

Open michaelsleen opened this issue 2 years ago • 12 comments

The problem

Since updating to Home Assistant Core 10.3 and Supervisor 11.0, I am unable to perform a backup to a remote NAS due to the error "Failed to to call /mounts/Backups - Cannot mount Backups at /data/mounts/Backups because it is not empty."

What version of Home Assistant Core has the issue?

core-2023.10.3

What was the last working version of Home Assistant Core?

core-2023.10.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Assistant Supervisor

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hassio/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:138
Integration: Home Assistant Supervisor ([documentation](https://www.home-assistant.io/integrations/hassio), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+hassio%22))
First occurred: 6:17:28 AM (8 occurrences)
Last logged: 2:09:31 PM

Failed to to call /mounts/Backups/reload - Cannot mount Backups at /data/mounts/Backups because it is not empty
Failed to to call /mounts/Backups - Cannot mount Backups at /data/mounts/Backups because it is not empty
Failed to to call /ingress/validate_session -

Additional information

Screen Shot 2023-10-14 at 2 09 22 PM Screen Shot 2023-10-14 at 2 09 37 PM Screen Shot 2023-10-14 at 2 10 00 PM

michaelsleen avatar Oct 14 '23 18:10 michaelsleen

Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of hassio can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign hassio Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


hassio documentation hassio source (message by IssueLinks)

home-assistant[bot] avatar Oct 14 '23 18:10 home-assistant[bot]

Have similar issue when HomeAssistant core is starting after upgrade to HassOS 11.0 and Add-on "Advanced SSH & Web Terminal" to version 15.1.0. Need to manually repair the connection for Backup after every core restart. Repair always fixes the "Repair message" until next core restart, but the backup folder doesn't show existing files/backups & new Backups can't be created. When I try to re-map the folder manually via Settings/System/Storage I receive the following error message: "Cannot mount DS_HASSIO_Backup at XXXXX because it is not empty"

Samba server is Synology DS218 with versions min.=SMB1 max.=SMB3

blackie333 avatar Oct 16 '23 06:10 blackie333

My issue was related to https://github.com/home-assistant/supervisor/issues/4358 Fixed via workaround published there.

blackie333 avatar Oct 17 '23 07:10 blackie333

My issue was related to home-assistant/supervisor#4358 Fixed via workaround published there.

@blackie333 Which workaround did you use? I tried the workaround listed here: https://github.com/home-assistant/supervisor/issues/4358#issuecomment-1624160038. However, I was unable to find the /data/mounts folder after running the command.

michaelsleen avatar Oct 17 '23 23:10 michaelsleen

My issue was related to home-assistant/supervisor#4358 Fixed via workaround published there.

@blackie333 Which workaround did you use? I tried the workaround listed here: home-assistant/supervisor#4358 (comment). However, I was unable to find the /data/mounts folder after running the command.

If you're running HA OS, you can't see the offending mount point and folder structure if you are logged in via SSH or browsing the filesystem using web UI plugins, even terminal or file explorer plugins, because HA runs as a docker container and you can't easily escape the container from inside it.

Instead, access the console - not through SSH, but the actual physical console or hypervisor console if running as a VM - and type login at the command line. If your command line reads # you are probably on the right track.

Once you are root at the VM level, follow the instructions in https://github.com/home-assistant/supervisor/issues/4358#issuecomment-1622871559 and see if that helps. It worked for me running HA OS on a Proxmox VM.

Edit: This will happen again if HA attempts a backup while the target mount point is unavailable for any reason, so once you find something that works, keep that info handy until a bug fix gets pushed to detect this.

dbensmith avatar Oct 21 '23 04:10 dbensmith

This reoccurs within a few days of fixing it. It's a bit of a pain because I have HAOS running in KVM.

jmealo avatar Oct 25 '23 20:10 jmealo

I now have the same issue after an ip-address change and forgetting to reconfigure the backup network location for my daily backups.

DarkWarden85 avatar Nov 02 '23 13:11 DarkWarden85

Where is the code in Home Assistant for this? I'd like to take a look. I found some related code here: https://github.com/home-assistant/supervisor/blob/6f0134105559a72916f1bb0982d6e36392c50b49/supervisor/mounts/mount.py#L216

jmealo avatar Nov 02 '23 16:11 jmealo

I think the basic issue here is that mount points in haos need to be read only until something is actually mounted on them. This way you would get an error when trying to write to a mount point that's not there, instead of breaking the mount point for all future mounts.

ve6rah avatar Nov 04 '23 14:11 ve6rah

What if the actual mount points have a UUID suffix and the named mount points are symlinks to the mount?

/backup_name -> /backup_name_uuid

On Sat, Nov 4, 2023, 10:47 AM ve6rah @.***> wrote:

I think the basic issue here is that mount points in haos need to be read only until something is actually mounted on them. This way you would get an error when trying to write to a mount point that's not there, instead of breaking the mount point for all future mounts.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/102009#issuecomment-1793465907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEMKDLM52KKJFSHJSZXU3YCZIPTAVCNFSM6AAAAAA6ANGDG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTGQ3DKOJQG4 . You are receiving this because you commented.Message ID: @.***>

jmealo avatar Nov 04 '23 15:11 jmealo

here the same, after last core update all works fine.i have invest than 20 h on the pc , have destroy my linnux lost all my data usw, now after 2 days i bye a new device an thge same fxsx again Mounting backups did not succeed. Check host logs for errors from mount or systemd unit mnt-data-supervisor-mounts-backups.mount for details.

VirtualBox_hassfl_26_12_2023_10_14_32

Frankymuc avatar Dec 26 '23 09:12 Frankymuc

I think there should possibly be a fallback or secondary backup location in the event network backups are failing. Additionally, a "No backups since .... " warning, rather than a mount warning would probably be a good idea.

jmealo avatar Dec 27 '23 00:12 jmealo

Architecture discussion on a proposed fixed to the Network Storage issues: https://github.com/home-assistant/architecture/discussions/1033

jmealo avatar Jan 30 '24 21:01 jmealo

after an outage of my NAS server (I'm using raspberry with attached HDD) I'm facing the same issue: grafik

but mentioned folder is not there: grafik

Probably the folder has been created, but -as server was down- could not be mounted. In that case, the backup writes to /data/mounts/.../. Now there's data in that folder, which might lead to that message. In this case it would simply help if the mentioned folder would be accessable via ssh or by file-browser and delete existing files....

gerhardmueller1 avatar Feb 07 '24 13:02 gerhardmueller1

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.