OS X Failure: Mounting Via Shell (Updated)

No I am not dead and I am back with a Mac. So how about that? I definitely (probably said this before) want to get back into blogging but I ran into something tonight that is pretty irritating. So much so that I had to fire up the ol’ blog account and get to writing.
Now, I’m pretty sure I’m doing something wrong here but none the less I want to post this up and (hopefully) get some input on the situation. Here’s the deal. I want to mount (via Samba on an Ubuntu box named ubuntu1) a shared directory that is named test. I want to mount it in a directory inside my home in a directory named “test” on OS X. Why is it such a problem? Is it even possible to mount a Samba share this way? Note that /Users/mike/test exists but /Users/mike/test1/ doesn’t.

[13]mike@OSX:~/$ mount -t smbfs //mike@ubuntu1/test/ /Users/mike/test/
mount_smbfs: mount error: /Users/mike/test: File exists
[14]mike@OSX:~/$ mount -t smbfs //mike@ubuntu1/test/ /Users/mike/test1/
mount: realpath /Users/mike/test1: No such file or directory

I have no idea what I’m doing wrong here. Doesn’t matter if I prefix the command with sudo or not. It says it can’t mount because the directory exists then it can’t mount because the directory doesn’t exist.  I don’t know what OS X wants from me. I know that I can probably Google for an answer but really, this did grind my gears and I wanted to write about it.

(Update)Looks like mount only works if the target mount directory is under /Volumes/ ? Well bed time to continue this later.

Tags: , , , ,

6 Responses to “OS X Failure: Mounting Via Shell (Updated)”

  1. I hate apple says:

    MAC = FAIL BOAT

    I have just spent the last hour trying to mount a file share and getting the exact issue you are commenting on here.

    It also fails if I try mounting under the /Volumes/ directory.

    All the posts I find under google are use mac’s stupid file browser to mount it… That’s not mounting thats just accessing ffs.

  2. me says:

    hey, did you ever find a solution for this?
    I’m having the same problem right now….

    any hints would be much appreciated!

  3. Mike says:

    I’ve not looked into it since I tried it here. I’ve started using SFTP (ftp over ssh) to move files around on my Ubuntu box.

  4. Victor says:

    Make sure that you already do not have the same share mounted on your Mac.

    I had //host/share already mounted in /Volumes/share, so when I tried to mount //host/share to /Volumes/newshare it gave me the “file exists” error.

    I even tried creating the mount point in my home directory, that is mounting //host/share to ~/newshare and I still would get “file exists”

    When I did unmounted the original //host/share from /Volumes/share, then I could mount //host/share to /Volumes/newshare.

    What I ended up doing is just mounting a subfolder of //host/share, ex. //host/share/subsharedir to /Volumes/newshare and it worked.

    Very tricky. You cannot mount a share to more than one share point it seems. You’ll have to write a script to check to see if your share is already mounted somewhere else, and if it is then unmount it or use the existing mount instead.

    I know this post is a few months old, but I was searching for hours for an answer and this is one of the top results. Hopefully, my answer will help someone with the same problem.

  5. [...] mindedly gone and mounted the drive elsewhere through Finder which I only realised after reading Victor’s comments on this post. Make sure that you already do not have the same share mounted on your [...]

  6. [...] mindedly gone and mounted the drive elsewhere through Finder which I only realised after reading Victor’s comments on this post. Make sure that you already do not have the same share mounted on your [...]

Leave a Reply