Peripherals Administration
  Buscar sólo este libro
Descargar este libro en PDF

CD-ROM and Diskette Drives

3

CD-ROMs provide large data storage capacity and have quickly become the medium of choice for software distribution.
Diskettes provide small amounts of data storage and are often used to transfer files to a non-networked personal computer or to store individual user files.
Software called Volume Management (added in Solaris 2.2) changes the way you administer and obtain access to the data on CD-ROMs and diskettes.
Use the following table to find specific information on administering CD-ROM and diskette drives.
How Solaris Manages CD-ROM and Diskette Drivespage 56
Automatically Sharing CD-ROMs and Diskette File Systemspage 58
How to Add a CD-ROM Drivepage 59
Formatting Diskettes Before Usepage 60
How to Find Out What Media Has Been Insertedpage 60
Troubleshooting Tips for CD-ROMs and Diskette Devicespage 61
Reference Material for CD-ROM and Diskette Devicespage 62

How Solaris Manages CD-ROM and Diskette Drives

A layer of software called Volume Management manages CD-ROM and diskette drives. This software automates the interaction between you and your CD-ROMs and diskettes by automatically mounting CD-ROMs and diskettes that contain file systems.
Table 3-1 lists the changes in locations of CD-ROMs and diskettes from previous releases.
Table 3-1
MediaPre-Solaris 2.2 LocationSolaris 2.2 and After Location
CD-ROM/dev/dsk/c0t6d0s0/cdrom/cdrom_name
/dev/rdsk/c0t6d0s0/vol/dev/aliases/cdrom0
Diskette/dev/diskette/floppy/floppy_name
/dev/rdiskette/vol/dev/aliases/floppy0
If you attempt to use these previous locations while using Solaris 2.2 system software and later releases, you will see the messages listed in Table 3-2.
Table 3-2
If You Attempt to Use Previous Locations...You Will See These New Error Messages...
# mkdir /cdrommkdir: Failed to make directory "/cdrom"; File exists
# mount -F ufs -o ro /dev/dsk/c0t6d0s0 /cdrommount: /dev/dsk/c0t6d0s0 is already mounted, /cdrom is busy, or allowable number of mount points exceeded
% tar cvf /dev/diskette proposal statustar: cannot open /dev/diskette.
% eject /dev/diskette/dev/rdiskette is busy (try /vol name?)

Note - If you are using the Wabi(TM) or SunPC(TM) products, you must use that product's interface for accessing CD-ROMs and diskettes.

Using Diskettes

Before you can access a diskette, Volume Management needs to be informed of the diskette's presence. Use one of the following to do this:
  • Type volcheck and press Return.
  • Select Check For Floppy from the File Menu of File Manager (a DeskSet application).
See the volcheck(1) man page for more information on volcheck. You do not need to use this command if you are going to use the commands fdformat or eject. For more information on formatting diskettes, see the Administration Supplement for Solaris Platforms.

Automatically Sharing CD-ROMs and Diskette File Systems

You can configure Volume Management to automatically share mounted CD-ROM and diskette file systems with other network users. You can specify that any mounted CD-ROM or diskette file system be shared or limit the sharing to a specifically named file system.
To share any of the mounted CD-ROM file systems on your system, add the following lines to the /etc/rmmount.conf file:
    # File system sharing
    share cdrom*

To share a specific CD-ROM file system, indicate the name of the file system:
# File system sharing
share Solaris_2.3*

Here is the /etc/rmmount.conf with the general share option included:

Imported image(498x225)

You can specify any of the share command line options. See share(1M)and rmmount.conf(4) for more information.

Instructions for Adding a CD-ROM

This section includes step-by-step instructions for adding a CD-ROM drive to a system.

Note - You must be superuser to perform the following procedures.

· How to Add a CD-ROM Drive

  1. Create a file called /reconfigure that will be read when the system is booting.


  # touch /reconfigure  

The /reconfigure file will cause the SunOS software to check for the presence of any newly installed peripheral devices when you power on or boot your system later.
  1. Shut down the system.


  # /usr/sbin/shutdown -y -g30 -i0  
  .  
  .  
  .  
  .  
  ok  


Note - The 0 in i0 is a zero.

In the example above, the command sends a message to all users who are logged in stating they have 30 seconds (-g30) before the system begins to shut down. The ok or > prompt is displayed once the operating environment is shut down.
  1. Turn off power to the system after the ok or > prompt is displayed. Refer to the hardware installation guide that accompanies your system for the location of the power switch.

  1. Turn off power to all external peripheral devices.

    For location of power switches on any peripheral devices, refer to the hardware installation guides that accompany your peripheral devices.

  2. Install the peripheral device.

    Refer to the hardware installation guides that accompany the peripheral devices for information on how to install and connect those devices.

  3. Turn on the power to all external peripherals.

  4. Turn on the power to the system.

    The system will boot and you will be shown the login prompt.

Instructions for Using CD-ROM and Diskette Media

Formatting Diskettes Before Use

See the Administration Supplement for Solaris Platforms for information on how to format your diskettes. The procedure varies depending on what type of diskette you use.

· How to Find Out What Media Has Been Inserted

Volume Management keeps track of CD-ROM and diskette file systems during a system session (rebooting will clear the in-memory database).
* To view the media that has been inserted during a system session, list /vol/dsk.

  % ls /vol/dsk  
  solaris_2_1/     unnamed_cdrom#1  
  unnamed_cdrom    unnamed_floppy  

Troubleshooting Tips for CD-ROMs and Diskette Devices

Disabling Volume Management

If you need to disable Volume Management to diagnose system or device problems, use the following procedure:
  1. Rename the /etc/rc2.d/S92volmgt file to stop the automatic startup of Volume Management at run time.

    # mv /etc/rc2.d/S92volmgt /etc/rc2.d/S92volmgt.old

  1. Stop Volume Management.

# /etc/init.d/volmgt stop

Public Domain Programs

Many public domain CD-ROM software programs do not take advantage of Volume Management. To run these programs, you will need to disable Volume Management as described above.

Volume Management Does Not Recognize Media

If you have inserted a CD-ROM or diskette and Volume Management does not recognize the media and mount it (if appropriate), eject and reinsert the media.
If you have a diskette, be sure to issue the volcheck command or choose the Check For Floppy item from the File Manager's File menu after you insert the diskette. These commands instruct Volume Management to check the diskette drive for media.

Problems with Manually Removing Diskettes

Do not remove diskettes manually before issuing the eject(1) command. If you manually remove a diskette without ejecting, any of the following problems can occur:
  • The kernel could panic. If this happens, the system should reboot itself.
  • Volume Management might hang or end up in an unrecoverable state.
In either case, you need to follow this procedure.
  1. Stop Volume Management by typing /etc/init.d/volmgt stop.

  2. Verify that Volume Management stopped by typing ps -e | grep vold.

    If Volume Management is not stopped, you need to reboot your system.

  3. Once Volume Management has stopped, type /etc/init.d/volmgt start.

Reference Material for CD-ROM and Diskette Devices

CD-ROM and diskette file systems are automatically mounted in default locations by Volume Management when the media is inserted. For security reasons, these file system are mounted setuid. See mount(1M) for a description of this and other mount options. See Table 3-3 for mount locations.
Table 3-3
Media TypeMount LocationState of Media
Diskette/floppy/floppynSymbolic link to mounted diskette in a local diskette drive. Examples of locations include /floppy/floppy0 and/floppy/floppy1.
/floppy/floppy_nameMounted named diskette
/floppy/unnamed_floppyMounted unnamed diskette
CD-ROM/cdrom/cdromnSymbolic link to mounted CD-ROM in a local CD-ROM drive. Examples of locations include /cdrom/cdrom0 and/cdrom/cdrom1.
/cdrom/CD-ROM_nameMounted named CD-ROM
/cdrom/CD-ROM_name/partitionMounted named CD-ROM with partitioned file system
/cdrom/unnamed_cdromMounted unnamed CD-ROM
If there is no file system on the media, Volume Management provides block and character devices in the /vol file system. See Table 3-4 for the location of diskette and CD-ROM media in the /vol file system.
Table 3-4 /vol
Media TypeDevice LocationState of Media
Diskette/vol/dev/disketten/unnamed_floppyFormatted unnamed diskette--block device access
/vol/dev/rdisketten/unnamed_floppyFormatted unnamed diskette--raw device access
/vol/dev/disketten/unlabeledUnlabeled diskette--block device access
/vol/dev/rdisketten/unlabeledUnlabeled diskette--raw device access
CD-ROM/vol/dev/dsk/c0tn/unnamed_cdromCD-ROM--block device access
/vol/dev/rdsk/c0tn/unnamed_cdromCD-ROM--raw device access

Volume Management Man Pages

The following man pages describe the components and commands provided by Volume Management.
Table 3-5
Man PageDescription
volcancel(1)cancels user's request for removable media that is not currently in drive
volcheck(1)checks for media in a drive. Default checks all diskette media.
volmissing(1)notifies user that volume requested is not in the CD-ROM or diskette drive
rmmount(1M)removable media mounter that automatically mounts a file system on a CD-ROM and diskette
vold(1M)Volume Management daemon to manage CD-ROM and diskette devices
rmmount.conf(4)removable media mounter configuration file
vold.conf(4)Volume Management configuration file
volfs(7)Volume Management file system