Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / General / Networking / December 2005



Tip: Looking for answers? Try searching our database.

Automatically Re-Mount a File Server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Grossman - 21 Dec 2005 04:05 GMT
I have a Mac OS 8.6 machine that I connect to a server over TCP/IP.
There are times when the connected server will disconnect.  Is there a
program out there, or a way for me to automatically re-mount that server
if the connection goes down, without rebooting the machine?

I know in earlier OS versions there was an extension called remounter.
I never used it though, and I don't think it is included with OS 8.6.

Thanks for any help you can offer me.

Jeff
Gnarlodious - 21 Dec 2005 15:15 GMT
Entity Jeff Grossman spoke thus:

> I have a Mac OS 8.6 machine that I connect to a server over TCP/IP.

Applescript:

mount volume "afp://MachineName.local" as user name "Username" with password
"password"

Not sure if this will work on OS 8 but it's worth a try.

-- Gnarlie
Jeff Grossman - 22 Dec 2005 14:09 GMT
> Entity Jeff Grossman spoke thus:
>
[quoted text clipped - 6 lines]
>
> Not sure if this will work on OS 8 but it's worth a try.

But, what happens if the server gets disconnected, the applescript needs
to be run again to mount the volume.  I want something unattended to
re-mount the file server.  I already have the file server set up to
automatically connect at startup.  But, if it disconnects while the
machine is running, I need to to reconnect automatically as soon as
possible.  Is anything like what I describe available or possible?

Jeff
Gnarlodious - 22 Dec 2005 15:40 GMT
Entity Jeff Grossman spoke thus:

> But, what happens if the server gets disconnected, the applescript needs
> to be run again to mount the volume.  I want something unattended to
> re-mount the file server.

In that case you would say:

"GNARLODIOUS" is in (list disks)
if the result is false then
   mount volume "afp://MachineName.local" as user name "Username" with
password "password"
end if

I think you would need to save it as an Application or Cronnix will open it
in Script Editor. I forget.

You would then run this script every 5 or 10 minutes from Cronnix:
http://abstracture.de/projects-en/cronnix

For an example of how to configure Cronnix to run an Applescript:
http://Gnarlodious.com/Apple/AppleScript/ConfigureCronnix.png

-- Gnarlie's Applescript page:
http://Gnarlodious.com/Apple/AppleScript/
Jerry Kindall - 22 Dec 2005 22:21 GMT
> Entity Jeff Grossman spoke thus:
>
[quoted text clipped - 9 lines]
> password "password"
> end if

on idle
  if "DISKNAME" is not in (list disks) then
     mount volume "afp://hostname/sharename" as user name "username"
with password "password"
  end if
  return 60
end idle

Save as an application.  Checks whether the server is connected every
60 seconds.  Change the "return 60" line for longer or shorter interval
as desired.

Signature

Jerry Kindall, Seattle, WA                <http://www.jerrykindall.com/>

       Send only plain text messages under 32K to the Reply-To address.
       This mailbox is filtered aggressively to thwart spam and viruses.

Gnarlodious - 22 Dec 2005 22:53 GMT
Entity Jerry Kindall uttered this profundity:

>>>  I want something unattended to
>>> re-mount the file server.
[quoted text clipped - 18 lines]
> 60 seconds.  Change the "return 60" line for longer or shorter interval
> as desired.
I believe this example would need to be saved as "Stay Open Application.

The difference between the Cronnix solution and the "stay-open" solution is
this:

Cronnix will run the script every so often using very little processor
resources and it will do so invisibly. You can't normally just "turn it
off". This is ideal if a disk needs to be mounted all the time.

The stay-open script application will run as long as the script is running,
when you quit the script it will stop checking and remounting. Unfortunately
stay-open scripts sort of use a lot of processor and I avoid them if
possible. Since the "list disks" command also pings the other machine it
works well to maintain a mount where the AFP machine would timeout from
inactivity. I believe the AFP timeout is 5 minutes for ServerX.

The stay-open script would be a better solution if you want to only remount
the disk sometimes. Also, the 1 minute parameter is ideal for the stay-open
script. If you wanted to avoid problems with unreliable internet connections
probably a 5 minute interval (or more) would be better. A script that is
trying to mount a cranky network disk every 1 minute can be a problem.

Hope that spells out some of the variables...

-- Gnarlie
Jeff Grossman - 24 Dec 2005 17:08 GMT
> Entity Jerry Kindall uttered this profundity:
>
[quoted text clipped - 43 lines]
>
> Hope that spells out some of the variables...

Thank you for the information.  This post is very informative and I need
to figure out what the best option is for my particular case.  I will
probably run both and see which one runs the most efficient and most
reliable.

Thanks for again for everybodys help.

Jeff
Jeff Grossman - 24 Dec 2005 17:06 GMT
>> Entity Jeff Grossman spoke thus:
>>
[quoted text clipped - 21 lines]
> 60 seconds.  Change the "return 60" line for longer or shorter interval
> as desired.

I won't need to run any time of cron program to run the application
every 60 seconds?  Applescript will keep the program open and just run
it every 60 seconds for me?  This sounds like it might work for me.

Thanks for the information.

Jeff
Jeff Grossman - 24 Dec 2005 17:04 GMT
> Entity Jeff Grossman spoke thus:
>
[quoted text clipped - 21 lines]
> -- Gnarlie's Applescript page:
> http://Gnarlodious.com/Apple/AppleScript/

Thank you for this information.  I will take a look.  I would prefer to
run not another application, but if I have to, I will probably do it.

Jeff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.