MacMini and Networked Drive

Having issues with automatic updates on my NAS causing my MacMini to not see it. I have to go on the Mini and open the Network drive in order for Channels DVR to see it again. This drive is used for my library. Anyway to have Channels DVR or MacOS check and reconnect network drives periodically/automatic?

You can make the mount a login item on the mac. But that won't fix the issue with your NAS doing automatic updates and the Mac disconnecting the drive. I'm not sure if you can have a mount persist by using launchd, thats where mac would keep things running but I don't think it works for network mounts.

Best solution is probably to simply disable automatic updates on your NAS.

I had similar issues. Ended up writing an script that periodically checks if the Mac mini is connected and if not, reconnects.

Take a look at autofs. I have not used it on a Mac but I do use it very successful with Channels in a Linux environment.

1 Like

Have that script? Please

It is an apple script. Make a new script, add the code.

Replace VolumeName and xxx.xxx.xxx.xxx with the volume name of your share and the IP address of your NAS.

Then export as an application that your machine loads at start up (in your login items in your Mac prefs).

Here's the script:

tell application "Finder"

mount volume "VolumeName" on server "xxx.xxx.xxx.xxx"

end tell

on idle

tell application "Finder"

set isConnected to disk "VolumeName" exists

end tell

if isConnected = false then

try

if ( do shell script "ping -c 1 xxx.xxx.xxx.xxx") contains "0.0% packet loss" then

delay 240

if ( do shell script "ping -c 1 xxx.xxx.xxx.xxx") contains "0.0% packet loss" then

mount volume "VolumeName" on server "xxx.xxx.xxx.xxx"

end if

end if

end try

end if

return 10

end idle

So for the VolumeName I'm putting what's listed in Network. IP is actual IP of NAS.

Now this is a public folder on the NAS, also setup with users (Not discoverable on network).
Keeps asking for username/password. No matter what I use (tried without and with different
users), keeps kicking up an error about VolumeName or IP being wrong.

??????? some limitations of the script?

So on my synology nas, I have the machine name that appears in the network panel, once I’ve logged into it, I have a series of shared folders. These are the shared volumes. One of them is the share I use for DVR. That is the name you want to use.

For example, if the NAS was called Synology and the shared folder called DVR, you would write DVR in the volume name.

You do need the Mac to have the login info saved in so that when connecting it doesn’t ask for username and password.

I should add that I amended another script I’d found elsewhere so it actually worked for my situation. I can’t recall precisely what I changed but I think it was I added the delay between a ping failure and attempting to connect.

The return 10 at the end is the gap in seconds between when the script checks the connection. The delay 240 in the middle is an amount of time in seconds where I’m confident the NAS will be able to restart after a shut down.

You may want to adjust those numbers depending on your set up and how quickly your NAS restarts.

I’m no apple script expert though, so others may well be able to improve it.

Hi Everyone,

I know this is an old thread, but I recently ran into this issue after I migrated my Channels DVR server from my Synology to an older Macbook, but left the data on the NAS. The Macbook has hardware encoding, which was my requirement for moving.

I was able to follow the procedure from this [Youtube Video] (https://youtu.be/ymK0c_m8PvA?si=IOdS4VGAQigrMp2v). The shares now automatically mount and the DVR works great after reboot. I also have the Mac to auto login with the user account running the server.

I hope this helps some folks!