NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
nd
Dec 08, 2008Aspirant
AFP auto mount on ReadyNAS startup (OSX 10.5.5)
Hi there
Is it possible to get some of the shares automatically mounted, when the NAS ist started up? Or even better as soon as the ReadyNas is visible in the Finder? This would also allow me to connect my macbook to the network when the ReadyNas is already running and get my shares auto mounted...
Thx in advance!
Is it possible to get some of the shares automatically mounted, when the NAS ist started up? Or even better as soon as the ReadyNas is visible in the Finder? This would also allow me to connect my macbook to the network when the ReadyNas is already running and get my shares auto mounted...
Thx in advance!
87 Replies
Replies have been turned off for this discussion
- sphardy1ApprenticeAs the error states there is no path /mnt - and your other commands seem to be creating folders in the root of your OSX filesystem eg /Music rather than as /mnt/Music or wherever you want to mount your shares
Are you familiar with creating a folder structure with subfolders?
The command I gave you was an *example* that must be adapted to your setup which is unique to you (and why I suggested you learn more to understand the command rather than continuing as you are)
In that last example I mounted the nas share so that it appears as the folder /mnt/Share on your mac, as stated "presuming that /mnt/Share already exists"
So create the mount point ( ie folder) where you want the share to appear and then adapt the mount command based on the syntax:
mount -t afp source destination
Where source is the nas share (beginning afp://) and destination is the folder on your mac where you want the share to appear. Eg /Music or /mnt/Music or wherever makes sense for you - BeatCrazyAspirantThank you again sphardy, for your responses.
Yes, I do understand the logic behind what I'm trying to do. I actually have done this type of thing, in the past, even if I muddle through it.
For "presuming that /mnt/Share already exists", I thought I made that Share path via "mkdir /Share", in my case "mkdir /Music". Is that not correct?
I am starting to think my understanding of creating a share vs. creating a directory path (folder) in the Mac OS are two different things?
I still think this syntax should work:mount -t afp "afp://nas-XX-XX-XX (AFP)._afpovertcp._tcp.local/Music" /mnt/Music
Replacing XX with my appropriate letters/numbers. I don't presume I should be replacing the ._afpovertcp._tcp.local with anything? - sphardy1ApprenticeFirst let''s clarify terms - just to be sure we're both using them consistently
A "share" - in this instance - refers exclusively to your NAS and is defined as a network accessible folder on the NAS which you control the contents of and access rights to.
A "mount point" is a folder on your Mac which, once the share is mounted by the Mac, is where you see the contents of the NAS share
So if we assume you are trying to, for example, mount a share called "music" such that it is mounted at the mount point "/mnt/music" (ie "music" being a subfolder of folder "mnt", which is in the root of your OSX filesystem)
Create parent folder of mount point /mnt:mkdir /mnt
Create mount point:mkdir /mnt/music
orcd /mnt
mkdir music
Mount share:
mount -t afp "afp://nas-xx-xx-xx (AFP)._afpovertcp._tcp.local/music" /mnt/music
Notes:
- the above is exactly what finder does when you mount a share via the finder GUI - but it uses the parent folder /Volumes instead of /mnt
- parent folder /mnt was only an example - you can use virtually any name, or even none - it's up to you. Your key error has been not creating the mount point correctly (
- the share name abov must be in quotes because of the space character in the name (between nas-xx-xx-xx and (AFP) ), else you get an error as previously reported - BeatCrazyAspirantThank you for taking the time to explain that. I was not using the terms consistently, and now have a better understanding of each.
My error was in never creating the /mnt parent folder mount point. For some reason, I assumed that already existed, as part of the OS.
I think I can get this to work now. I appreciate your examples above.
Should I remove the /Music parent that I created by mistake? - sphardy1ApprenticeUp to you - I would but then I prefer a clean filesystem
- BeatCrazyAspirantStill a no-go.
Latest error is:mount_afp: AFPMountURL returned error 1, errno is 1
I know the command I'm using is correct, because it originally returned that the share was already mounted (which it was). So, I restarted the mini and of course the NAS AFP was unmounted. When I did the code again, I got the above message. - BeatCrazyAspirantJust as a follow-up, I finally did get this to work, but not via command-line.
The same thing can be accomplished via System Preferences->Users & Groups->Current User->Login Items-> + button to add Volume. - Using Login Items will work fine. A couple of things to know about AFP mounting of shares:
1. Any shares mounted from a host must all be mounted using the same credentials. ie, you can't mount NAS/share-1 as user jsmith and mount NAS/share-2 as guest. You have to mount all those shares as jsmith or guest.
2. The Login Items method of mounting a share can be slow. You could login, get to the Finder, and find that your share still hasn't mounted yet. Bonjour Mounter seems to be faster in this respect.
3. Mounting of shares by multiple users on a single Macintosh is not fast-user-switching friendly. Let's say your iTunes library exists on your NAS and that you have two local users on your Macintosh. When each user mounts NAS/media, there's no guarantee as to what the mount-point will be. Whoever gets there first will get /volumes/media and the second person to mount it will get /volumes/media-1. Consequently, it's difficult to programmatically set a symbolic link from ~/Music/iTunes to the iTunes library on NAS/media/Music/iTunes. - BeatCrazyAspirantGood tips, thank you.
Luckily I'm the only user. I don't think I can handle any more hiccups for a while.
Yes, mounting this way can either be fast or slow. I've seen it mount immediately, but other times take over a minute after the desktop appears. Too bad I couldn't get the Command prompt method to work, but this gets me the same goal with minimal hassle. - Did you manage to sort your problem out.
To auto mount discs or shares you do not need any form of scripting or any other 3rd party software. You can auto mount a disc or share by specifying them as a Login item in your 'User & Groups' of your preferences panel. You could actually specify different shares for different users if required. It is a simple drag and drop routine.
This is by far the easiest way and no need for complicated routines.
Cheers
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!