I am running Home Assistant OS on a standalone mini PC. Recently, I added a Synology NAS as network storage to Home Assistant because I wanted to play music stored on my NAS via Music Assistant in Home Assistant.
After some testing, I decided to remove the network drive. However, I noticed that all the media I had mounted still appeared under the Media section in Home Assistant. When I deleted the files from the media folder, it was also deleted from my NAS. This was extremely bizarre because I had already removed the network storage from Home Assistant.
Fortunately, I was able to recover my data from the NAS. However, after restoring the files, they reappeared in Home Assistant’s media section again, which suggests that the network storage is still somehow connected—even though it no longer appears under the Storage section in Home Assistant.
This is a very risky issue because users may unknowingly delete important data from their NAS, thinking it’s been unlinked from Home Assistant.
Now, I want to remove the media from Home Assistant without affecting my NAS. Please help me resolve this issue, as it could lead to accidental data loss for others as well.
Your share is unmounted, but some other media service is still exposing the contents. Most likely Music Assistant also has your media share mounted. That might be exposing it to HA. It could also be dlna, plex or any other service.
There is no feature in HA to ‘delete’ media that a media source exposes. HA cannot do that, because it does not have the media itself. You are thinking of it as a filter of sorts, but that is not how it works. HA has no list of things it will ignore when a media source exposes something. When you ask to delete, you ask the media source to delete.
I have a Samba share configured in Home Assistant to manage media files directly from my Windows PC via a mapped network drive. However, when I delete media files from this mapped drive, they are also removed from my Synology NAS.
My issue is that I want to disconnect this media folder from Home Assistant so that it no longer appears in the HA media folder.
How can I achieve this?
I hope this explanation provides more clarity on the issue.
I understood you the first time. But did you consider what I said: that is not the share that exposes the media to HA because you removed the share, but Music Assistant, which you also mentioned? Did you configure Music Assistant to have acces to the same share, and did you configure the Music Assistant integration for Home Assistant so Home Assistant sees what Music Assistant sees? Because, technically you might have asked Music Assistant to remove the file, via Home Assistant.
Neither should have RW access to your media in my opinion.
I have checked all and didn’t see any access to any other service. I don’t have plex configured, dlna have no access, music assistant also does not have access. Still the data is is being shown in media.
Lastly, you can see no network storage is attached as I have removed the NAS from here, yet the media is still showing these folders along with all data in these folders: