MacOS – Why does Lion mount a network volume twice at login

macosmountNetwork

I just set up a new NAS at home and created a few volumes on it, along with enabling access to those volumes (i.e. enabling the Mac File Service on the NAS), and creating an account for myself.

On the iMac, I went into Finder and provided credentials and stored them in my keychain. No problem – I can see and access the NAS volumes.

I then went into System Preferences, Users & Groups, and added those volumes to my Login Items so that they'd be mounted automatically when I log in. I did this with my previous network storage (a Windows Home Server) and it worked fine.

However, in this case, I'm seeing the volume I want mounted at login get mounted TWICE… the "Home" volume, which is unique to my account on the NAS, gets mounted twice and appears twice both on the Desktop as well as in Finder when I click on the NAS' name in the sidebar.

Why would a volume get mounted twice like that? Is there some other place I should be looking to find the duplicate mount setting?

Best Answer

AFP mounts are tied to both a path and an authentication.

An exported volume might have multiple paths. For example, an OS X server might export its root, the /Users/ folder, and the /Groups/ folder. Each of these can be mounted separately. In your case, your NAS may be exporting its volume under multiple paths. It might even be exporting the same path multiple times. Check the NAS' settings.

Each AFP mount is tied to a particular authentication (username/password). You can mount the same volume/path multiple times using different authentications. Its possible that the credentials you used in those two different places are subtly different. Depending on the NAS, it might even come down to whether your long username or short username are used. Your NAS might not even require a username (only a password) and might ignore whatever username is given. OS X has no way of knowing that and so two different usernames (long versus short) might produce two different mounts even though they lead to the exact same volume.