Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount directory not deleted after mount creation fails #5613

Open
NorthLake opened this issue Feb 7, 2025 · 0 comments
Open

Mount directory not deleted after mount creation fails #5613

NorthLake opened this issue Feb 7, 2025 · 0 comments
Labels

Comments

@NorthLake
Copy link

Describe the issue you are experiencing

When adding a new network mount a directory is created in /data/mounts. If the mount fails this directory is not deleted. I added a network mount in 2025.01. In doing so I messed up a few times with the username and password. I deleted the mount not long after because I realized I couldn't manually set the backup time (thanks for changing this). A couple of days later I realized the backup location was still active in the automatic backup, even though I removed the mount. In the meantime a couple of backups had been made, so they were just put in the local filesystem at /data/mounts/[name]. When I tried re-adding the network mount in 2025.02 it failed with the message that the directory was not empty.

In short, if the mount process fails when creating a mount, the directory that is made is not deleted, which results in unexpected behavior.

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Go to Settings > System > Storage > Add network storage
  2. Fill in details to mount a Samba share to use as backup storage, but use incorrect details (server or username/password)
  3. Observe that a directory with the name of the mount you attempted to create is left in /data/mounts

Anything in the Supervisor logs that might be useful for us?

2025-02-07 22:01:58.921 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /mounts - Cannot mount PC at /data/mounts/PC because it is not empty

System Health information

System Information

version core-2025.2.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.1
os_name Linux
os_version 6.6.62-haos-raspi
arch aarch64
timezone Europe/Amsterdam
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4973
Installed Version 2.0.5
Stage running
Available Repositories 1514
Downloaded Repositories 7
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.2
update_channel stable
supervisor_version supervisor-2025.02.0
agent_version 1.6.0
docker_version 27.2.0
disk_total 458.4 GB
disk_used 13.3 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board rpi3-64
supervisor_api ok
version_api ok
installed_addons Duck DNS (1.18.0), File editor (5.8.0), Nginx Proxy Manager (1.0.1), MariaDB (2.7.2), Advanced SSH & Web Terminal (20.0.0), Samba Backup (5.2.0), Node-RED (19.0.0), Vaultwarden (Bitwarden) (0.23.7), Get HACS (1.3.1)
Dashboards
dashboards 3
resources 1
views 4
mode storage
Network Configuration
adapters lo (disabled), enu1u1u1 (enabled, default, auto), docker0 (disabled), hassio (disabled), veth48c4617 (disabled), veth03026e7 (disabled), veth6539ba3 (disabled), vethe876b65 (disabled), veth098eaf2 (disabled), vethc8c1b70 (disabled), vetha87c81f (disabled), veth727556c (disabled)
ipv4_addresses lo (127.0.0.1/8), enu1u1u1 (192.168.178.109/24), docker0 (172.30.232.1/23), hassio (172.30.32.1/23), veth48c4617 (), veth03026e7 (), veth6539ba3 (), vethe876b65 (), veth098eaf2 (), vethc8c1b70 (), vetha87c81f (), veth727556c ()
ipv6_addresses lo (::1/128), enu1u1u1 (2001:1c02:2c25:600:7b40:2019:6e68:c04c/64, fe80::9a1d:c818:43f1:a16e/64), docker0 (fe80::42:39ff:fe58:3ea2/64), hassio (fe80::42:83ff:fe4a:1f69/64), veth48c4617 (fe80::845b:d1ff:fee0:af4f/64), veth03026e7 (fe80::5c47:99ff:feca:a049/64), veth6539ba3 (fe80::9c40:bdff:fe09:7c31/64), vethe876b65 (fe80::3021:8fff:fe77:f3fe/64), veth098eaf2 (fe80::18c0:38ff:fed2:2487/64), vethc8c1b70 (fe80::f4bf:97ff:fe1b:3792/64), vetha87c81f (fe80::d838:95ff:fe15:b00e/64), veth727556c (fe80::f844:57ff:fed6:923a/64)
announce_addresses 192.168.178.109, 2001:1c02:2c25:600:7b40:2019:6e68:c04c, fe80::9a1d:c818:43f1:a16e
Recorder
oldest_recorder_run January 27, 2025 at 3:01 PM
current_recorder_run February 7, 2025 at 11:09 PM
estimated_db_size 117.91 MiB
database_engine sqlite
database_version 3.47.1
Spotify
api_endpoint_reachable ok

Supervisor diagnostics

config_entry-hassio-8424ad985840f489ed8b48f1e3ea0078.json

Additional information

The fact that the backups were still created, even though the mount did not exist is also weird, but I don't think that'll matter if this issue is solved?

@NorthLake NorthLake added the bug label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant