Skip Headers
Oracle® Secure Backup Reference
Release 10.1

Part Number B14236-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

mkdev

Purpose

Use the mkdev command to configure a device for use with Oracle Secure Backup. This command assigns Oracle Secure Backup names and attributes to the devices in your administrative domain.

To be usable by Oracle Secure Backup, each device must have at least one attachment, which describes a data path between a host and the device itself. In the attachment, you identify a host to which the device is connected and a raw device name through which it is accessed.

See Also:

Prerequisites

You must have the modify administrative domain's configuration right to use the mkdev command.

You should disable any system software that scans and opens arbitrary SCSI targets before configuring Oracle Secure Backup tape devices. If Oracle Secure Backup has to contend with other system software (such as monitoring software) for access to tape libraries and drives, then unexpected behavior can result.

Syntax

Syntax 1

Use the following syntax to configure a tape drive. See "Semantics for Syntax 1".

mkdev::=

mkd•ev --type/-t tape [ --attach/-a aspec[,aspec]... ]
[ --inservice/-o | --notinservice/-O ] [ --wwn/-W wwn ]
[ --library/-l devicename ] [ --dte/-d dte ] 
[ --blockingfactor/-f bf ] [ --maxblockingfactor/-F maxbf ]
[ --automount/-m { yes | no } ] [ --erate/-e erate ]
[ --current/-T se-spec ] [ --uselist/-u se-range ]
[ --usage/-U duration ] [ --queryfreq/-q query_frequency ]
[ --serial/-N serial-number ] [ --model/-L model-name ]
devicename ...

Syntax 2

Use the following syntax to configure a library. See "Semantics for Syntax 2".

mkdev::=

mkd•ev --type/-t library [ --attach/-a aspec[,aspec]... ]
[ --inservice/-o | --notinservice/-O ] [ --wwn/-W wwn ]
[ --autoclean/-C { yes | no }  ] [ --cleanemptiest/-E { yes | no }  ]
[ --cleaninterval/-i { duration | off } ]
[ --barcodereader/-B { yes | no | default } ]
[ --barcodesrequired/-b { yes | no }  ]
[ --unloadrequired/-Q { yes | no }  ]
[ --serial/-N serial-number ] [ --model/-L model-name ]
devicename ...

Semantics

Semantics for Syntax 1

The following options enable you to configure a tape drive.

--type/-t tape

Specifies the device as a tape drive.

--attach/-a aspec ...

Configures an attachment, which is the physical or logical connection of a device to a host. An attachment is distinct from a device and describes a data path between a host and the device.

Oracle Secure Backup uses attachments to access a device, so a device needs to have at least one attachment to be usable by Oracle Secure Backup. A Fibre Channel-attached tape drive or library often has multiple attachments, one for each host that can directly access it. Refer to "aspec" for a description of the aspec placeholder.

See Also:

Oracle Secure Backup Administrator's Guide to learn more about attachments.
--inservice/-o

Specifies that the tape drive is logically available to Oracle Secure Backup.

--notinservice/-O

Specifies that the tape drive is not logically available to Oracle Secure Backup.

--wwn/-W wwn

Specifies the world-wide name of the device. Refer to "wwn" for an explanation of the wwn placeholder.

--library/-l devicename

Specifies the name of the library in which a tape drive resides.

--dte/-d dte

Specifies the Data Transfer Element (DTE) number of a tape drive within its containing library. DTE is the SCSI-2 name for a tape drive in a library. DTEs are numbered 1 through n and are used to identify drives in a library.

You must specify a dte number if --library is specified. The dte option is not available for standalone tape drives.

--blockingfactor/-f bf

Specifies a blocking factor. A blocking factor determines how many 512-byte records to include in each block of data written to tape. By default, Oracle Secure Backup writes 64K blocks to tape, which is a blocking factor of 128.

--maxblockingfactor/-F maxbf

Specifies a maximum blocking factor. The maximum blocking factor controls the amount of data that Oracle Secure Backup initially reads from a tape whose blocking factor is unknown.

The largest value permitted for the maximum blocking factor, which is the number of 512-byte records for each physical tape block, is 4096. This value represents a maximum tape block size of 2MB. This maximum is subject to device and operating system limitations that can reduce this maximum block size.

--automount/-m { yes | no }

Sets the automount mode. The mount mode indicates the way in which Oracle Secure Backup can use a volume physically loaded into a tape drive (see the description of "mountdev").

A value of yes (default) instructs Oracle Secure Backup to mount tapes for backup and restore operations without operator intervention. If this option is set to no, then you must manually mount volumes before they are usable.

A setting of no can be useful if you dedicate a tape drive to performing on-demand restore operations, but not backups. If automount is set to yes for this drive when a backup is scheduled, and if the drive contains an unmounted, eligible tape, then Oracle Secure Backup uses the drive for the backup.

--erate/-e erate

Specifies the error rate percentage. The error rate is the number of recovered errors divided by the total blocks written, multiplied by 100. Oracle Secure Backup issues a warning if the error rate reported by the device exceeds the value you specify. The default is 8.

Oracle Secure Backup issues a warning if it encounters a SCSI error when trying to read or reset the error counters of the drive. Some drives do not support the SCSI commands necessary to perform these operations. To avoid these warnings, disable error rate checking by specifying none for the error rate.

--current/-T se-spec

Specifies the number of a storage element. This option only applies to a drive when the following criteria are met:

  • The drive is in a library.

  • The drive is known to be loaded with a tape.

  • The hardware cannot determine from which storage element the drive was loaded.

Refer to "se-spec" for a description of the se-spec placeholder.

--uselist/-u se-range

Specifies a range of storage elements that can be used by the device. This option only applies to a tape drive contained in a library.

By default, Oracle Secure Backup allows all tapes in a library to be accessed by all drives in the library. For libraries containing multiple drives in which more than one drive performs backups concurrently, you may want to partition the use of the tapes.

For example, you may want the tapes in the first half of the storage elements to be available to the first drive and those in the second half to be available to the second drive. Alternatively, you may want to set up different use lists for different types of backups on a single drive.

Refer to "se-range" for a description of the se-range placeholder.

--usage/-U duration

Specifies the interval for a cleaning cycle. For example, --usage 1month requests a cleaning cycle every month. Refer to "duration" for a description of the duration placeholder.

You can specify the --usage option on the chdev command to initialize the configured interval to reflect the amount of time that the drive has been used since the last cleaning. For example, specify --usage 1week on the chdev command to indicate that the most recent cleaning was a week ago.

--queryfreq/-q kb

Specifies the query frequency in terms of kb, which is the "distance" between samplings of the tape position expressed in 1KB blocks. The maximum allowed query frequency is 1048576 (1MB), which is a query frequency of 1GB. A query frequency of 0 disables position sampling.

During a backup, Oracle Secure Backup periodically samples the position of the tape. obtar saves this position information in the Oracle Secure Backup catalog to speed up restore operations. For some devices, however, this sampling can degrade backup performance. While Oracle Secure Backup has attempted to determine optimal query frequencies for all supported drive types, you may find that you need to adjust the query frequency.

--serial/-N serial-number

Specifies the serial number for the tape device.

--model/-L model-name

Specifies the model name for the tape device.

devicename ...

Specifies the name of the tape drive to be configured. If an attachment is specified, only one devicename is allowed. Refer to "devicename" for the rules governing device names.

Semantics for Syntax 2

The following options enable you to configure a library. See "Semantics for Syntax 1" for identical options not listed here.

--type/-t library

Specifies the device as a library.

--autoclean/-C { yes | no }

Specifies whether automatic tape cleaning should be enabled. A cleaning cycle is initiated either when a drive reports that it needs cleaning or when a specified usage time has elapsed.

Oracle Secure Backup checks for cleaning requirements when a cartridge is either loaded into or unloaded from a drive. If at that time a cleaning is required, then Oracle Secure Backup performs the following steps:

  1. Loads a cleaning cartridge

  2. Waits for the cleaning cycle to complete

  3. Replaces the cleaning cartridge in its original storage element

  4. Continues with the requested load or unload

Note that you can execute the clean command to clean a drive manually.

--cleanemptiest/-E { yes | no }

Specifies which cleaning tape to use. This option is useful when a library contains multiple cleaning tapes.

The default value of yes specifies the emptiest cleaning tape, which causes cleaning tapes to round robin as cleanings are required.

The no value specifies that obtool should use the least used cleaning tape, which uses each cleaning tape until it is exhausted, then uses the next cleaning tape until it is exhausted, and so forth.

--cleaninterval/-i { duration | off }

Specifies whether there should be a cleaning interval, and if so, the duration of the interval. The default is off. The duration is the interval of time a drive is used before a cleaning cycle begins. Refer to "duration" for a description of the duration placeholder.

If automatic drive cleaning is enabled, then duration indicates the interval between cleaning cycles. For drives that do not report cleaning requirements, you can specify a cleaning interval, for example, 30days.

--barcodereader/-B { yes | no | default }

Specifies whether a barcode reader is present. Many devices report whether they have a barcode reader. For these devices you can specify default. For devices that do not report this information, specify yes or no.

--barcodesrequired/-b { yes | no }

Specifies whether Oracle Secure Backup requires tapes in the library to have readable barcodes. The default is no. If you specify yes, and if a tape in the library does not have a readable barcode, then Oracle Secure Backup refuses to use the tape.

Typically, Oracle Secure Backup does not discriminate between tapes with readable barcodes and those without. This policy ensures that Oracle Secure Backup can always solicit a tape needed for restore by using both the barcode and the volume ID.

--unloadrequired/-Q { yes | no }

Specifies whether an unload operation is required before moving a tape from a drive to a storage element. Typically, you should leave this option set to default of yes, which means the value comes from the external device table ob_drives. If you encounter difficulties, however, particularly timeouts waiting for offline while unloading a drive, set the value to no.

--serial/-N serial-number

Specifies the serial number for the tape device.

--model/-L model-name

Specifies the model name for the tape device.

devicename ...

Specifies the name of the library to be configured. If an attachment is specified, only one devicename is allowed. Refer to "devicename" for the rules governing device names.

Example

Example 2-81 configures a tape drive.

Example 2-81 Configuring a Tape Drive

ob> lsdev
library    lib1             in service
  drive 1  tape1            in service
library    lib2             in service
  drive 1  tape2            in service
ob> mkdev --type tape --inservice --library lib1 --erate 8 --dte 2
--blockingfactor 128 --uselist 1 --usage 4minute --automount yes hptape
ob> lsdev
library    lib1             in service
  drive 1  tape1            in service
  drive 2  hptape           in service
library    lib2             in service
  drive 1  tape2            in service

Example 2-81 configures a tape library.

Example 2-82 Configuring a Tape Library

ob> mkdev --type library --inservice --barcodereader yes --barcodesrequired yes
--autoclean no --cleanemptiest no hplib1