OS X renames secondary volume on boot I have a second internal drive (in the optical bay), named "Secondary". It is mounted in /Volumes/Secondary. User directory is moved to that drive and also symlinked.

Sometimes when I reboot, and always during a crash, OS X creates an empty directory under /Volumes/Secondary and basically creates a new user profile. Then it moves the actual drive to /Volumes/Secondary 2.

I have to go in and manually delete the new dir, move the other one and reboot again.

How can I lock in that volume name permanently?
The ghost mount is probably due to an application or some aspect of the system attempting to check something after the external drive is unmounted during the shutdown process (or crash). In this case, a directory (and even subfiles) may be created.

You can get rid of this directory by simply removing it as a script. The trick is to get the script to run when the new volume is mounted. There's probably a way to do this with autofs, but I'm not so familiar with its intricacies. I would instead recommend using Lingon to automatically run the script in response to the mount request.