Solaris 2.5.1 Handbook for SMCC Peripherals
  Buscar sólo este libro
Descargar este libro en PDF

Setting Up Removable Media Devices

4

This chapter describes how to configure removable media devices using the Solaris 2.5.1 operating environment. Devices commonly referred to as removable media devices include:
  • CD-ROM drives
  • Diskette drives
  • PCMCIA memory cards
This chapter contains the following information:
Requirements you must performpage 48
Adding a CD-ROM Drive to your systempage 49
Adding an Additional CD-ROM Drive to your systempage 50
Adding a Diskette Drive to your systempage 51
Formatting a PCMCIA Memory Cardpage 52
Using Volume Managementpage 55
Mounting CDs and diskettespage 58
CD-ROM and diskette device reference materialpage 59
What you can do with CDs and diskettespage 61

Requirements

Before you start to configure the operating environment for a new CD-ROM, diskette drive, or PCMCIA memory card, you must:

Note - If you did not follow the procedures in "Shutting Down the System" on page 3, the operating system may not recognize the new removable media device.

CD-ROM Drives

CD-ROMs provide large data capacity and have quickly become today's medium of choice for software distribution. CD-ROM drives allow you to add both operating system and application packages quickly and easily to the workstations you administer.

Text Box(504x81)

· Adding a CD-ROM Drive

Text Box(504x61)

Text Box(504x33)



Note - If you have more than one SCSI device, you must set each SCSI address switch to a different target ID.

  1. Install the CD-ROM drive.

    For installation information, refer to the documentation that accompanies your hardware.

  2. Turn on the power to all external peripheral devices, this includes the CD-ROM drive that you plan to configure and the system.

    The system is booted and the Solaris 2.5.1 operating environment configures the system by assigning a device address to the CD-ROM drive.

You are now ready to mount the CD-ROM drive. Refer to "How Solaris Manages CD-ROM and Diskette Devices" on page 54.

· Adding an Additional CD-ROM Drive


Note - Be sure that the target number you select is not already used by a peripheral device attached to your system. Use the probe-scsi or probe-scsi-all command to list the existing devices and their addresses. You can connect no more than seven CD-ROM drives to a single SCSI bus provided that the total cable length does not exceed 6 meters.

Text Box(504x55)


  # Devices to use  
  use cdrom drive /dev/dsk/c0t6 dev_cdrom.so cdrom0  
  use cdrom drive /dev/dsk/c0t5 dev_cdrom.so cdrom1  

Example:
In this example, a new entry was added for a CD-ROM drive with a target number of 5. When a CD-ROM containing a file system is inserted into this secondary CD-ROM drive, it is automatically mounted as /cdrom/cdrom1. If the CD-ROM does not contain a file system, it can be accessed at /vol/dev/dsk/c0t5/unnamed_cdrom as a block device.

Text Box(504x33)

  1. Install the additional CD-ROM drive.

    For installation information, refer to the documentation that accompanies your hardware. Turn on the power to all external peripheral devices, this includes the second CD-ROM drive that you plan to configure and the system.

    The system is booted and the Solaris 2.5.1 operating environment configures the system by assigning a device address to the CD-ROM drive.

You are now ready to mount the CD-ROM drive. Refer to "How Solaris Manages CD-ROM and Diskette Devices" on page 54.

Diskette Drives

Diskette drives provide small amounts of data storage and are typically used to transfer files to a non-networked personal computer or to store individual user files.

· Adding a Diskette Drive

Text Box(504x33)

  1. Check that the address switch for the diskette drive has been correctly set.

    Refer to the documentation that accompanies your hardware to set the physical SCSI switch or jumpers on your diskette drive.

  2. Install the diskette drive.

    For installation information, refer to the documentation that accompanies your hardware.

  3. Turn on the power to the system.

    The system automatically boots and configures the new diskette drive.

You are now ready to mount the diskette drive. Refer to "How Solaris Manages CD-ROM and Diskette Devices" on page 54.

PCMCIA Memory Cards

Personal Computer Memory Card International Association (PCMCIA) cards are rugged, credit card-sized, user-installable devices. You can use PCMCIA memory cards in the same way as a diskette, but you can store much larger amounts of data on a PCMCIA memory card.

Text Box(504x71)

· Formatting a PCMCIA Memory Card

Before using a PCMCIA memory card, you may need to format it. Use the fdformat utility to format diskettes and PCMCIA memory cards.

CAUTION Caution - Formatting deletes any data that may already be resident on a PCMCIA memory card. (See Table 4-1.)

* Format the PCMCIA memory card using the fdformat command:

  % fdformat option device_name  

Table 4-1 lists the available options for the fdformat utility.
Table 4-1 fdformat
OptionDescription
-UUnmounts the PCMCIA memory card
-dInstalls an MS-DOS file system (UNIX file system is the default)
-fDoes not display confirmation messages before starting to format
-qDisables print status messages
-xInstalls a Solaris label or an MS-DOS file system; it does not format the PCMCIA memory card
-b labelSpecifies a UNIX or MS-DOS label on a PCMCIA memory card
-t dosInstalls an MS-DOS file system (UNIX file system is the default)
-B filenameInstalls a special boot loader

Note - There is no option in the fdformat utility for installing a NEC-DOS file system on a PCMCIA memory card.

If you want to format a PCMCIA memory card, you must specify a device name for the PCMCIA memory card. Otherwise, the fdformat utility automatically specifies the diskette drive as the default device.
The format for a device name of a PCMCIA memory card is /dev/rdsk/cntndnsn or /dev/dsk/cntndnsn. For example, the device name /dev/dsk/c1t6d0s2 represents a PCMCIA SRAM memory card with the logical socket controller number 1, the technology number 6, and the slice number 2.
Table 4-2 lists the available device name options for the fdformat utility.
Table 4-2 fdformat
Device Name OptionDescription
n= a decimal number
cn= controller n
tn= technology region n

0x1 ROM, 0x2 OTPROM, 0x3 EPROM, 0x4 EEPROM, 0x5 FLASH, 0x6 SRAM, 0x7 DRAM

dn= technology region in type n
1 sn= slice n
1. This release supports only one partition on the PCMCIA memory card. Therefore, the partition number sn for the device name must be s2.

How Solaris Manages CD-ROM and Diskette Devices

This section describes how to manage CD-ROM and diskette device information using the Solaris operating environment.
Volume Managementpage 17
Comparing Automatic Versus Manual Mountingpage 34
Reference Material for CD-ROM and Diskette Devicespage 49
Using CDs and Diskettespage 50

Volume Management

Volume Management automates the interaction between you and 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 follow these steps:

  # cd /  
  # mkdir /cdrom  
  # mount -F ufs -o ro /dev/dsk/c0t6d0s2 /cdrom  

If you attempt to follow these instructions while using the Solaris 2.5.1 operating environment, you may see one or both of these messages:

  # mkdir /cdrom  
  mkdir:  Failed to make directory "/cdrom"; File exists  
  # mount -F ufs -o ro /dev/dsk/c0t6d0s0 /cdrom  
  mount: /dev/dsk/c0t6d0s0 is already mounted, /cdrom is busy,  
          or allowable number of mount points exceeded  

You will also see the following messages when you attempt to use the /dev/diskette path to access or eject diskettes:

  % tar cvf /dev/diskette proposal status reviewers  
  tar: cannot open /dev/diskette.  
  % eject /dev/diskette  
  /dev/rdiskette is busy (try /vol name?)  

In the Solaris 2.5.1 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  
  solaris_2_1/     unnamed_cdrom#1  
  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
SyntaxDescriptionSupported and Default Values
deviceThe type of removable media device to be usedcdrom, diskette
typeThe class of device--multiple or single media supportdrive
specialPathname of the device to be used. Path
usually begins with /dev
Default support is for the devices
/dev/dsk/c0t6 and /dev/diskette
shared objectThe location of the code that manages this deviceThe default location is

/usr/lib/vold/name_ of_shared_object

symnameThe symbolic name that refers to this device;
the symname is placed in the device directory,
either /cdrom or /floppy
Default values are
cdrom0, floppy0
optionsThe user, group, and mode permissions for the media insertedDefault 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.

Imported image(504x71)

Text Box(504x92)

Comparing Automatic Versus Manual Mounting

Figure 4-1, below, 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.

Gráfico

Figure 4-1

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
Media typeMount locationState of media
Diskette/floppy/floppy0Symbolic link to mounted diskette in local diskette drive
Diskette/floppy/floppy_nameMounted named diskette
Diskette/floppy/unnamed_floppyMounted unnamed diskette
CD-ROM/cdrom/cdrom0Symbolic link to mounted CD-ROM in local CD-ROM drive
CD-ROM/cdrom/CD-ROM_nameMounted named CD-ROM
CD-ROM/cdrom/CD-ROM_name/partitionMounted named CD-ROM with partitioned file system
CD-ROM/cdrom/unnamed_cdromMounted unnamed CD-ROM

Text Box(504x78)

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 /vol
Media TypeDevice Location: Solaris 2.2State of Media
Diskette/vol/dev/fd0/unnamed_floppyFormatted unnamed diskette--block device access
Diskette/vol/dev/rfd0/unnamed_floppyFormatted unnamed diskette--raw device access
Diskette/vol/dev/fd0/unlabeledUnlabeled diskette--block device access
Diskette/vol/dev/rfd0/unlabeledUnlabeled diskette--raw device access
CD-ROM/vol/dev/dsk/c0t6/unnamed_cdromCD-ROM--block device access
CD-ROM/vol/dev/rdsk/c0t6/unnamed_cdromCD-ROM--raw device access
Media TypeDevice Location: Solaris 2.3 or higherState of Media
Diskette/vol/dev/diskette0/unnamed_floppyFormatted unnamed diskette--block device access
Diskette/vol/dev/rdiskette0/unnamed_floppyFormatted unnamed diskette--raw device access
Diskette/vol/dev/diskette0/unlabeledUnlabeled diskette--block device access
Diskette/vol/dev/rdiskette0/unlabeledUnlabeled diskette--raw device access
CD-ROM/vol/dev/dsk/c0t6/unnamed_cdromCD-ROM--block device access
CD-ROM/vol/dev/rdsk/c0t6/unnamed_cdromCD-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, Volume I, for details.
Table 4-6
Media TypeTaskAvailable with File Manager?Available through Command Line?
CD· How to load a CDYesYes
· How to examine the contents of a CDYesYes
· How to copy information from a CDYesYes
· How to find out if a CD is still in useNoYes
· How to eject a CDYesYes
· How to access CDs on other systemsNoYes
· How to make local CDs available to other systemsNoYes
· How to configure a system to play musical CDsNoYes
· How to stop Volume ManagementNoYes
· How to restart Volume ManagementNoYes
Diskette· How to format a UFS disketteNoYes
· How to place a UFS file system on a disketteNoYes
· How to format a DOS disketteNoYes
· How to load a disketteYesYes
· How to examine the contents of a disketteYesYes
· How to copy or move information from a disketteYesYes
· How to copy or move information to a disketteYesYes
· How to find out if a diskette is still in useNoYes
· How to eject a disketteYesYes
· How to access diskettes on other systemsNoYes
· How to make local diskettes available to other systemsNoYes