I'd like to find out where a network share is mounted when the mount command fails like this:
$ mkdir ~/share
$ mount_afp afp://server/share ~/share
mount_afp: the volume is already mounted
This looked promising...
$ mount
... snip ...
afp_000000004oMw0q76003DF78u-1.2d000006 on /Volumes/share-1 (afpfs, nodev, nosuid, mounted by username)
afp_000000004oMw0q76003DF78u-2.2d000007 on /Volumes/share-2 (afpfs, nodev, nosuid, mounted by username)
It seems like there should be a way to map those long afp_000...
numbers to URIs... Is there any way to determine where a volume is mounted given its afp:// URI?
I'm actually executing these commands with Python's subprocess module, so if there's a module or library that can do it that would be acceptable as well.
Under the Go menu, open the Connect to Server utility. Enter the path to the folder (example: smb://Hostname/Sharename). A new icon displays on your desktop and in your Finder sidebar. That is your network drive.
In the Finder on your Mac, choose Go > Connect to Server. Type the network address for the computer or server in the Server Address field. For information about the correct format for network addresses, see Network address formats and protocols. Click Connect.
In Finder, either hit Command+K to bring up “Connect to Server” or click Go > Connect to Server. Enter the path of the network drive you're trying to map (e.g. smb://192.168.1.300/shared/Files) and click Connect. Enter your login details and password then click OK to mount the network drive.
Also, if you connect to the local domain, you can configure UNC paths to work in Mac OS X. You can connect to the domain by going to System Preferences>Users & Groups>Login Options and click the Join button next to Network Account Server. Type in the name of the domain and press enter.
Try /Volumes/PUBLIC
(Or whatever Get Info tells you after looking at the file with Finder)
That's what worked for me.
Do you mean where it mounted on the remote server or where its mounted locally? If youre talking on the local system the mountpoint should be in /Network/Servers unless otherwise specified by fstab, autofs or an arg to mount. You could scan /Network/Servers for the share name...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With