Symptom
A shared disk image volume becomes unavailable to users after you log out of the server.
Solution
Terminology
"Mounting" is the process by which a disk is made available for use in the operating system. For actual disks this occurs automatically at startup in Mac OS X. In the context of a disk image file (.dmg), "mounting" is when the file is made to behave as if it were an actual disk. This occurs when you open disk image file or drag it into the Disk Copy window. Disk Copy then "mounts" the image, after which it behaves in the Finder as if it were an actual disk. Though disk images are not literally "ejected," the term is used interchangeably with "unmount".
How to mount a disk image as root
Disk images mounted by a normal user (Admin or non-Admin) are unmounted when that user logs out. If you wish an image to remain mounted so that it may be a shared volume, mount it as the root user.
Follow these steps to mount a disk image as the root user:
1. Log in to the server as an Admin user.
2. Be sure that the disk image you wish to use as root is not already mounted.
3. Place the disk image in your Documents folder.
Note: You may place the image elsewhere, but you would need to adjust the pathname accordingly in Step 5.
4. Open the Terminal application (/Applications/Utilities/).
5. Type: sudo hdid ~/Documents/<disk image file name>
Note: You would replace "<disk image file name>" with the actual name of the disk image. For an image named "Apple.dmg", you would type:
sudo hdid ~/Documents/Apple.dmg
6. Press Return.
7. Enter the Admin user password when prompted, then press Return.
The disk image is mounted as a root user process. It is not unmounted when you log out.
Note: If you log in to the server as the root user at a later time, any disk images you opened as root user processes are unmounted when you log out. You would need to repeat these steps to make the images available when log in as your Admin user.
How to unmount a disk image as Admin
While logged in as your normal Admin user, you may use these steps to unmount a disk image that has been mounted as root.
1. Open the Terminal (/Applications/Utilities/).
2. At the prompt, type: mount
3. Press Return. This shows you a list of mounted disks and disk images. Each line represents one mounted disk and contains two components separated by the word "on". Preceding "on" is a device name reference, and following "on" is the pathname of the mounted disk as it would appear in the Finder. Following the pathname component is a parenthetical description of its state, which you may ignore. For a mounted disk image named "apple.dmg" that is stored on the server's startup volume, the list output could be:
/dev/disk1/ on /Volumes/apple (local, nodev, nosuid, read-only)
In this example, the device name would be:
/dev/disk1
Note that the second solidus (slash) that appears in the original output is not part of the device name.
4. Locate the line that contains the name of the disk image you wish to unmount.
5. Type: sudo hdiutil eject <device_name>
Using the example device name above, what you should type would look like this:
sudo hdiutil eject /dev/disk1
6. Press Return.
7. Enter your Admin user password when prompted, and press Return.