Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
  Phone
  252-431-0050
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

    Privacy Policy

 

 
 

Cleaning a Tape Drive using Oracle Secure Backup

Article by author Jeff Hunter

Oracle Secure Backup (OSB) provides a reliable, centralized tape backup management solution which can be used to protect file system data as well as Oracle Database files. For Oracle Recovery Manager (RMAN) users, the Oracle Secure Backup SBT interface enables you to use the RMAN to back up and restore Oracle Database files to and from tape. Oracle Secure Backup supports nearly all tape drives and tape libraries in Storage Area Network (SAN) and Small Computer System Interface (SCSI) environments.

Oracle Secure Backup provides the ability to perform automatic tape drive cleaning as well as the option to manually clean a tape drive. The following article provides a brief overview of the tape cleaning functionality built into OSB.

After importing a cleaning cartridge to the tape library, you need to inform OSB that the media just inserted is not a data volume but rather a cleaning tape. Inserting a cleaning cartridge and performing an inventory through OSB while not indicating to OSB that a cleaning cartridge was inserted will result in OSB thinking the new media is a normal data tape. If you were to attempt a tape cleaning operation, the following errors would occur:

ob> clean --drive tape1 --force --use 8
Error: can't execute command - specified element does not hold a cleaning tape
 
ob> clean --drive tape1 --force
Error: can't execute command - could not find a usable cleaning tape

Import the cleaning cartridge into a vacant storage element (i.e. storage element 8). Next, notify OSB of the newly imported cleaning cartridge, using the insertvol command. In my example, I already used the cleaning tape once on another drive so I indicate --uses 1

ob> insertvol --library lib1 clean --uses 1 --maxuses 15 8
    

Manually Cleaning a Tape Drive

Use the clean command in obtool to request a manual cleaning be performed on the selected tape drive. The --force option will force the tape to be cleaned. If there is a tape loaded in the tape drive, then selecting this option unloads the tape, loads the cleaning tape, cleans the tape drive, and then reloads the tape that was originally in the tape drive.

Import the cleaning cartridge into a vacant storage element (i.e. storage element 8). In my example, I already used the cleaning tape once on another drive so I indicate --uses 1

ob> insertvol --library lib1 clean --uses 1 --maxuses 15 8
 
ob> lsvol --library lib1
Inventory of library lib1:
in 1: volume RMAN-TESTDB1-MF-000006, 83909632 kb remaining, content manages reuse
in 2: volume RMAN-TESTDB1-MF-000004, 87050240 kb remaining, content manages reuse
in 3: occupied
in 4: occupied
in 5: occupied
in 6: occupied
in 7: occupied
in 8: cleaning tape: 1 use, 14 remaining
 
ob> clean --drive tape1 --force --use 8
 
ob> lsvol --library lib1
Inventory of library lib1:
in 1: volume RMAN-TESTDB1-MF-000006, 83909632 kb remaining, content manages reuse
in 2: volume RMAN-TESTDB1-MF-000004, 87050240 kb remaining, content manages reuse
in 3: occupied
in 4: occupied
in 5: occupied
in 6: occupied
in 7: occupied
in 8: cleaning tape: 2 uses, 13 remaining

Configuring Automatic Tape Drive Cleaning

Oracle Secure Backup allows you to configure a tape library to automatically perform a type drive cleaning whenever a tape drive reports that it needs cleaning or when a specified usage time has elapsed.

Use the --autoclean option of the mkdev or chdev commands of obtool to configure the library to perform automatic cleaning. When the autoclean option is set to yes, the cleaning cycle is initiated either when a tape 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 tape 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

The following example queries the tape library configuration for lib1. As you can see, the autoclean option is not currently set:

ob> lsdev --type library --long lib1
lib1:
    Device type:            library
    Model:                  [none]
    Serial number:          [none]
    In service:             yes
    Debug mode:             no
    Barcode reader:         default (hardware-selected)
    Barcodes required:      no
    Auto clean:             no
    Clean interval:         (not set)
    Clean using emptiest:   no
    Ejection type:          auto
    Min writable volumes:   0
    UUID:                   89064982-0df2-102c-8f89-00146cc1a7c7
    Attachment 1:
        Host:               packmule
        Raw device:         /dev/sg0

To enable automatic tape drive cleaning, use the chdev option:

ob> chdev --type library --autoclean yes --cleanemptiest no lib1
    

Another query on the tape library device shows that auto-cleaning is enabled:

ob> lsdev --type library --long lib1
lib1:
    Device type:            library
    Model:                  [none]
    Serial number:          [none]
    In service:             yes
    Debug mode:             no
    Barcode reader:         default (hardware-selected)
    Barcodes required:      no
    Auto clean:             yes
    Clean interval:         (not set)
    Clean using emptiest:   no
    Ejection type:          auto
    Min writable volumes:   0
    UUID:                   89064982-0df2-102c-8f89-00146cc1a7c7
    Attachment 1:
        Host:               packmule
        Raw device:         /dev/sg0

In addition to simply enabling auto-cleaning, OSB allows you to specify two other options:

--cleanemptiest/-E {yes | no}

Specifies which cleaning tape to use. This option is useful when a tape 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 tape drive is used before a cleaning cycle begins. If automatic tape drive cleaning is enabled, then duration indicates the interval between cleaning cycles. For tape drives that do not report cleaning requirements, you can specify a cleaning interval, for example, 30days.

 

   

 Copyright © 1996 -2011 by Burleson Enterprises. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks