Mount a SMB share's subfolder as a drive in OS X Lion

5

3

In Snow Leopard I was able to mount a subfolder of a Samba share directly using a path like the following in the "Connect to Server" Finder dialog:

smb://someserver/someshare/where/i/really/want/togo

Using that would create a mount in [/Volumes] with the name "togo". It was great for me since at my work we have several servers with the same share name that I need to be connected to simultaneously. I can no longer do this in OS X Lion.

What happens instead is I get several mounts named like "someshare", "someshare-1", "someshare-2", etc. Using the same path just mounts the share, not the subfolder.

Is there any way around this?

donut

Posted 2012-02-16T20:28:14.237

Reputation: 926

Answers

3

One can use mount_smbfs in the Terminal to do this. However, a directory for the mount must first be created. Luckily, running umount removes that directory. But this is at least a starting point to create a better system.

Mounting:

$ mkdir /Volumes/togo
$ mount_smbfs smb://someserver/someshare/where/i/really/want/togo /Volumes/togo

Unmounting:

$ umount /Volumes/togo

Of course, unmounting should work fine through the finder.

donut

Posted 2012-02-16T20:28:14.237

Reputation: 926

1This works, but is a pain. It would be great if this could be automated in some way. – donut – 2012-02-21T17:00:40.850