Mount a SMB share's subfolder as a drive in OS X Lion
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.
Related videos on Youtube
donut
Updated on September 18, 2022Comments
-
donut over 1 year
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 about 12 yearsThis works, but is a pain. It would be great if this could be automated in some way.