Possibility to automatically remount external storage after reboot etc

Hello.

I recently implemented an external cifs storage for my backups.

after i reboot, for example after updating custom integrations from hacs, i have to manually remount the drive

it is easy, just click on the notification , press the button.

but it would be really good, if we had a service, that we could call with an automation, with fail and success , to retry.

this would be handy after a power outage etc. because I cant always react in time, whe things hit the fan

This might not be perfect but you might be able to use it as a workaround.

Can’t you also use a command line sensor instrution to mount the drive if you had to?

I don’t know, how it works in the background, it is shown as supervisor repair option.
if i knew how it worked in the background, then an automatic reload via command line COULD be possible

Just do some reseach on how to mount a drive from the command line in linux, the code is pretty simple (mount and umount)

I know how to mount in Linux, but wouldn’t it collide with the supervisor in this case? would the warning still be there?

Hi,

@Maschinenherz I have the same issue that you describe.

Did you find an alternative ?
Is there an API call we can use in a shell_command maybe ?

Thanks !

Hi again,
I followed the shell_command lead using the following command:

>   remount_nas: |-
>     list_uuids() { 
>       curl -sSL -H "Authorization: Bearer $SUPERVISOR_TOKEN" http://supervisor/resolution/info | jq -r '.data.suggestions[] | select(.type == "execute_reload").uuid'; 
>     }
>     uuids=$(list_uuids)
>     for uuid in ${uuids}
>     do  
>       curl -sSL -X POST -H "Authorization: Bearer $SUPERVISOR_TOKEN" http://supervisor/resolution/suggestion/${uuid};
>     done

Seems to work ok but the repair notifications are not cleared immediately in the UI.

If any one has a better way of clearing the repair alarm when NAS comes back up, I’ll be delighted to hear it.

Thanks all.