Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Network drive volume name for same folder by multiple users

I am using a 1TB USB hard disk attached to a ASUS RT-AC68U wireless router as network drive. There are multiple user accounts created on the same MacBook Air and they need to access the same folders on the network drive. For example, we have folder called "iTunes" created on the network drive.


The following steps resulted in some problems encountered.


Step 1: When user1 mounts the iTunes folder as a network drive, the general info shows:


General:

Kind: Volume

Server: smb://rt-ac68u/iTunes


Name & Extensions:

iTunes


Step 2: When user2 mounts the same iTunes folder as a network drive, the general info shows:


General:

Kind: Volume

Server: smb://rt-ac68u/iTunes


Name & Extensions:

iTunes-1


Question: Why does OS X assign "iTunes-1" as the name of the same network folder on the network drive for user2? Is there a way to retain the same original folder name for user1 and user2, such as "iTunes", so that it can be access as "/Volumes/iTunes" by both these users?

MacBook Air, OS X Mavericks (10.9.2), OS X Server 3.1.1

Posted on Jun 8, 2014 10:19 PM

Reply
Question marked as Best reply

Posted on Jun 9, 2014 1:33 AM

When user 1 mounts the disk the file path /Volumes/iTunes is empty.

When you switch accounts & mount the disk as user 2 file path /Volumes/iTunes already exists and is in use. The OS can only add a number to the name to make it different.


If you want this to work you have 2 choices that I can see…

  1. Create a share for each user with a different name that way they will not conflict. Both users can mount & it should work fine.
  2. Disable fast user switching and make a logout script to eject the disk, add the script to every user.

It turns out Apple don't recommend logout scripts anymore…

https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystem startup/chapters/CustomLogin.html


2. Your second option is to reboot between 'fast' user switching or to remember to unmount the disk before logout.

17 replies
Question marked as Best reply

Jun 9, 2014 1:33 AM in response to tastyrico

When user 1 mounts the disk the file path /Volumes/iTunes is empty.

When you switch accounts & mount the disk as user 2 file path /Volumes/iTunes already exists and is in use. The OS can only add a number to the name to make it different.


If you want this to work you have 2 choices that I can see…

  1. Create a share for each user with a different name that way they will not conflict. Both users can mount & it should work fine.
  2. Disable fast user switching and make a logout script to eject the disk, add the script to every user.

It turns out Apple don't recommend logout scripts anymore…

https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpsystem startup/chapters/CustomLogin.html


2. Your second option is to reboot between 'fast' user switching or to remember to unmount the disk before logout.

Jun 9, 2014 8:40 AM in response to Drew Reece

Hi Drew,


Thanks for the helpful explanation as to why OS X appends a "-1" to the second mount of the same network folder by user2 and also recommending the workarounds. However, the workarounds will be cumbersome and they don't really address my requirement (I used the iTunes example because most apple users will able to able to relate to the preference "iTunes Media folder location" problem if multiple users were to manage the same media items and hence share the media files), the same conflict will inflict other applications.


I shall have to look for other viable alternatives to this problem, if you have other suggestions, they will be greatly appreciated.

Jun 9, 2014 9:44 AM in response to tastyrico

My suggestion is run a mile from this idea if you don't want headaches. If you must do it take a full backup of the data before you start.


Sharing one iTunes library across a network to multiple user accounts that can login at the same time is a bad idea.


Apple have already built 'Home sharing' & sharing of DRM'ed purchases into iTunes, you can see & play another users Music, video etc. It's basic and can be slow but it does work.


There have been countless posts & guides on sharing a single iTunes library to many users over the years. If you can find one where the user ends up happy with no problems or caveats at all follow that guide. It never turns out well from what I can see.


Basically one user may put a 'file lock' on the library, database or media file as they write to it. User 2 then cannot write to that until User 1 frees the lock. If anything happens in the background (like podcasts) it can cause the library to be locked by a user in the background.


It's difficult because it was never designed to support what you hope to do.

Jun 9, 2014 10:56 PM in response to Drew Reece

In the case of iTunes and how the library and media are being managed, it is quite clear that it is implemented and designed it to be managed and administered by a single user per library, we understand and we are OK with that.


The difficulty and error I encountered is actually with sharing the project folder on the network drive (example "Proj Share") with multiple users on the same Mac, for example access by user1 then by user2 without user1 logging out. Their scripts were working ok (able to deal with file locking) when they were using multiple Macs. The other Mac had been taken on a road trip and several users having to share a Mac for time being. Hence I looking for a longer term solution as we see this situation arising again.


Would a NAS be a better solution to our needs?

Jun 10, 2014 6:24 AM in response to tastyrico

I don't know of a way around the fact that 'User A' will always get to mount in the default location whilst any subsequent users will not be able to use that path because it is busy.


We used to use logout scripts to handle this situation in a school network, but now Apple has deprecated that. We also disabled fast user switching because of this (& the fact that one user needs to know another password to shutdown safely).


A NAS will not change any of this sorry.


I don't know if this is the same in 10.9 but there was a 'defaults' setting for handling if disks should be unmounted on logout.


http://superuser.com/questions/360276/automount-external-hard-drive-on-mac

sudo defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin false

Search around to see if that works for anyone on 10.9, I suspect you will still need to disable FUS because of the chance that User A has an open file on the disk - it may prevent unmounting again.

Jun 11, 2014 12:11 AM in response to Drew Reece

Hi Drew,


Thanks for the recommendations. They are useful tips to have in the arsenal, thanks. However, the preferences discussed are intended for directly attached external hard disks and the specific discussion was to make it available to the network on a Mac that is powered up with no user logged in (like a OS X Server but user still need to log in). Your recommended adaptation is to dismount the hard drive upon logging out user1.


My situation is different because we are dealing with a network attached hard disk device (attached to the wireless router). With Samba enabled, the folder (in my example above smb://rt-ac68u/iTunes) is always there. We needed it to mount as the same volume name when more than one user (logged in to the same Mac) are accessing it. In fact, in my case, when user1 logs out, that disk file path is automatically freed up and when user2 logs in and mounts that folder as a logical volume, the volume name is without the "xxx-1" extension. My case gets complicated because some of user1's tasks are still active and needs that logical volume but user2 wants to log in to work on her stuff while user1's tasks continue. That's where we ran into the problem.


Actually, directly USB attached hard drive overcomes that problem (volume path is the same to all active users with appropriate "chmod" changes), however, our work environment needed the hard drive to be attached to network.


I figure we need a solution somewhere in between a sophisticated engineering workbench for collaboration and the current rudimentary implementation of Google Drive (may be the iCloud Drive in the near future) that works as application dependent dropbox. I will continue to evaluate the offerings of SOHO NAS with VPC capabilities, with their own user work space sharing, management and user authentication to see if there's something there that'll serve us for the longer term.

Jun 11, 2014 4:47 AM in response to tastyrico

I have the same problem (the extension -1 is added to the server name), but when connecting to a local SMB network volume after a reboot of my Mac, logged in as the same user.

Sometimes I manage to get rid of the extension, but I have not figured out what does make it happen.

Trouble is, as long as the extention -1 is added, I cannot open or save MS Word or Excel files directly from/to the network volume but have to copy them to my harddrive.


Has anyone an idea how I can fix this?

There is no difference if I connect using smb or cifs ...

Jun 11, 2014 8:38 AM in response to tastyrico

tastyrico wrote:


Hi Drew,


Thanks for the recommendations. They are useful tips to have in the arsenal, thanks. However, the preferences discussed are intended for directly attached external hard disks and the specific discussion was to make it available to the network on a Mac that is powered up with no user logged in (like a OS X Server but user still need to log in).

That's correct, I'm sorry I am wrong.


I do remember another defaults write option for detaching network drives on 'switch to loginwindow' because I needed the same thing - eventually I gave up & disabled fast user switching, it reduced the amount of issues for the clients. Sorry for confusing the two.


Have you considered mounting it via a startup script. At the moment it is failing because the path exists when User2 mounts it. If you try a script (at the level of the system) it should mount only once. Obviously sticking usernames & passwords into a script is not the best for security.


I think this issue is what NFS mounts can overcome, but I haven't used them for so long. They should be able to mount with no user interaction, but they are less flexible with permissions IIRC.


If your NAS supports NFS look at that, I think you both need to remove the user as the agent that mounts the disk. If the OS does it once (& permissions are correct) it should remove the 'diskname-1' issue.


When it works you end up with volumes in /Network/diskname.


I don't have a good place to start with NFS, so take a look around here…

https://discussions.apple.com/thread/4144999




@ElisabethBraut, do you get this error form MS…

http://support.microsoft.com/kb/2712085

MS apps fall apart when you have disks mounted like this, it's a consequence of MS apps using an older way to represent filepaths.

Jun 11, 2014 1:49 PM in response to Drew Reece

Hi Drew,

thanks for the suggestion. And it is indeed the exact problem I have.

But I have not found a way to get rid of the duplicate mount point. It's not shown anywhere. I have tried all terminal scripts I have found on the internet for removing network shares, I have reset NVRAM and even tried to start in single user mode.

Still the SMB share shows the "-1" extension, and Microsoft is not able to understand the path.

Jun 11, 2014 2:58 PM in response to ElisabethBraut

In Finder 'File > Get info…' and see where is the '-1' path mounted?


If it is inside /Volumes see if there is another folder by listing /Volumes in Terminal.

ls -l /Volumes


Do the same if it is /Network or elsewhere.

ls -l /Network


Is there another folder, symlink or alias with the non'-1' name?


Have you considered renaming the share on the server - if it no longer conflicts with something that exists it should work correctly? If it continues to fail in the same way you know something else is also mounting that volume.

If you are mounting the same disk with multiple users you will keep having this issue.


The mount command should be able to list what is mounted. In Terminal try…

mount

Post the output here (redact anything you don't want on the internet).

Jun 11, 2014 11:57 PM in response to Drew Reece

Hi Drew,


Thank you for trying to help me.

The path is mounted in /Volumes. The anme of the Volume should be "Felles"

Here are the results of the terminal commands when the Volume is mounted:


iMac:~ elisabeth$ ls -l /Volumes

total 40

drwx------ 1 elisabeth staff 16384 Jun 11 15:02 Felles-1

lrwxr-xr-x 1 root admin 1 Jun 11 19:00 Macintosh HD -> /


iMac:~ elisabeth$ mount

/dev/disk0s2 on / (hfs, local, journaled)

devfs on /dev (devfs, local, nobrowse)

map -hosts on /net (autofs, nosuid, automounted, nobrowse)

map auto_home on /home (autofs, automounted, nobrowse)

//elisabeth@jupiter/Felles on /Volumes/Felles-1 (smbfs, nodev, nosuid, mounted by elisabeth)

iMac:~ elisabeth$


And here are the results when the volume is not mounted:


iMac:~ elisabeth$ ls -l /Volumes

ls: Felles: Permission denied

total 8

lrwxr-xr-x 1 root admin 1 Jun 11 19:00 Macintosh HD -> /


iMac:~ elisabeth$ mount

/dev/disk0s2 on / (hfs, local, journaled)

devfs on /dev (devfs, local, nobrowse)

map -hosts on /net (autofs, nosuid, automounted, nobrowse)

map auto_home on /home (autofs, automounted, nobrowse)

//elisabeth@jupiter/Felles on /Volumes/Felles (smbfs, nobrowse)

iMac:~ elisabeth$


I use a little app called EasyFind for searching for invisible files. A good while ago I discovered that there is a file called Felles that only seems to exist when the volume is not mounted. But when I tried to delete it, I ended up erasing the whole network drive. Thankfully we have had backups.


So how can I get rid of this
//elisabeth@jupiter/Felles on /Volumes/Felles (smbfs, nobrowse)

without deleting the whole drive???


Best regards from Norway

Jun 12, 2014 7:40 AM in response to ElisabethBraut

It is clear that you have 2 copies of this disk mounted, mount is telling you that one still exists after you think it has been removed.

I expect something else on the system is mounting it, but I don't know what that could be.

ElisabethBraut wrote:


So how can I get rid of this
//elisabeth@jupiter/Felles on /Volumes/Felles (smbfs, nobrowse)

without deleting the whole drive???

If you are not on the network you cannot delete the data on the network drive 🙂


Try the 'Finder Menu > Go > Connect to server…' and try to connect to the 'jupiter' server. This is to make sure it connects via this method.


Disconnect wifi, disconect ethernet, turn off any other way you get a connection to the local network.


Try connecting again the same way (Finder Menu > Go > Connect to server and try to connect to the 'jupiter' server).

If that fails to connect you know the network is unavailable. If you still have a folder in /Volumes/Felles you can consider deleting it.

Network drive volume name for same folder by multiple users

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.