Auto Remounting of SMB shares

I'm on a new M1 PowerBook running 12.1 and I am experiencing unmounting of my share drives not caused by a problem with the NAS. (verified by other Macs and PCs on the network). There seems to be a problem for some users under Monterey experiencing this error. This happens under wifi and Ethernet connections

Anyway, I'm looking to detect an unmounting event and then trigger an action to remount that share. I've looked at the triggers and don't seem to find anything that can be used as a trigger.

Any help greatly appreciated.

1 Like

Hey there!

I'm not familiar with mounting NAS drives but would the Mounted Volume not work for your needs?

Again, I don't use any NAS drives so it's just an idea. :thinking:

Thanks for that hint, I assumed it was just for locally mounted volumes. I'm working on a solution using the info from the work done by Bill_Mabey Can it really be true that KBM does not have an action to mount a network volume? - #8 by Bill_Mabey

1 Like

I'm still trying to get a remount action going in KM using AppleScript.

I'm no programmer and I thought I was using the correct syntax but I cannot get this script to work.

Any ideas on what I'm doing wrong?

on idle
   tell application "Finder"
      set isConnected to disk "Books" exists
      set isConnected2 to disk "Download" exists
   end tell
   if isConnected = false then
         mount volume "Books" on server "Media-Monger"
      end try
   end if
   if isConnected2 = false then
         mount volume "Download" on server "Media-Monger"
      end try
   end if
   return 25
end idle
1 Like

Hey Jeff,

Did you ever figure this out?

Here's something that seems relevant and isn't overly old: