Previous Table of Contents Next


CHAPTER 3
Administering Devices

Using Tapes
Volume Management
Using Diskettes Without Volume Management
Administering Disks
Understanding the Service Access Facility
Setting Up a Bidirectional Modem
Using a Modem

THIS CHAPTER DESCRIBES HOW TO USE TAPES AND DISKETTES TO COPY FILES. It also describes how to use Volume Management to access diskettes and CD-ROMs. You can also find information about devices in the following chapters of this book:

  See Chapter 4, "Administering File Systems," for information about how to back up and restore complete file systems. Chapter 4 also explains disk device names and commands used for administering disks, introduces the Service Access Facility (SAF) -- which you must use to administer terminals, modems, and other network devices with the SunOS 5.x system software -- provides steps for setting up port monitors for print servers and print clients, and provides steps for adding a bidirectional Hayes-compatible modem to a system.
  See Chapter 6, "Administering Printing," for information about administering printers.

Using Tapes

This section describes tape device-naming conventions, useful commands for streaming tape cartridges, and how to use the tar, cpio, and pax commands to archive and retrieve files from tapes.

The tar, cpio, and pax commands can be used to copy files and file systems to tape. The command you choose depends on how much flexibility and precision you require for the copy.

Use tar to copy files and directory subtrees to a single tape. Note that the SunOS 5.x tar command can archive special files ( block and character devices, fifos), but the SunOS 4.x tar command cannot extract them. The cpio command provides better portability.

Use cpio to copy arbitrary sets of files, special files, or file systems that require multiple tape volumes, or when you want to copy files from SunOS 5.x systems to SunOS 4.x systems. The cpio command packs data onto tape more efficiently than tar and skips over any bad spots in a tape when restoring. The cpio command also provides options for writing files with different header formats (tar, ustar, crc, odc, bar) for portability between systems of different types.

Use pax to copy files, special files, or file systems that require multiple tape volumes or when you want to copy files to and from POSIX-compliant systems.

Because tar, cpio, and pax use the raw device, you do not need to format or make a file system on tapes before you use them. The tape drive and device name you use depend on the hardware and configuration for each system.

Tape Device - Naming Conventions

Tape drive-naming conventions use a logical -- not a physical -- device name. Tape drives fall into two categories according to controller type:

  Xylogics 472 for 1/2 -inch rack-mounted (top-loaded) reel-to-reel drives (maximum four units per controller)
  SCSI for 1/4 -inch cartridge, 1/2 -inch front-loaded reel-to-reel, and 4 mm or 8 mm helical scan drives (maximum eight units per controller)

Within the /dev/rmt subdirectory is a single set of tape device files that support different output densities. In general, you specify a tape drive device as shown in Figure 3-1.


Figure 3-1  Tape drive device names.

Specifying the Drive Number Using the Default Density

Normally, you specify a tape drive by its logical unit number, which is a number from 0 to n. If you do not specify a density, the drive writes at its "preferred" density, which is usually the highest density the tape supports.

To specify the first drive, use:

/dev/rmt/Ø

To specify the second drive, use:

/dev/rmt/1


NOTE:  Most device names start their numbering sequence with zero (0). Consequently, when you talk about the first disk or target, its number is 0, not 1.

Specifying Different Densities for a Tape Drive

You may want to transport a tape to a system whose tape drive supports only a certain density. In that case, specify a device name that writes at the desired density. Use this convention:

/dev/rmt/XA

The unit and density characters are shown in Table 3-1. For example, to specify a raw magnetic tape device on the first (0) drive with medium density, use:

/dev/rmt/0m
Table 3-1 Unit and Density Characters in Tape Device Names

Device Name = /dev/rmt/ XA
X Tape drive number (digit) from 0 to n, regardless of controller type
A Density (character), depending on controller and drive type
null Default, preferred (highest) density
l Low
m Medium
h High
u Ultra
c* Compressed


*New in this edition

Specifying the No - Rewind Option

After the command is executed, the tape is automatically rewound unless you specify the no-rewind option as part of the device name. To specify no rewinding, type n at the end of the device name.

For example, to specify a raw magnetic tape device on the first (0) drive with medium density, use:

/dev/rmt/Ømn


Previous Table of Contents Next