内に含ま
その他のドキュメント
サポート リソース
| PDF 文書ファイルをダウンロードする
Setting Up a Tape Drive
3
- Be sure to read the requirements before you start to configure the operating system for a new tape drive.
Requirements
- Before you start to configure the operating environment for a new tape drive, you must have:
-
- Installed the Solaris 2.3.2 operating environment
- Shut down the system and those peripherals that are already connected as described in Chapter 1, "Before You Start"
-
Note - If you did not follow the procedures as described in Chapter 1, "Before You Start," the operating system may not recognize the presence of the new tape drive.
-
-
Note - If you are installing a third-party SCSI tape drive, refer to the st(7) man page for information on how to specify tape drive configuration data.
- Information on how device addresses are assigned is shown in Table 3-1.
div>
Configuring the System
- When you boot the system after adding a tape drive, the Solaris 2.3.2 operating environment automatically configures the system by assigning a device address to a tape drive if:
-
- SCSI switch or jumper settings are correctly set
- Operating environment has been properly shut down as described in Chapter 1, "Before You Start."
- To configure the system for the addition of a tape drive:
-
-
Note the address that is assigned to the tape drive.
Refer to Table 3-1 to see how the SCSI address switch or jumper settings determine the device address that is assigned. You should already have correctly set the physical SCSI switch or jumpers on your tape drive, as described in your tape drive installation manual and Chapter 6, "Selecting Addresses." For example, the SCSI address switch for tape drives is typically preset by the factory to SCSI target ID 4. If you have more than one external tape drive, you must set the SCSI address switch of the second external tape drive to an address other than SCSI target ID 4. Set the SCSI address switch of the second external tape drive to SCSI target ID 5.
-
Note - If you have more than one SCSI device, such as tape drive, you must set each SCSI address switch to a different target ID.
-
-
Turn on power to all external peripheral devices, including the tape drive that you plan to configure, and then the system.
The system automatically boots and configures the new drive.
-
Caution - Since each tape drive must have a unique SCSI target ID setting, the SCSI address switches on your tape drives may need to be set to different numbers than those shown in Table 3-1. For further information on device addresses, go to Chapter 6, "Selecting Addresses" in this handbook.
- You can connect any number of tape drives to a single SCSI bus provided that the total cable length does not exceed 6 meter and SCSI addresses are available.
-
Table 3-1
| Tape Drives | SCSI Address Switch or Jumper Setting (Target ID) | Device Address for Built-In SCSI Support1 |
| First external tape drive | 4 | /dev/rmt/0u
or /dev/rmt/0c
or /dev/rmt/0h
or /dev/rmt/0m
or /dev/rmt/0l
or /dev/rmt/0 |
| Second external tape drive | 5 | /dev/rmt/1u
or /dev/rmt/1c
or /dev/rmt/1h
or /dev/rmt/1m
or /dev/rmt/1l
or /dev/rmt/1 |
- 1. You can add up to six devices.
- This completes the tasks required to set up your tape drive.
- You can now use the tape drive to:
-
- Tension a tape (applicable only to 1/4" tape cartridges)
- Back up data files and file systems or partitions
Tensioning a Tape Cartridge
- When you insert a blank tape cartridge into a 1/4" tape drive, you should perform a tensioning pass. This procedure runs the tape from one end to the other and ensures an even distribution of tension throughout the new tape.
-
Note - Do not run a tensioning pass on a Digital Data Storage (DDS) device, such as the 5.0 Gbyte 4mm DDS tape drive.
- To run a tensioning pass:
-
-
Insert the new blank tape cartridge into the tape drive.
-
Type
-
% mt -f /dev/rmt/unit number retension
|
-
and press Return.
Rewinding a Tape
- To rewind a tape:
-
-
Type
-
% mt -f /dev/rmt/unit number rewind
|
Backup Tools
- To back up data files and file systems or partitions on a tape cartridge, use any of the following commands:
-
-
cpio
-
dd
-
ufsdump
-
ufsrestore
-
tar
- For an explanation of each command, its options and arguments, refer to the sections that follow or to the on-line man pages. Although you can use any of these commands, you may want to use the ufsdump and ufsrestore commands because they are easy to use.
- Before you can use these commands, you need to find out whether the tape is ready to receive data by displaying the status of the tape drive.
-
Note - If you have a 5.0 Gbyte 4mm DDS device, use a blocking factor of 96 instead of the default factor of 20 to optimize performance. The blocking factor of 96 translates to 48 Kbytes per transfer.
- For the 150 Mbyte 1/4-inch tape drive, the 2.3 Gbyte 8mm tape drive, the 5.0 Gbyte 8mm tape drive, and the Front-Load 1/2-inch tape drive, use a blocking factor of 126 instead of the default factor of 20 to optimize performance
Displaying the Status of a Tape Drive
-
-
Insert the tape into the tape drive.
For instructions on how to insert a tape into your tape drive, refer to the manual that accompanies the tape drive.
-
Enter
-
% mt -f /dev/rmt/0 status
|
- This command looks for and "finds" the tape drive whose device address or device name is /dev/rmt/0. It then displays the status of the tape drive.
-
Note - If you have more than one tape drive connected to your system, you execute the same command but change the device name from dev/rmt/0 to /dev/rmt/1, /dev/rmt/2, etc.
- If the status is displayed as follows, your system is able to access the tape.
-
Archive QIC-150 tape drive:
sense key(0x0)= nosense residual= 0 retries= 0
file no= 0 block no= 0
|
-
sense key= nosense indicates that your system was able to access the tape and there were no errors. You can then use any of the backup commands described in the following sections.
- If he status is displayed as follows after you have just inserted a tape cartridge, your system is not able to access the tape.
-
Archive QIC-150 tape drive:
sense key(0x6)= unit attention residual= 0 retries= 0
file no= 0 block no= 0
|
- In this case, execute the mt -f /dev/rmt/0 status command again until the sense key(0x6)= unit attention advisory message is replaced with the sense key(0x0)= nosense message.
- If the status is displayed as follows, your system is unable to access the tape.
-
/dev/rmt/0: no tape loaded or drive offline
|
- In this case, turn on your tape drive, insert a tape, and then execute the mt -f /dev/rmt/0 status command again.
cpio Command
- The cpio command copies files from a hard disk to a tape as well as from a tape to a hard disk.
- If you need more than one tape to back up files that are resident on your hard disk, use this command. This feature of the cpio command is referred to as multiple-volume interchange.
- If you need to back up only a few files, you can use the tar command or the ufsdump command. The tar command supports only single-volume interchange.
- The following example shows how to copy the files in your working directory called /work and all directories "below" your working directory to a tape drive whose device address or device name is /dev/rmt/0.
-
example# cd /work
example# ls -R | cpio -ocB > /dev/rmt/0
|
- The next example explains how to copy the files that are located on your tape back to your hard disk.
-
example# cd /work
example# cpio -icdB < /dev/rmt/0
|
-
- The c option indicates that header information has been written in ASCII format for portability.
- The d option indicates that as many directories as needed will be created.
- The B option, which you must use whenever you copy files or files systems to and from a tape drive, indicates that the input has a blocking factor of 5120 bytes to the record.
-
Note - You must use the same blocking factor when you retrieve or copy files from the tape to the hard disk as you did when you copied files from the hard disk to the tape. Therefore, you must specify the B option.
dd Command
- This command converts and copies files that have different data formats. The most common usage of this command is to transfer a file system or partition from your hard disk to a tape. You can also use it to copy files from one hard disk to another. If you use a device with a variable block size, you need to make sure that you use the same block size for copying the files from a hard disk to a tape and from a tape to a hard disk.
- The following example shows how to write the file system or partition /user/sunsystem to a 4mm tape drive whose device address or device name is /dev/rmt/0. The blocking factor is 96 in this example. This example has been optimized for a 5.0 Gbyte 4mm DDS device.
-
example# dd if=/user/sunsystem of=/dev/rmt/0 bs=96b
|
ufsdump Command
- The ufsdump command copies a file system that is resident on a hard disk to a tape.
-
Note - This command does not allow you to copy files from different file systems or partitions. All files have to be part of one file system or one partition. If you wish to copy files from different file systems or partitions, use the ufsdump command or the tar command.
- The following example explains how to copy all files that are located on a disk drive in partition /dev/rdsk/c0t3d0s2 to a file (often referred to as a dump file) called /dev/rmt/2c in compressed mode. Compressed mode is supported only by the Digital Audio Tape.
-
example# ufsdump 0ubf 96 /dev/rmt/2c /dev/rdsk/c0t3d0s2
|
-
- The 0 option represents the dump level. A level 0 dump copies the entire file system to a dump file, which in this case is called /dev/rmt/2. You can specify any number between 0 and 9.
- The u option updates the dump record by adding an entry to the file /etc/dumpdates for each file system that has been successfully copied. It updates the /etc/dumpdates file by adding the name of every file system, the date the file system was copied, and the dump level that was specified at that time.
- The b option specifies the blocking factor that is to be used when the files are copied to the tape. The default blocking factor is 20. The blocking factor is 96 in this example. This example has been optimized for a 5.0 Gbyte 4mm DDS device.
-
- The f option specifies the device address or device name of the tape drive, which is /dev/rmt/2 in this example.
-
/dev/rdsk/c0t3d0s2 is the device name or address of the source device where files are located that you want to copy. In this example it is the second partition on the third hard disk that is connected to your system.
ufsrestore Command
- The ufsrestore command copies file systems from a tape to a hard disk. It can only copy file systems that were previously copied from a hard disk to a tape with the ufsdump command.
- The following example explains how to copy all files that are located on a tape drive in the /man directory and whose device address or device name is /dev/rmt/0 to a hard disk. However, you must first go to the directory into which you wish to copy the file systems or partitions before you attempt to retrieve or extract any files. In this example, the directory into which all files systems or partitions will be copied is disk2, and the blocking factor is 96. This example has been optimized for a 5.0Gbyte 4mm DDS device.
-
example# cd /disk2
example# ufsrestore ibf 96 /dev/rmt/0
|
-
Note - You must use the same blocking factor when you retrieve or copy files from the tape to the hard disk as you did when you copied files from the hard disk to the tape. Therefore, you must specify the b option.
- The system responds with a ufsrestore prompt. If you enter a question mark, a list of available arguments is displayed.
-
Available commands are:
ls [arg] - list directory
cd arg - change directory
pwd - print current directory
add [arg] - add 'arg' to list of files to be extracted
delete [arg] - delete 'arg' from list of files to be extracted
extract - extract requested files
setmodes - set modes of requested directories
quit - immediately exit program
what - list dump header information
verbose - toggle verbose flag (useful with "ls")
help or '?' - print this list
IF no 'arg' is supplied, the current directory is used
|
- You can now list the directories that are resident on the tape by entering ls.
-
ufsrestore > ls
4lib/ dict mail openwin spool
5bin games man/ preserve src
adm include/ net pub tmp
|
- You are now ready to select the directories or files by using the add argument.
-
- You can copy the man/ directory from the tape to the hard disk. An asterisk is displayed next to the man/ directory.
-
ufsrestore > ls
4lib/ dict mail openwin spool
5bin games *man/ preserve src
adm include/ net pub tmp
|
- Now you can extract or copy the files located in the man/ directory on the tape.
-
- This completes the extraction or copying of the files in the man/ directory located on the tape.
tar Command
- The tar command copies file systems or individual files from a hard disk to a tape (writing to tape) or from a tape to a hard disk (reading from tape). If you need more than one tape to back up files that are resident on your hard disk, use the cpio command or the ufsdump command. The tar command only supports single-volume interchange.
- The following example explains how to copy files from a hard disk to a tape.
-
example# tar cvbf 96 /dev/rmt/1 filename
|
-
- In this example the tar command copies files to a tape drive whose device name or address is /dev/rmt/1 by using the c option.
· The f option allows you to designate the device name or address of the source drive, which is the tape drive in this example.
· The v option allows the system to display information about each file it copies.
· The b option allows you to designate the blocking factor, which in this example is 96. This example has been optimized for a 5.0 Gbyte 4mm DDS device.
- The next example explains how to copy files from a tape to the current working directory located on a hard disk.
-
example# tar xvbf 96 /dev/rmt/1
|
-
- In this example the tar command copies files to your current working directory located on the hard disk by using the x option.
-
- The f option allows you to designate the device name or address of the destination drive, which are all the files on the tape cartridge in this example.
- The v option allows the system to display information about each file it copies.
- The b option allows you to designate the blocking factor, which in this example is 96. This example has been optimized for a 5.0 Gbyte 4mm DDS device.
-
Note - You must use the same blocking factor when you retrieve or copy files from the tape to the hard disk as you did when you copied files from the hard disk to the tape.
|
|