I'm going to put up an answer to question 3. Not sure the rest can be easily diagnosed.
"If an auto-unmount occurs, how can I re-mount the directory without restarting?"
Try diskutil umount /Volumes/josh
and it should do the trick.
The "File exists" error is showing up because the mount point it wants to use is already present. Looks like the disk isn't actually unmounted, just that Finder can't see it. This is why Matlab can still access the files on it.
TL;DR: If you see paths like /Volumes/Untitled*
piling up, trying mounting and mounting external drives and see if that correlates with more entries appearing.
I diagnosed the problem. It seems that fuse-ext2 v 0.0.7 was creating the /Volumes/Untitled*
entries when the external SSD was mounted, and was not cleaning them up when the drive was dismounted. Because it failed to clean up, when fuse-ext2 was ready to create a new /Volumes/Untitled
entry, it found that there was already an entry with that name, and so added an ever-increasing sequence number to the name.
I uninstalled fuse-ext2, by going to the System Preferences panel, opening the panel for fuse-ext2, and using the uninstall button there. After uninstalling fuse-ext2, I could remove and add the external SSD, and restart the computer, with no further /Volumes/Untitled*
appearing.
The fact that /Volumes/Untitled*
entries correlated with new entries appearing was revealing. The fact that the fuse-ext2 logs mentioned the exact path names in question, and with time stamps similar to the directory time stamps, was good confirmation.
fuse-ext version 0.0.7 dates from 2009-12-24. In the intervening five years, Mac OS has changed a lot. Yosemite, and before it Mavericks, caused a lot of problems for other software. While I don't know why exactly fuse-ext2 creates these entries and doesn't clean them up, it's not surprising that Yosemite causes problems for fuse-ext2 also.
I have deleted the /Volumes/Untitled*
from the command line, with no apparent ill effects.
Best Answer
Question re-asked because of lack of input. Got some clues. Found answer related on discussion of ntfs-3g (though problem was not related to ntfs mounting). See https://github.com/osxfuse/osxfuse/issues/119