Mac OS X Server: How to Keep Shared Disk Images Mounted

Disk images are unmounted (or "ejected") when you log out of Mac OS X Server. This document explains how to keep the images mounted after the Admin user logs out.
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:

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.
Published Date: Feb 20, 2012