Previous Table of Contents Next


Volume Management

Starting with the Solaris 2.2 system software, volume management automates mounting of CD-ROMs and diskettes; users no longer need to have superuser permissions to mount a CD-ROM or a diskette.


CAUTION! The Solaris 2.0 and 2.1 procedures for mounting CD-ROMs and diskettes will not work for Solaris 2.2 and later releases. Volume management controls the /dev/dsk/c0t6d0s0 path to a CD-ROM drive and the /dev/diskette path to the diskette drive. If you try to access a CD-ROM or diskette using these paths, an error message is displayed.

Volume management provides users with a standard interface for dealing with diskettes and CD-ROMs. Volume management provides three major benefits:

  Automatically mounting diskettes and CDs simplifies their use.
  Users can access diskettes and CDs without having to become superuser.
  Users on the network can gain automatic access to diskettes and CDs mounted on remote systems.

Mounting devices manually requires the following steps:

1.  Insert media.
2.  Become superuser.
3.  Determine the location of the media device.
4.  Create a mount point.
5.  Make sure you are not in the mount point directory.
6.  Mount the device using the proper mount options.
7.  Exit the superuser account.
8.  Work with files on media.
9.  Become superuser.
10.  Unmount the media device.
11.  Eject media.
12.  Exit the superuser account.

Using volume management requires the following steps:

1.  Insert media.
2.  For diskettes, use the volcheck command.
3.  Work with files on media.
4.  Eject media.

Volume Management Files

Volume management consists of the /usr/sbin/vold volume management daemon, the /etc/vold.conf configuration file used by the vold daemon to determine which devices to manage, the /etc/rmmount.conf file used to configure removable media mounts, and actions in /usr/lib/rmmount. The volume daemon logs messages in the /var/adm/vold.log file.

The default /etc/vold.conf file is shown as:

# @(#)vold.conf 1.21     96/05/10 SMI
#
# Volume Daemon Configuration file
#

# Database to use (must be first)
db db_mem.so

# Labels supported
label dos label_dos.so floppy rmscsi pcmem
label cdrom label_cdrom.so cdrom
label sun label_sun.so floppy rmscsi pcmem

# Devices to use
use cdrom drive /dev/rdsk/c*s2 dev_cdrom.so cdrom%d
use floppy drive /dev/rdiskette[0-9] dev_floppy.so floppy%d
use pcmem drive /dev/rdsk/c*s2 dev_pcmem.so pcmem%d forceload=true
# use rmscsi drive /dev/rdsk/c*s2 dev_rmscsi.so rmscsi%d

# Actions
insert dev/diskette[0-9]/* user=root /usr/sbin/rmmount
insert dev/dsk/* user=root /usr/sbin/rmmount
eject dev/diskette[0-9]/* user=root /usr/sbin/rmmount
eject dev/dsk/* user=root /usr/sbin/rmmount
notify rdsk/* group=tty user=root /usr/lib/vold/volmissing -p

# List of file system types unsafe to eject
unsafe ufs hsfs pcfs

If a system has additional diskette drives, volume management automatically creates two subdirectories in /vol/dev for each additional drive--one to provide access the file systems and the other to provide access to the raw device. For a second diskette drive, volume management creates directories named diskette1 and rdiskette1. For a third diskette drive, it creates directories named diskette2 and rdiskette2 (and so on for additional drives).

If you want additional CD-ROM drives on a system, you must edit the /etc/vold.conf file and add the new devices to the Devices to use list. The syntax for a Devices to use entry is shown as:

use device type special shared-object symname options

Table 3-5 describes each of the fields for the Devices to use syntax.

Table 3-5 Device Control Syntax Descriptions

Field Supported Default Values Description
device cdrom, floppy The removable media device.
type drive The type of device--multiple or single media support.
special /dev/dsk/c0t6 /dev/diskette Pathname of the device to be used in the /dev directory.
shared-object /usr/lib/vold/shared-object-name Location of the code that manages the device.
symname cdrom0, floppy0 The symbolic name that refers to this device. The symname is placed in the device directory either /cdrom or /floppy).
options user=nobody group=nobody mode=0666 The user, group, and mode permissions for the inserted media.


Previous Table of Contents Next