Solaris Handbook for Sun Peripherals

How Solaris Manages CD-ROM and Diskette Devices

This section describes how CD-ROM and diskette devices are managed by the Solaris operating environment.

Volume Management

Volume Management is a program in the operating system that automates the administration of your CD-ROMs and diskettes. For example, in previous Solaris releases (Solaris 2.1 or earlier), to mount and access data on a CD-ROM you had to perform many administrative steps (refer to ""Comparing Automatic and Manual Mounting"""Comparing Automatic and Manual Mounting").

In the Solaris operating environment, Volume Management automatically mounts CD-ROMs and diskettes with file systems at /cdrom/cdrom_name and /floppy/floppy_name respectively. It also keeps track of CD-ROM and diskette file systems during a workstation session (rebooting will clear the in-memory database). To view the media that has been inserted during a workstation session, list /vol/dsk:


% ls /vol/dsk
supp_sol_2_7_smcc
unnamed_cdrom				unnamed_floppy

Volume Management uses the configuration file /etc/vold.conf to determine which devices it manages. The default /etc/vold.conf file contains the following information:


# @(#)vold.conf 1.13     92/10/28 SMI
#
# Volume Daemon Configuration file
#

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

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

# Devices to use
use cdrom drive /dev/dsk/c0t6 dev_cdrom.so cdrom0
use floppy drive /dev/fd0 dev_floppy.so floppy0

# Actions
insert /vol*/dev/fd[0-9]/* user=root /usr/sbin/rmm
insert /vol*/dev/dsk/* user=root /usr/sbin/rmm
eject /vol*/dev/fd[0-9]/* user=root /usr/sbin/rmm
eject /vol*/dev/dsk/* user=root /usr/sbin/rmm
notify /vol*/rdsk/* group=tty /usr/lib/vold/volmissing -c

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

Before you add secondary CD-ROM and diskette drives to a system, update the /etc/vold.conf file by adding the new devices to the "Devices to use" list. The syntax for a "Devices to use" entry is:


use device type special shared_object symname options

Each variable item in the device control line is defined in Table 4-3.

Table 4-3 Device Control Syntax Descriptions

Syntax  

Description 

Supported and Default Values 

device

The type of removable media device to be used 

cdrom, diskette

type

The class of device: multiple or single media support 

drive

special

Path name of the device to be used. Path usually begins with /dev

Default support is for the devices /dev/dsk/c0t6 and /dev/diskette

shared_object

The location of the code that manages this device 

The default location is /usr/lib/vold/name_ of_shared_object

symname

The symbolic name that refers to this device; the symname is placed in the device directory, either /cdrom or /floppy

Default values are 

cdrom0, floppy0

options

The user, group, and mode permissions for the media inserted 

Default values are user=nobody, group=nobody, mode=0666

After updating the /etc/vold.conf file, attach the drive and reboot your system with a reconfiguration boot.


  1. Note -

    For information on booting your system in different modes, see "To Boot After Connecting a Peripheral Device"."



Note -

Volume Management controls the /dev/dsk/c0t6d0s0 path to a CD-ROM drive and the /dev/diskette path to a diskette drive. An attempt to access a CD-ROM or diskette using these paths will result in an error message.



Note -

For more information about Volume Management, see man Pages(4): File Formats and the System Administration Guide.


Comparing Automatic and Manual Mounting

Figure 4-1 compares the steps for manual mounting (without Volume Management) and automatic mounting (with Volume Management). Volume Management performs many of the tasks previously required to manually mount and work with CDs and diskettes.

Figure 4-1 Comparison of Manual and Automatic Mounting

Graphic

Reference Material for CD-ROM and Diskette Devices

CD-ROM and diskette file systems are mounted in default locations by Volume Management when the media is inserted. See Table 4-4 for more information. These mount points are only created and mounted if a file system is already resident on the diskette.

Table 4-4 CD-ROM and Diskette File System Mount Points

Media type 

Mount location 

State of media 

Diskette 

/floppy/floppy0

Symbolic link to mounted diskette in local diskette drive 

 

/floppy/floppy_name

Mounted named diskette 

 

/floppy/unnamed_floppy

Mounted unnamed diskette 

CD-ROM 

/cdrom/cdrom0

Symbolic link to mounted CD-ROM in local CD-ROM drive 

 

/cdrom/CD-ROM_name

Mounted named CD-ROM  

 

/cdrom/CD-ROM_name/partition

Mounted named CD-ROM with partitioned file system 

 

/cdrom/unnamed_cdrom

Mounted unnamed CD-ROM  

To inform Volume Management that a diskette with a file system has been inserted into the drive, use volcheck(1). You do not need to use this command if you are going to use fdformat(1) or eject(1).


Note -

For more information about these commands, see man Pages(1): User Commands and the System Administration Guide.


If no file system exists on the media, Volume Management provides block and character devices in the /vol file system. See Table 4-5 for the location of diskette and CD-ROM media in the /vol file system.


Note -

All releases provide a symbolic link in /vol/dev/aliases.


Table 4-5 CD-ROM and Diskette Device Locations in /vol With No File System Present

Media Type 

Device Location:  

State of Media 

Diskette 

/vol/dev/diskette0/unnamed_floppy

Formatted unnamed diskette--block device access 

 

/vol/dev/rdiskette0/unnamed_floppy

Formatted unnamed diskette--raw device access 

 

/vol/dev/diskette0/unlabeled

Unlabeled diskette--block device access 

 

/vol/dev/rdiskette0/unlabeled

Unlabeled diskette--raw device access 

CD-ROM 

/vol/dev/dsk/c0t6/unnamed_cdrom

CD-ROM--block device access 

 

/vol/dev/rdsk/c0t6/unnamed_cdrom

CD-ROM--raw device access 

Using CDs and Diskettes

Table 4-6 shows the various tasks you can perform using CDs and diskettes. See the System Administration Guide, for details.

Table 4-6 What You Can Do With CDs and Diskettes

Media Type 

Task 

Available with File Manager? 

Available through Command Line? 

CD 

Load a CD 

Yes 

Yes 

Examine the contents of a CD 

Yes 

Yes 

Copy information from a CD 

Yes 

Yes 

Find out if a CD is still in use 

No 

Yes 

Eject a CD 

Yes 

Yes 

Access CDs on other systems 

No 

Yes 

Make local CDs available to other systems 

No 

Yes 

 

Configure a system to play musical CDs 

No 

Yes 

Stop Volume Management 

No 

Yes 

Restart Volume Management 

No 

Yes 

Diskette 

Format a UFS diskette 

No 

Yes 

Place a UFS file system on a diskette 

No 

Yes 

Format a DOS diskette 

No 

Yes 

Load a diskette 

Yes 

Yes 

Examine the contents of a diskette 

Yes 

Yes 

Copy or move information from a diskette 

Yes 

Yes 

Copy or move information to a diskette 

Yes 

Yes 

Find out if a diskette is still in use 

No 

Yes 

Eject a diskette 

Yes 

Yes 

Access diskettes on other systems 

No 

Yes 

Make local diskettes available to other systems 

No 

Yes