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

Network share not mounting after reboot (Frigate) #5471

Open
neekul opened this issue Dec 6, 2024 · 1 comment
Open

Network share not mounting after reboot (Frigate) #5471

neekul opened this issue Dec 6, 2024 · 1 comment
Labels

Comments

@neekul
Copy link

neekul commented Dec 6, 2024

Describe the issue you are experiencing

I have recently spotted something that is causing issues with Frigate.

I followed the documentation in Frigate to have my recordings placed on my NAS so my local drive isn’t eaten up (500GB SSD. HA is running on Proxmox in a VM)

I moved the Frigate DB to /config/
I used HA (Settings → System → Storage → Add Network Storage)
Started up Frigate and it all was working great.

Then I noticed if HA was to reboot in anyway, the mount would not happen, as it sees there is an existing fold/file in the location (media/frigate).
Here is the Supervisor Error

ERROR (MainThread) [supervisor.mounts.mount] Cannot mount bind_frigate at /data/media/frigate because it is not empty

What I suspect is happening is during a reboot, HA starts up all the Addons.
Frigate is set to start up on boot.
Frigate attempts to look at the media folder and realises its not there (the mount hasnt taken place by HA at this point) so it creates a directory (now this is created on the local drive by Frigate)
Then the mount process, I guess, kicks in and sees stuff in /media/frigate already and throws the error.
Frigate is happy so I don't notice it until I see my local drive suddenly filling up.

I have worked around this by making sure I uncheck “Start on Boot” for Frigate addon. Then created an automation that waits a few mins for HA to start up and then turns on Frigate giving HA time to mount the network drive.

I assume this a sequence thing for when HA boots up. The mount should happen before any Addons start to avoid this issue and have any addons that use mounted drives not try create their own folders before a mount has been done.

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. Create a Network Drive mount to /media/frigate
  2. Start Frigate Addon, check "Start on boot"
  3. Reboot Home Assistant
  4. Frigate Addons starts on boot
  5. Frigate creates /media/frigate before mount
  6. Mount fails

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

2024-12-04 12:11:58.790 ERROR (MainThread) [supervisor.mounts.mount] Cannot mount bind_frigate at /data/media/frigate because it is not empty
2024-12-04 12:11:58.790 ERROR (MainThread) [asyncio] Task exception was never retrieved

System Health information

System Information

version core-2024.11.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.63-haos
arch x86_64
timezone Europe/Stockholm
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.1
Stage running
Available Repositories 1475
Downloaded Repositories 18
Home Assistant Cloud
logged_in true
subscription_expiration 22 August 2025 at 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
cloud_ice_servers_enabled true
remote_server eu-central-1-21.ui.nabu.casa
certificate_status ready
instance_id 6cedce93a5ec4d5ead50c0b4a88697d3
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.0
update_channel stable
supervisor_version supervisor-2024.11.4
agent_version 1.6.0
docker_version 27.2.0
disk_total 97.7 GB
disk_used 21.6 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (19.0.0), File editor (5.8.0), Studio Code Server (5.17.3), Samba share (12.3.2), Home Assistant Google Drive Backup (0.112.1), Samba Backup (5.2.0), Whisper (2.3.0), Piper (1.5.2), Zigbee2MQTT (1.42.0-2), Mosquitto broker (6.4.1), Frigate (0.14.1), Filebrowser (2.23.0_14), openWakeWord (1.10.0), Glances (0.21.1)
Dashboards
dashboards 4
resources 11
views 3
mode storage
Recorder
oldest_recorder_run 6 November 2024 at 09:59
current_recorder_run 5 December 2024 at 11:51
estimated_db_size 1209.50 MiB
database_engine sqlite
database_version 3.45.3

Supervisor diagnostics

config_entry-hassio-834020f9bf7ad173979ba5f36fa06776.json

Additional information

No response

@neekul neekul added the bug label Dec 6, 2024
@BobMac57
Copy link

This has been an issue for a long time, is there any resolve to this? I have to manually click on repair or do an HA restart and then start Frigate to resolve...

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

2 participants