Skip Headers
StorageTek Storage Archive Manager and StorageTek QFS Software Maintenance and Administration Guide
Release 5.4
E42064-02
  Go To Documentation Library
Library
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

5 Managing Libraries, Media, and Drives

This chapter covers the following topics:

Managing Automated Media Libraries

Taking the Library On and Off Line

Take the Library Offline

If you need to stop SAM-QFS operations on only one library or if you need to power down a library, start by taking the library offline as described below:

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. Finish up active archiving and staging jobs and keep any new jobs from starting. See "Idle Archiving and Staging Processes".

  3. Stop drive and library activity. See "Stop Archiving and Staging Processes".

  4. Take the library offline. Use the command samcmd off library-equipment-number, where library-equipment-number is the equipment ordinal number assigned to the library in the /etc/opt/SUNWsamfs/mcf file.

    Placing a library in the off state stops I/O operations and removes the library from the control of the SAM-QFS software. Drives remain in the automated library remain in the on state. In the example, we take library 800 offline and check the result using samcmd c:

    root@solaris:~# samcmd off 800
    root@solaris:~# samcmd c
    Device configuration samcmd     5.4 14:34:04 Mar  7 2014
    samcmd on samqfs1host
    Device configuration:
    ty   eq state   device_name                        fs   family_set
    sn  800 off     /dev/scsi/changer/c1t2d0           800  lib800
    li  801 on      /dev/rmt/0cbn                      800  lib800
    li  802 on      /dev/rmt/1cbn                      800  lib800
    li  803 on      /dev/rmt/2cbn                      800  lib800
    li  804 on      /dev/rmt/3cbn                      800  lib800
    hy  900 on      historian                          900  
    root@solaris:~# 
    
  5. When you are ready, Bring the Library Online.

Bring the Library Online

When a library enters the on state, t

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. Bring the library online. Use the command samcmd on library-equipment-number, where library-equipment-number is the equipment ordinal number assigned to the library in the /etc/opt/SUNWsamfs/mcf file.

    The library comes online. SAM-QFS software queries the device state and updates the catalog as needed. In the example, we bring library 800 online and check the result using samcmd c:

    root@solaris:~# samcmd on 800
    root@solaris:~# samcmd c
    Device configuration samcmd     5.4 15:04:14 Mar  7 2014
    samcmd on samqfs1host
    Device configuration:
    ty   eq state   device_name                        fs   family_set
    sn  800 on      /dev/scsi/changer/c1t2d0           800  lib800
    li  801 on      /dev/rmt/0cbn                      800  lib800
    li  802 on      /dev/rmt/1cbn                      800  lib800
    li  803 on      /dev/rmt/2cbn                      800  lib800
    li  804 on      /dev/rmt/3cbn                      800  lib800
    hy  900 on      historian                          900  
    root@solaris:~# 
    
  3. Stop here.

Importing and Exporting Removable Media

Many automated libraries include a loading bay that lets you add or remove media cartridges without physically entering the library. Depending on the vendor, it may be called the mailbox, mailslot, media access port (MAP), or cartridge access port (CAP). This section describes the SAM-QFS commands that support this type of library:

If your library does not include a mailbox, consult the library vendor's documentation and your local site policies for instructions on adding and removing library media. When the library reinitializes following the change and audits its contents, the SAM-QFS software will update its library and historian catalogs automatically.

Import Removable Media Cartridges

If the library mailbox contains media cartridges when the SAM-QFS software starts, the software automatically loads them into the library. Once the software is running, you can import media from the mailbox at any time using the following procedure:

  1. Place media cartridge(s) in the mailbox according to the library vendor's instructions.

  2. Log in to the file system host as root.

    root@solaris:~# 
    
  3. Import the cartridge(s) into the automated library. Use the command samimport library-equipment-number, where library-equipment-number is the equipment ordinal number specified for the library in the /etc/opt/SUNWsamfs/mcf file.

    The SAM-QFS software assigns the media to storage slots and catalogs their locations. In the example, we import media into library 800.

    root@solaris:~# samimport 800
    
  4. Stop here.

Export Removable Media Cartridges

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. If required, add an informational note to the catalog record for a cartridge before exporting it. Use the command chmed -I "note" identifier, where note is a string of up to 128 characters and identifier is either of the following:

    • mediatype.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the six-character, alphanumeric string that uniquely identifies the volume within the library.

    • library-equipment-number:slot, where library-equipment-number is the equipment ordinal number specified for the automated tape library in the /etc/opt/SUNWsamfs/mcf file and slot is the slot address where the cartridge resides within the library.

    The note will be retained in the historian catalog after the volume has been exported. In the example, we add a note to catalog entry for LTO (li) cartridge VOL054:

    root@solaris:~# chmed -I "To vault 20140411" li.VOL054
    
  3. To move a cartridge from a specified storage slot to the mailbox, use the command samexport library-equipment-number:slot, where library-equipment-number is the equipment ordinal number specified for the automated tape library in the /etc/opt/SUNWsamfs/mcf file and slot is the slot address where the cartridge resides within the library.

    In the example, we export the magnetic tape cartridge located in slot 11 of library 800:

    root@solaris:~# samexport 800:11
    
  4. To move a specified cartridge to the mailslot, use the command samexport mediatype.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

    The SAM-QFS software adds the cartridge to the catalog maintained by the SAM-QFS historian. In the example, we export the LTO (li) tape cartridge VOL109:

    root@solaris:~# samexport li.VOL109
    
  5. Remove media cartridge(s) from the mailbox according to the library vendor's instructions.

  6. Stop here.

Maintaining Library Catalogs

SAM-QFS library catalogs are the software's internal representation of the automated library and its contents. If the automated library is direct-attached, the SAM-QFS software has full control over the library and its contents. The SAM-QFS library catalog entries are, accordingly, a one-to-one representation of the slots in the physical library. If the automated library is network-attached, SAM-QFS accesses only the parts of the library that the library software makes available in the form of a virtual library or library partition. So the SAM-QFS library catalog entries reflect only the contents of a portion of the library.

This section explains the following tasks:

View the Library Catalog

  1. To view the most commonly used library catalog information, use the command samcmd v library-equipment-number, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

    In the example, we display the catalog for library 800

    root@solaris:~# samcmd v 800
    Robot catalog samcmd     5.4    16:45:25 Mar 14 2014
    samcmd on samqfshost                         count 32
    Robot VSN catalog by slot       : eq 800
    slot          access time count use  flags         ty vsn
       0     2014/03/14 11:23  875   0%  -il-o-b-----  li VOL001 
       1     2014/03/13 17:54  866   0%  -il-o-b-----  li VOL002 
       2     2014/03/14 11:26    3   0%  -il-o-b-----  li VOL003 
       3     2014/03/14 10:33    3   0%  -il-o-b-----  li VOL004 
       4     2014/03/14 11:34    5   0%  -il-o-b-----  li VOL005 
       5     2014/03/14 11:32    2   0%  -ilEo-b----f  li VOL006 MEDIA ERROR
       6     2014/03/13 18:07    2   0%  -il-o-b-----  li VOL007 
       7     2014/03/13 18:07    1   0%  -il-o-b-----  li VOL008 
       8     2014/03/13 18:07    1   0%  -il-o-b-----  li VOL009 
    ...
      18     2014/03/13 18:16    1   0%  -il-o-b-----  li VOL019 
      19     none               50   0%  -il-oCb-----  li CLN020 
    
  2. To determine the status of a volume using the samcmd v display, examine the entry in the flags column and consult the list below:

    • A means that the slot needs an audit.

    • C means that the slot contains a cleaning cartridge.

    • E means that the volume is bad or the cleaning media has expired.

    • L means that the volume is a Linear Tape File System (LTFS) volume.

    • N means that the volume is foreign media (not in SAM-QFS format).

    • R means that the volume is read-only (a software flag).

    • U means that the volume is unavailable.

    • W means that the volume is physically write-protected.

    • X means that the slot is an export slot.

    • b means that the volume has a bar code.

    • c means that the volume is scheduled for recycling.

    • f means that the archiver found the volume full or corrupted.

    • d means that the volume has a duplicate volume serial number (VSN).

    • l means that the volume is labeled.

    • o means that the slot is occupied.

    • p means that the volume is a high priority volume.

    • - means that the corresponding flag is not set.

  3. To identify the type of media used for a volume using the samcmd v display, consult the ty column and look up the code displayed in Appendix A, "Glossary of Equipment Types" or in the mcf man page.

  4. To list all information in the catalog, use the command dump_cat catalog-path-name, where catalog-path-name is the path and file name of the catalog file, as specified in the /etc/opt/SUNWsamfs/mcf file.

    In the example, we dump the catalog file catalog/800_cat.

    root@solaris:~# dump_cat catalog/800_cat
    # audit_time Wed Dec 31 17:00:00 1969
    # version 530  count 32 mediatype 
    #Index VSN    Barcode  Type PTOC  Access Capacity ...  LVTime LVPos
    #
     0     S00001 S00001L4 li   0x747    875   512000 ...       0   0x3
     1     S00002 S00002L4 li   0x5db    866   512000 ...       0   0x3
    13     S00014 S00014L4 li       0      4   512000 ...       0   0
    17     S00018 S00018L4 li       0      1   512000 ...       0   0
    18     S00003 S00003L4 li       0      3   512000 ...       0   0
    
  5. Stop here.

Audit the Contents of a Library Slot

To update the library catalog with the reported space remaining on a removable media volume, audit the library slot. Use the command auditslot.

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. To audit a specified tape volume, skip to EOD (end of data), and update the space available, use the command auditslot -e library-equipment-number:slot, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library and slot is the location of the cartridge within the library.

    The auditslot command loads the cartridge that contains the volume, reads the label, and updates the library catalog entry for the slot. Note that you cannot interrupt skipping to EOD once you start it, and, under certain conditions, it can take hours to complete. In the example we audit slot 11 in tape library 800:

    root@solaris:~# auditslot -e 800:11
    root@solaris:~# 
    
  3. To audit a specified tape or optical volume, use the command auditslot library-equipment-number:slot[:side], where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library, slot is the location of the cartridge within the library, and side (optional) is the specified side of a two-sided optical disk.

    In the example we audit side 1 of the volume in slot 21 of optical library 700:

    root@solaris:~# auditslot 800:21:1
    root@solaris:~# 
    
  4. Stop here.

Audit the Entire Direct-Attached Automated Library

A full audit loads each cartridge into a drive, reads the label, and updates the library catalog. Audit a library in the following situations:

  • after moving cartridges in the automated library without using SAM-QFS commands

  • when the library catalog may be unreliable (following a power outage, for example)

  • when you have added, removed, or moved cartridges in an automated library that has no mailbox.

To perform a full audit, use the command samcmd audit library-equipment-number, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library.

Note that a full audit can take a long time, depending on the number of slots that contain media.

In the example we audit tape library 800:

root@solaris:~# audit 800
root@solaris:~# 

Clear a Media Error from the Catalog

When SAM-QFS has problems using a removable media cartridge, it sets an error flag on the corresponding catalog entry. The media may be worn, damaged, or, the case of cleaning media, expired, in which case the media should not be reused. But problems accessing media can also result from faults in the drive, in which case the media can be reused without difficulty. In the latter case, you need to clear the error flag for the cartridge.

Be sure that you know the nature of the problem before clearing error flags. Error flags are critical to SAM-QFS operations and to the security of your data. You do not want to clear this flag if a cartridge is actually faulty.

Once you are sure, you can clear the error and try to use the cartridge. Proceed as follows:

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. Check the status of removable media volumes. Use the command samcmd r.

    In the example, the samcmd r command shows that drive 801 has set the error flag on LTO (li) volume VOL004.

    root@solaris:~# samcmd r
    Removable media status: all          samcmd 5.4        17:40:11 Mar 13 2014
    ty   eq  status      act  use  state   vsn
    li  801 -E-------r     0   0%  notrdy  VOL004  MEDIA ERROR
            MEDIA ERROR
    li  802  ---------p    0   0%  notrdy
            empty
    li  803  ---------p    0   0%  notrdy
            empty
    li  804  ---------p    0   0%  notrdy
            empty 
    root@solaris:~# 
    
  3. If the drive that set the error flag is suspect, unload the cartridge and clear the error flag. Use the command samcmd unload drive-number, where drive-number is the equipment-ordinal number specified for the drive in the /etc/opt/SUNWsamfs/mcf file.

    In the example, we unload drive 801:

    root@solaris:~# samcmd unload 801
    
  4. To clear the media error flag for a specified volume serial number and media type, use the command chmed -E media-type.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

    In the example, we clear the error flag on LTO (li) volume VOL004:

    root@solaris:~# chmed -E li.VOL004
       3:0 li VOL004     Ail---b-----    2.3T    2.3T    0          0 800 4  0 //
    root@solaris:~# 
    
  5. To clear the media error flag for a cartridge that resides in a specified library slot, use the command chmed -E library-equipment-number:slot[:disk-side], where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library, slot is the slot address where the target volume resides within the library, and the optional disk-side value, either 1 or 2, specifies one of the sides of a two-sided magneto-optical disk.

    In the example, we clear the error flag on the cartridge in slot 31 of library 800:

    root@solaris:~# chmed -E 800:31
    
  6. Update the library catalog to reflect the change. Use the command auditslot -e library-equipment-number:slot[:disk-side].

    In the example, we update the catalog by auditing slot 31 of library 800:

    root@solaris:~# auditslot -e 800:31
    root@solaris:~# 
    
  7. Mount the cartridge in a different drive, and see if the error recurs. Use the command samcmd load media-type.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

    root@solaris:~# samcmd load li.VOL004
    root@solaris:~# 
    
  8. Re-check the status of removable media volumes. Use the command samcmd r.

    root@solaris:~# samcmd r
    Removable media status: all          samcmd 5.4         17:42:10 Mar 13 2014
    ty   eq  status      act  use  state  vsn
    li  801  ---------p    0   0%  notrdy  
            empty
    li  802  --l------r    0   0%  ready   VOL004
            idle
    li  803  ---------p    0   0%  notrdy
            empty
    li  804  ---------p    0   0%  notrdy
            empty 
    root@solaris:~# 
    
  9. If the error does not recur on the new drive, the cartridge is probably OK.

  10. If the error recurs, consider retiring the removable media volume.

  11. Stop here.

Managing the Historian Catalog

The SAM-QFS historian is a pseudo-library that has a catalog but no equipment. The historian catalogs volumes that are no longer under direct SAM-QFS control. It thus maintains a record of any volumes that have been exported from a library and sent for offsite storage and volumes that are hand-loaded into standalone drives. SAM-QFS automatically updates the historian catalog when you export volumes from the library. But you can also use the historian for manual record keeping by adding and/or removing records and attaching notes. In general, you interact with the historian much as you would with a physical media library:

This section outlines the following tasks:

View the Historian Catalog

You view the historian catalog exactly as you would that of a physical library. Use the command samcmd v historian-equipment-number, where historian-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the historian.

In the example, we display the catalog for a historian that has the equipment ordinal number 900:

root@solaris:~# samcmd v 900
Robot catalog samcmd     5.4    16:45:25 Mar 14 2014
samcmd on samqfshost                         count 32
Robot VSN catalog by slot       : eq 900
slot          access time count use  flags         ty vsn
   0     2014/03/14 11:23  875   0%  -il-o-b-----  li EXT001 
   1     2014/03/13 17:54  866   0%  -il-o-b-----  li EXT002 
Add an Entry to the Historian Catalog
  1. To add an entry to the historian catalog for a specified volume serial number, use the command samimport -v volume-serial-number -m mediatype historian-equipment-number, where:

    • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the catalog.

    • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

    • historian-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the historian.

    In the example, we add a record for the LTO (li) volume EXT003 to the catalog for historian 900:

    root@solaris:~# samimport -v EXT003 -m li 900
    ]
    
  2. To add an entry to the historian catalog for a specified barcode, use the command samimport -b barcode -m mediatype historian-equipment-number, where barcode is the barcode affixed to the corresponding physical cartridge.

    In the example, we add a record for the LTO (li) volume with barcode EXT003L4 to the catalog for historian 900:

    root@solaris:~# samimport -b EXT003L4 -m li 900
    
  3. Stop here.

Remove an Entry from the Historian Catalog

To remove an entry from the historian catalog, use the command samexport historian-equipment-number:slot, where historian-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the historian and slot is the historian slot address for the record.

In the example, we remove the record for volume EXT002 in slot 1 of the catalog for historian 900:

root@solaris:~# samcmd v 900
Robot catalog samcmd     5.4    16:45:25 Mar 14 2014
samcmd on samqfshost                         count 32
Robot VSN catalog by slot       : eq 900
slot          access time count use  flags         ty vsn
   0     2014/03/14 11:23  875   0%  -il-o-b-----  li EXT001 
   1     2014/03/13 17:54  866   0%  -il-o-b-----  li EXT002 
   2     2014/03/13 17:57  866   0%  -il-o-b-----  li EXT003 
root@solaris:~# samexport 900:1
Update Historian Information

You can update the information field in a historian catalog entry to note changes to the disposition or status of an exported volume. Use the command chmed -I "note" identifier, where note is a string of up to 128 characters and identifier is either of the following:

  • mediatype.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library. Or use the command

  • library-equipment-number:slot, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library and slot is the slot address where the cartridge resides within the library.

In the example, we note that LTO (li) cartridge VOL06E has been recalled from the vault, successfully validated, and returned to the vault:

root@solaris:~# chmed -I "validated and revaulted 20140310" li.VOL06A

Determining the Order in Which Drives are Installed in the Library

If your automated library contains more than one drive, the order of the drives in the mcf file must be the same as the order in which the drives are seen by the library controller. This order can be different from the order in which devices are seen on the host and reported in the host /var/adm/messages file. So whenever you configure a SAM-QFS metadata server and datamover host, change libraries, or change the configuration of a library, you should check the drive order by carrying out the tasks listed below:

Gather Drive Information for the Library and the Solaris Host

  1. Consult the library documentation. Note how drives and targets are identified. If there is a local operator panel, see how it can be used to determine drive order.

  2. If the library has a local operator panel mounted on the library, use it to determine the order in which drives attach to the controller. Determine the SCSI target identifier or World Wide Name of each drive.

  3. Log in to the Solaris host as root.

    root@solaris:~# 
    
  4. List the Solaris logical device names in /dev/rmt/, redirecting the output to a text file.

    In the example, we redirect the listings for /dev/rmt/ to the file device-mappings.txt in the root user's home directory:

    root@solaris:~# ls -l /dev/rmt/ > /root/device-mappings.txt 
    
  5. Now, Map the Drives in a Direct-Attached Library to Solaris Device Names or Map the Drives in an ACSLS-Attached Library to Solaris Device Names.

Map the Drives in a Direct-Attached Library to Solaris Device Names

For each Solaris logical drive name listed in /dev/rmt/ and each drive that the library assigns to the SAM-QFS server host, carry out the following procedure:

  1. If you are not already logged in to the SAM-QFS Solaris host, log in as root.

    root@solaris:~# 
    
  2. If SAM-QFS is already installed, stop all running archiving processes so that drives are not in use. See "Idle Archiving and Staging Processes" and "Stop Archiving and Staging Processes".

  3. In a text editor, open the device mappings file that you created in the procedure "Gather Drive Information for the Library and the Solaris Host", organize it into a simple table, and save the changes.

    You will need to refer to this information in subsequent steps. In the example, we have used the vi editor to delete the permissions, ownership, and date attributes from the /dev/rmt/ list, while adding headers and space for library device information:

    root@solaris:~# vi /root/device-mappings.txt 
    LIBRARY SOLARIS          SOLARIS 
    DEVICE  LOGICAL          PHYSICAL
    NUMBER  DEVICE           DEVICE
    ------- -------------    -----------------------------------------------------
            /dev/rmt/0cbn -> ../../devices/pci@8.../st@w500104f00093c438,0:cbn
            /dev/rmt/1cbn -> ../../devices/pci@8.../st@w500104f0008120fe,0:cbn
            /dev/rmt/2cbn -> ../../devices/pci@8.../st@w500104f000c086e1,0:cbn
            /dev/rmt/3cbn -> ../../devices/pci@8.../st@w500104f000b6d98d,0:cbn
    :w
    
  4. On the library, make sure that all drives are empty.

  5. Load a tape into the first drive in the library that you have not yet mapped to a Solaris logical device name.

    For the purposes of the examples below, we load an LTO4 tape into an HP Ultrium LTO4 tape drive.

  6. If you are mapping the drives in a tape library, identify the Solaris /dev/rmt/ entry that corresponds to the drive that mounts the tape. Until you identify the drive, run the command mt -f /dev/rmt/number status where number identifies the drive in /dev/rmt/.

    In the example, the drive at /dev/rmt/0 is empty, but the drive at /dev/rmt/1 holds the tape. So the drive that the library identifies as drive 1 corresponds to Solaris /dev/rmt/1:

    root@solaris:~# mt -f /dev/rmt/0 status
    /dev/rmt/0: no tape loaded or drive offline
    root@solaris:~# mt -f /dev/rmt/1 status
    HP Ultrium LTO 4 tape drive:
       sense key(0x0)= No Additional Sense   residual= 0   retries= 0
       file no= 0   block no= 3
    
  7. In the device-mappings file that you created in the previous procedure, locate the entry for the Solaris device that holds the tape, and enter the library's device identifier in the space provided. Then save the file.

    In the example, enter 1 in the LIBRARY DEVICE NUMBER field of the row for /dev/rmt/1:

    root@solaris:~# vi /root/device-mappings.txt 
    LIBRARY SOLARIS          SOLARIS 
    DEVICE  LOGICAL          PHYSICAL
    NUMBER  DEVICE           DEVICE
    ------- -------------    -----------------------------------------------------
            /dev/rmt/0cbn -> ../../devices/pci@8.../st@w500104f00093c438,0:cbn
       1    /dev/rmt/1cbn -> ../../devices/pci@8.../st@w500104f0008120fe,0:cbn
            /dev/rmt/2cbn -> ../../devices/pci@8.../st@w500104f000c086e1,0:cbn
            /dev/rmt/3cbn -> ../../devices/pci@8.../st@w500104f000b6d98d,0:cbn
    :w
    
  8. Unload the tape.

  9. Repeat this procedure until the device-mappings file holds entries that map all devices that the library assigns to the SAM-QFS host to Solaris logical device names. Then save the file and close the editor.

    root@solaris:~# vi /root/device-mappings.txt 
    LIBRARY SOLARIS          SOLARIS 
    DEVICE  LOGICAL          PHYSICAL
    NUMBER  DEVICE           DEVICE
    ------- -------------    -----------------------------------------------------
       2    /dev/rmt/0cbn -> ../../devices/pci@8.../st@w500104f00093c438,0:cbn
       1    /dev/rmt/1cbn -> ../../devices/pci@8.../st@w500104f0008120fe,0:cbn
       3    /dev/rmt/2cbn -> ../../devices/pci@8.../st@w500104f000c086e1,0:cbn
       4    /dev/rmt/3cbn -> ../../devices/pci@8.../st@w500104f000b6d98d,0:cbn
    :wq
    root@solaris:~# 
    
  10. Stop here. Keep the mappings file for later use.

Map the Drives in an ACSLS-Attached Library to Solaris Device Names

  1. If you are not already logged in to the SAM-QFS Solaris host, log in as root.

    root@solaris:~# 
    
  2. If SAM-QFS is already installed, stop all running archiving processes, so that drives are not in use. See "Idle Archiving and Staging Processes" and "Stop Archiving and Staging Processes".

  3. In a text editor, open the device mappings file that you created in the procedure "Gather Drive Information for the Library and the Solaris Host", and organize it into a simple table.

    You will need to refer to this information in subsequent steps. In the example, we are using the vi editor to delete the permissions, ownership, and date attributes from the /dev/rmt/ list, while adding headers and space for library device information:

    root@solaris:~# vi /root/device-mappings.txt 
    SOLARIS LOGICAL DEVICE  DEVICE SERIAL NUMBER  ACSLS DEVICE ADDRESS
    ----------------------  --------------------  --------------------------------
    /dev/rmt/0  
    /dev/rmt/1  
    /dev/rmt/2  
    /dev/rmt/3  
    
  4. For each logical device name listed in /dev/rmt/, display the serial number using the command luxadm display /dev/rmt/number, where number identifies the drive in /dev/rmt/.

    In the example, we obtain HU92K00200, the serial number of device /dev/rmt/0:

    root@solaris:~# luxadm display /dev/rmt/0
    DEVICE PROPERTIES for tape: /dev/rmt/0
    Vendor: HP
    Product ID: Ultrium 4-SCSI
    Revision: G25W
    Serial Num: HU92K00200
    ...
    Path status: Ready
    root@solaris:~# 
    
  5. Then, using a text editor, enter the serial number of each device in the corresponding row of your device-mappings.txt file.

    In the example, we record the serial number for device /dev/rmt/0 in the device-mappings.txt file using the vi editor:

    root@solaris:~# vi /root/device-mappings.txt 
    SOLARIS LOGICAL DEVICE  DEVICE SERIAL NUMBER  ACSLS DEVICE ADDRESS
    ----------------------  --------------------  --------------------------------
    /dev/rmt/0              HU92K00200
    /dev/rmt/1  
    /dev/rmt/2  
    /dev/rmt/3  
    
  6. For each device serial number mapped to /dev/rmt/, obtain the corresponding ACSLS drive address. Use the ACSLS command display drive * -f serial_num.

    In the example, we obtain the ACSLS addresses of devices HU92K00200 (/dev/rmt/0), HU92K00208 (/dev/rmt/1), HU92K00339 (/dev/rmt/2), HU92K00289 (/dev/rmt/3):

     ACSSA> display drive * -f serial_num
     2014-03-29 10:49:12 Display Drive
     Acs Lsm Panel Drive Serial_num
     0   2   10    16    331002031352
     0   2   10    17    HU92K00200
     0   2   10    18    HU92K00208
     0   3   10    10    HU92K00339
     0   3   10    11    HU92K00189
     0   3   10    12    HU92K00289
    root@solaris:~# 
    
  7. Using a text editor, enter the ACSLS address for each serial number in the corresponding row of the device-mappings.txt file. Save the file, and close the editor.

    In the example, we record the information in the device-mappings.txt file using the vi editor:

    root@solaris:~# vi /root/device-mappings.txt 
    SOLARIS LOGICAL DEVICE DEVICE SERIAL NUMBER ACSLS DEVICE ADDRESS
    ---------------------- -------------------- ---------------------------------
    /dev/rmt/0             HU92K00200           (acs=0, lsm=2, panel=10, drive=17)
    /dev/rmt/1             HU92K00208           (acs=0, lsm=2, panel=10, drive=18)
    /dev/rmt/2             HU92K00339           (acs=0, lsm=2, panel=10, drive=10)
    /dev/rmt/3             HU92K00289           (acs=0, lsm=2, panel=10, drive=12)
    :wq
    root@solaris:~# 
    
  8. Stop here. Keep the mappings file for later use.

Managing Drives

You can handle a variety of drive management tasks from the SAM-QFS interfaces, including the following:

Loading and Unloading Drives

When removable media are stored in automated libraries, file-system archiving and staging processes automatically load cartridges into drives as required. But you can also load cartridges on demand when managing removable media files, backing up the SAM-QFS configuration, or recovering a file system. This section covers the following topics:

Loading and Unloading Drives Installed in an Automated Library

Load a Drive from a Specified Library Location

Use the command samcmd load library-equipment-number:slot[:disk-side], where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library, slot is the slot address where the target volume resides within the library, and the optional disk-side value, either 1 or 2, specifies one of the sides of a two-sided magneto-optical disk.

The cartridge is loaded in the next available drive in the library. In the example, we load the magnetic tape cartridge located in slot 11 of library 800:

root@solaris:~# samcmd load 800:11
Load a Drive with a Specified Media Type and Volume Serial Number

Use the command samcmd load mediatype.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The cartridge is loaded in the next available drive in the library. In the example, we load the LTO (li) tape cartridge VOL109:

root@solaris:~# samcmd load li.VOL109
Unload a Specified Drive in the Library

Use the command samcmd unload drive-equipment-number, where drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

The cartridge is unloaded, even if the drive is unavail. In the example, we unload drive 801:

root@solaris:~# samcmd unload 801]

Manually Loading and Unloading Standalone Drives

The SAM-QFS software treats standalone removable media drives as if they were small, single-slot libraries with their own catalogs.

Load a Cartridge Into a Standalone Drive

To load a standalone drive, place the cartridge in the drive according to the manufacturer's instructions. The SAM-QFS system recognizes that the cartridge is loaded, reads the label, and updates the catalog for the drive.

Unload a Cartridge from a Standalone Drive
  1. Idle the drive. Use the command samcmd idle drive-equipment-number, where drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    When a drive is idled, the SAM-QFS software finishes any current archiving processes that use the drive but does not start any new ones. When current activity completes, the software sets the drive off.

    root@solaris:~# samcmd idle 801
    
  2. Wait until SAM-QFS finishes using the drive and sets it off.

    You can check on the status of the drive using the command samcmd r.

  3. Remove the cartridge according to the vendor's instructions.

  4. Stop here.

Notifying Operators When Volumes Must Be Loaded Manually

If you are using a standalone drive or if you store required cartridges in a vault or some other location outside the library, the SAM-QFS software can send email to a specified address when it needs an operator to load a non-resident cartridge. To enable this feature, follow the procedure below:

Enable Load Notification
  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. Copy the file, load_notify.sh, from /opt/SUNWsamfs/examples/ to /etc/opt/SUNWsamfs/scripts/.

    root@solaris:~# cp /opt/SUNWsamfs/examples/load_notify.sh \
    /etc/opt/SUNWsamfs/scripts/
    root@solaris:~# 
    
  3. Open the file /etc/opt/SUNWsamfs/defaults.conf in a text editor, and search for the directive exported_media. Uncomment the line or add it, if necessary, and set its value to exported_media=available.

    In the example, we use the vi editor:

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. 
    ...  
    exported_media=available
    
  4. In the file /etc/opt/SUNWsamfs/defaults.conf, search for the directive attended. Uncomment the line or add it, if necessary, and set its value to attended=yes. Save the file, and close the editor.

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. ...  
    # These are the defaults. ...  
    exported_media=available
    attended=yes
    :wq
    root@solaris:~# 
    
  5. Open the file /etc/opt/SUNWsamfs/scripts/load_notify.sh in a text editor, and locate the default recipient of the notification email, root.

    root@solaris:~# vi /etc/opt/SUNWsamfs/scripts/load_notify.sh
    #       Notify operator to load volume.
    ...
    # Change the email address on the following line to send email to
    # the appropriate recipient.
    /bin/ppriv -s I=basic -e /usr/bin/mailx -s "SAM-FS needs VSN $5" root <<EOF
    ...
    
  6. In the file /etc/opt/SUNWsamfs/scripts/load_notify.sh, change the recipient of the notification email from the default, root, to the operator responsible for the non-resident volumes. Save the file and close the editor.

    In the example, we change the recipient to tapetech:

    #       Notify operator to load volume.
    ...
    /bin/ppriv -s I=basic -e /usr/bin/mailx -s "SAM-FS needs VSN $5" tapetech <<EOF
    ...
    :wq
    root@solaris:~# 
    
  7. Reinitialize the SAM-QFS software. Use the sam-fsd command.

    The sam-fsd is an initialization command that reads SAM-QFS configuration files. It will stop if it encounters an error:

    root@solaris:~# sam-fsd
    
  8. Tell the SAM-QFS software to re-read the mcf file and reconfigure file systems and hardware accordingly. Use the command samd config:

    root@solaris:~# samd config
    
  9. Stop here.

Cleaning Tape Drives

Modern tape drives like the SAM-QFS SAM-QFS T10000D and Linear Tape Open (LTO) drives self-monitor and request cleaning when and as needed. The SAM-QFS software honors these requests and automatically loads a cleaning cartridge when required. So in most cases, you need only insure that your library contains adequate cleaning cartridges and that SAM-QFS is able to locate them (see Provide Sufficient Cleaning Cartridges below).

When drive-requested cleaning is not feasible, you can initiate cleaning manually. But be advised: most manufacturers emphatically discourage routine cleaning in the absence of a request from the drive. Cleaning cartridges are abrasive, and overuse can damage drives and media. So exercise caution, and follow the manufacturer's recommendations.

Provide Sufficient Cleaning Cartridges

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. If you plan to configure automatic cleaning (recommended) and if your library has more than two drives, make sure that you provide at least two cleaning cartridges for each file-system catalog that lists tapes in the library.

    If a cleaning cartridge is unavailable when a drive requires cleaning, the SAM-QFS software sets the drive state to down until cleaning can be completed.

  3. Place the cartridge(s) in the library mail slot (cartridge access port).

  4. Import the cleaning cartridge(s) into the automated library. Use the command samimport library-equipment-number, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library.

    In the example, we have placed cleaning cartridges in the mailslot (cartridge access port) of library 800 and imported them into the library.

    root@solaris:~# samimport 800
    
  5. If the cleaning cartridge label reads CLEAN or starts with the letters CLN, stop here.

    The SAM-QFS software recognizes the cleaning cartridge and moves it from the mailbox to a storage slot. SAM-QFS updates the library catalog, sets the cleaning media flag, and sets the access count to the maximum number of cleanings recommended for the media type (each time the cartridge is used to clean a drive, this count decrements).

  6. If the cartridge is not labeled, flag it as cleaning media. Use the command chmed +C library-equipment-number:slot, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library and slot is the location of the cleaning cartridge within the library.

    In the example, we set the C (cleaning-media) flag on the cartridge in slot 31 of library 800.

    root@solaris:~# chmed +C 800:31
    
  7. Set the access count to the maximum number of cleanings recommended for the media type. Use the command chmed -count cleanings library-equipment-number:slot, where:

    • cleanings is the maximum number of cleanings.

    • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library.

    • slot is the location of the cleaning cartridge within the library.

    Each time the cartridge is used to clean a drive, the cleaning count decrements. In the example, we set the count to a maximum of 50 cleanings, the maximum recommended for the LTO (type li) cleaning cartridges used in library 800:

    root@solaris:~# chmed -count 50 800:31
    
  8. Next, Enable Automatic Tape-Drive Cleaning (Recommended) or stop here.

Enable Automatic Tape-Drive Cleaning (Recommended)

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. If your library has more than two drives, make sure that you provide at least two cleaning cartridges for each file-system catalog that lists tapes in the library.

    Having enough cleaning media minimizes drive downtime. If a cleaning cartridge is unavailable when a drive requires cleaning, the SAM-QFS software sets the drive state to down until cleaning can be completed.

  3. If your library includes an Auto Clean feature that you wish to use, configure the feature according to the library manufacturer's recommendations. Stop here.

    Now, when drives request cleaning, the library will automatically supply the required cleaning media.

  4. If your library includes an Auto Clean feature that you do not wish to use, disable the feature according to the manufacturer's recommendations.

  5. Open the file /etc/opt/SUNWsamfs/defaults.conf in a text editor, and enable SAM-QFS automatic cleaning. Add the line tapeclean = all autoclean on logsense on. Then save the file and close the editor.

    In the example, we use the vi editor:

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. ...  
    #sef = all on once
    ...
    tapeclean = all autoclean on logsense on
    :wq
    root@solaris:~# 
    
  6. Reinitialize the SAM-QFS software. Use the sam-fsd command.

    The sam-fsd is an initialization command that reads SAM-QFS configuration files. It will stop if it encounters an error:

    root@solaris:~# sam-fsd
    
  7. Tell the SAM-QFS software to re-read the mcf file and reconfigure file systems and hardware accordingly. Use the command samd config:

    root@solaris:~# samd config
    
  8. Stop here.

Clean a Tape Drive Manually

  1. Check the drive manufacturer's guidelines for manual cleaning before proceeding.

    Exercise caution. Over-frequent cleaning is a common cause of drive damage, and many manufacturers now strongly discourage routine or scheduled cleanings. So make sure that you understand when your drives need to be cleaned.

  2. Monitor the device logs for indications that drives need cleaning. There is one log in the directory /var/opt/SUNWsamfs/devlog/ for each drive-equipment-number, where drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive. Also check the file /var/adm/messages for device errors.

  3. Clean the tape drive. Use the command cleandrive drive-equipment-number.

    In the example, we clean drive 802:

    root@solaris:~# cleandrive 802
    
  4. Stop here.

Using Drives With Encryption Capability

If you are archiving files to drives that have encryption capability, consider the following recommendations when planning archiving operations:

  • Do not mix non-encrypted and encryption-capable drives in a library.

  • After a drive has encryption enabled, it cannot be disabled.

  • Do not mix encrypted and non-encrypted files on a tape.

  • An encrypted drive cannot append to a tape that contains non-encrypted data.

  • An encryption-enabled drive can read non-encrypted data.

For further information, consult the documentation for your drives and encryption key-management system.

Handling Drive Problems

In general, you handle drive problems according to the drive vendor's recommendations. This section explains the procedure you should follow to prepare the SAM-QFS software and file systems for drive maintenance, troubleshooting, and repair.

Taking the Drive Offline for Maintenance or Repair

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. Quiesce archiving and staging processes, as described in "Idle Archiving and Staging Processes".

  3. Stop archiving and staging processes, and take the drives offline. Use the procedure "Stop Archiving and Staging Processes".

  4. Carry out the vendor-specified maintenance, diagnostic. or repair procedures.

    For example, before attempting to remove a stuck cartridge, be sure to check the vendor's recommendations. Improperly removing a stuck cartridge can damage the cartridge and the drive.

  5. When the drive is again operational, bring the library and drives online and restart archiving and staging processes. Use the procedure "Restart Archiving and Staging Processes".

  6. Stop here.

Return Media to the Library Following a Drive Problem

If drive problems occur with media mounted in the drive, you may need to remove the media manually as part of the repair process. This can leave the catalog inconsistent. So follow the appropriate procedure below:

Returning Media to a Library that Has Not Performed an Automatic Audit
  1. If the library does not perform an automatic audit when the library and drive are brought back online following repairs, return the cartridge to its storage slot by hand.

    In this case, the catalog has not been updated and continues to list the cartridge among the library contents. So you correct the discrepancy by putting the cartridge back in its slot.

  2. Update the catalog to show that the slot is again occupied. Use the command chmed library-equipment-number:slot, where slot is the address of the slot within the library.

    In the example, we update the status of slot 42 in library 800:

    root@solaris:~# chmed +o 800:42
    root@solaris:~# 
    
  3. Stop here.

Returning Media to a Library After an Automatic Audit
  1. If the library performs an automatic audit when the library and drive are brought back online following repairs, place the cartridge in the library mail slot (cartridge access port).

  2. Import the cartridge into the library. Use the command samimport library-equipment-number.

    In this case, the audit has reconciled the catalog, which no longer lists the cartridge in the library. So importing the cartridge adds it to both the library and the catalog. In the example, we have placed the cartridge in the mailslot of library 800 and imported it into the library.

    root@solaris:~# samimport 800
    
  3. Stop here.

Managing Removable Media

This section covers the following topics:

Labeling Removable Media


Caution:

Labeling or relabeling a cartridge renders any data on the cartridge permanently inaccessible. Relabel a cartridge only if you are certain that you do not need the data that is stored on it.

The labeling process writes identifying information on the recording media and initializes it for use (see ANSI X3.27-1987, File Structure and Labeling of Magnetic Tapes for Information Interchange, for full information).

When you need to label media, select the appropriate procedure below:

Generate Labels from Barcodes

To automatically label write-enabled, unlabeled cartridges with a volume serial number (VSN) derived from the barcodes on the cartridges, proceed as follows.

  1. Make sure that all barcodes are readable.

  2. Log in to the file system host as root.

    root@solaris:~# 
    
  3. Open the /etc/opt/SUNWsamfs/defaults.conf file in a text editor. Locate the labels directive, and note its value.

    In the example, we use the vi editor. The labels directive is set to barcodes (the default).

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. 
    ...
    #labels = barcodes
    :w
    root@solaris:~# 
    
  4. If you need to generate the volume serial number (VSN) from the first six characters in the barcode, use the default setting, labels = barcodes.

    If the labels directive is commented out, set to the value barcodes, or missing, you can close the file without making changes. Otherwise, set the labels parameter to barcodes, save the file, and close the editor.

    In the example, the directive is commented out, so the default setting has not been changed. We thus close the file and the editor, leaving the default setting unchanged:

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. 
    ...
    #labels = barcodes
    :q
    root@solaris:~# 
    
  5. If you need to generate the volume serial number (VSN) from the last six characters in the cartridge's barcode, set the value of the labels parameter to barcodes_low. Save the file and close the editor.

    In the example, we replace the line #labels = barcodes with labels = barcodes_low:

    root@solaris:~# vi /etc/opt/SUNWsamfs/defaults.conf
    # These are the defaults. 
    ...
    labels = barcodes_low
    :wq
    root@solaris:~# 
    
  6. If you edited the defaults.conf file, run the sam-fsd command.

    The sam-fsd is an initialization command that reads SAM-QFS configuration files. It will stop if it encounters an error:

    root@solaris:~# sam-fsd
    
  7. If you edited the defaults.conf file, tell the SAM-QFS software to re-read the mcf file and reconfigure itself accordingly:

    [metadata-server]root@solaris:~# samd config
    
  8. Stop here.

Label a New Tape or Relabel an Existing Tape

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. To label a new tape that is loaded into a drive, use the command tplabel -new volume-serial-number drive-equipment-number, where volume-serial-number is the required volume serial number and drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    In the example, we assign the volume serial number VOL600 to the new tape cartridge in drive 803:

    root@solaris:~# tplabel -new -vsn VOL600 803
    root@solaris:~# 
    
  3. To label a new tape that resides in an automated media library, use the command tplabel -new volume-serial-number library-equipment-number:slot, where volume-serial-number is the required volume serial number, library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive, and slot is the location of the cartridge within the library.

    In the example, we assign the volume serial number VOL601 to the new tape cartridge in slot 19 of library 800:

    root@solaris:~# tplabel -new -vsn VOL601 800:19
    root@solaris:~# 
    
  4. To relabel an existing tape that is loaded into a drive, use the command tplabel -old volume-serial-number drive-equipment-number, where volume-serial-number is the required volume serial number and drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    You can reuse the existing volume serial number if required. In the example, we assign the volume serial number VOL120 to the tape cartridge in drive 804:

    root@solaris:~# tplabel -old -vsn VOL120 804
    root@solaris:~# 
    
  5. To relabel an existing tape that resides in an automated media library, use the command tplabel -old volume-serial-number library-equipment-number:slot, where volume-serial-number is the required volume serial number, library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive, and slot is the location of the cartridge within the library.

    You can reuse the existing volume serial number if required. In the example, we assign the volume serial number VOL121 to the tape cartridge in slot 23 of library 800:

    root@solaris:~# tplabel -old -vsn VOL601 800:23
    root@solaris:~# 
    
  6. Stop here.

Label a New Optical Disk or Relabel an Existing Optical Disk

  1. Log in to the file system host as root.

    root@solaris:~# 
    
  2. To label a new optical cartridge that is loaded into a drive, use the command odlabel -new volume-serial-number drive-equipment-number[:side], where:

    • volume-serial-number is the required volume serial number.

    • drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    • side (optional) is the specified side of a two-sided disk.

    In the example, we assign the volume serial number OD1700 to the new, single-sided optical cartridge in drive 701:

    root@solaris:~# odlabel -new -vsn OD1700 701
    root@solaris:~# 
    
  3. To label a new optical cartridge that resides in an automated media library, use the command odlabel -new volume-serial-number library-equipment-number:slot[:side], where:

    • volume-serial-number is the required volume serial number.

    • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    • slot is the location of the cartridge within the library, and side (optional) is the specified side of a two-sided disk.

    In the example, we assign the volume serial number OD1701 to side 2 of the new, two-sided optical cartridge in slot 42 of library 700:

    root@solaris:~# odlabel -new -vsn OD1701 700:42:2
    root@solaris:~# 
    
  4. To relabel an existing optical cartridge that is loaded into a drive, use the command odlabel -old volume-serial-number drive-equipment-number[:side], where:

    • volume-serial-number is the required volume serial number.

    • drive-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

    • side (optional) is the specified side of a two-sided disk.

    You can reuse the existing volume serial number if required. In the example, we assign the volume serial number OD1120 to the optical cartridge in drive 702:

    root@solaris:~# odlabel -old -vsn OD1120 702
    root@solaris:~# 
    
  5. To relabel an existing optical cartridge that resides in an automated media library, use the command odlabel -old volume-serial-number library-equipment-number:slot[:side], where:

    • volume-serial-number is the required volume serial number.

    • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the library.

    • side (optional) is the specified side of a two-sided disk.

    You can reuse the existing volume serial number if required. In the example, we assign the volume serial number OD1121 to the optical cartridge in slot 23 of library 700:

    root@solaris:~# odlabel -old -vsn OD1121 800:23
    root@solaris:~# 
    
  6. Stop here.

Displaying Data Integrity Validation (DIV) Settings and Status

This section covers the following tasks:

Display the DIV Setting

To display the Data Integrity Validation (DIV) setting, use the command samcmd L and pipe the output to the Solaris grep command: samcmd L | grep div.

In the example, DIV is OFF:

root@solaris:~# samcmd L | grep div
div             OFF
root@solaris:~# 

Monitor the Verify After Write Status of Archive Files

To monitor the verification status of archive files during archiving, use the samu interface. Use the command samu -d a.

root@solaris:~# samu -d a 
Archiver status                         samu 5.4         22:22:31 Mar 4 2014
sam-archiverd: Archiving files
sam-arfind:  samqfs1 mounted at /samqfs1
Files waiting to start     12,576  schedule     26,695  archiving     13,120 
...
sam-arcopy: qfs.arset1.2.344 ti.TKC960
Verifying archive file at position 1175

Monitor the Verify After Write Status of Devices

To monitor the verification status of devices during archiving, use the samu interface. Use the command samu -d s:

root@solaris:~# samu -d s
Device status                        samu 5.4           22:27:53 Mar 4 2014
ty     eq state  device_name                     fs  status
sn    800 on     /dev/scsi/changer/c1t2d0        800 n--------r
ti    801 on     /dev/rmt/0cbn                   800 ---------p
...
hy    805 on     historian                       805 ----------
ti     91 on     /dev/rmt/4cbn                    90 -l----oVr
Verify averaging 240.9 MB/s

Verifying the Integrity of Tape Media

When you need to verify the data integrity of particular tape volumes on demand, use the SAM-QFS tpverify command (for instructions on configuring automated Periodic Media Verification, see the StorageTek Storage Archive Manager and StorageTek QFS Software Installation and Configuration Guide). The tpverify command supports SAM-QFS T10000C/D, LTO, and other commonly used media. T10000C/D media are verified using SAM-QFS Data Integrity Validation. Other formats are checked using the widely supported SCSI verify(6) command.

The following sections outline some of the ways in which tpverify can be used. See the tpverify man page for full details on syntax and options:

Verify the Data on a Tape Specified by Library Location

Use the command tpverify library-equipment-number:slot, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library and slot is the slot address where the target volume resides within the library.

The tpverify command locates the last tape position that was verified by checking the library media catalog. It then loads the tape into the first available drive and starts validating from the point where it last stopped, using the default method—the tpverify Standard method for T10000C/D media or SCSI verify(6) for other media. The Standard method is optimized for speed and verifies the edges, beginning, end, and first 1,000 blocks of SAM-QFS media.

In the example, we validate the T10000D tape stored in slot 9 on library 800 using the Standard method:

root@solaris:~# tpverify 800:9

Verify the Data on a Tape Specified by Media Type and Volume Serial Number

Use the command tpverify mediatype.volume-serial-number, where mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The tpverify command locates the last tape position that was verified by checking the library media catalog. It then loads the tape into the first available drive and starts validating from the point where it last stopped, using the default method—the tpverify Standard method for T10000C/D media or SCSI verify(6) for other media.

In the example, we validate LTO (li) volume VOL006 using the SCSI verify(6) command:

root@solaris:~# tpverify li.VOL006

Verify the Data on a Tape Using a Specified Drive

Use the command tpverify library-equipment-number:slot device-equipment-number, where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • device-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the drive.

In the example, we validate the T10000D tape stored in slot 17 on library 800 using drive 803:

root@solaris:~# tpverify 800:17 803

Restart Data Verification from the Start of the Tape

Use the command tpverify -a library-equipment-number:slot or tpverify -a mediatype.volume-serial-number, where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

  • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The -a option overrides the default behavior and starts verifying from the beginning of the media, ignoring the position recorded in the media catalog.

In the example, we validate LTO (li) volume VOL016 from the beginning of the tape:

root@solaris:~# tpverify -a li.VOL016

Verify ECC for All Blocks on a T10000C/D Tape

Use the command tpverify -C library-equipment-number:slot or tpverify -C mediatype.volume-serial-number where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

  • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The tpverify command locates the last tape position that was verified by checking the library media catalog. It then starts validating from the point where it last stopped, using the Complete method specified by the -C option. The Complete method is more thorough than the standard method but can also be significantly slower. It checks Error Correction Codes (ECC) on all blocks on the media.

In the example, we validate T10000D (ti) volume VOL516 using the Complete method:

root@solaris:~# tpverify -C ti.VOL516

Verify ECC and DIV Checksums for All Blocks on a T10000C/D Tape

Use the command tpverify -P library-equipment-number:slot or tpverify -P mediatype.volume-serial-number, where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

  • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The tpverify command locates the last tape position that was verified by checking the library media catalog. It then starts validating from the point where it last stopped, using the Complete Plus method specified by the -P option. The Complete Plus method is very thorough but also even slower than the other methods. It checks Error Correction Codes (ECC) and Data Integrity Validation checksums on all blocks on the media.

In the example, we validate T10000D (ti) volume VOL521 using the Complete Plus method:

root@solaris:~# tpverify -P ti.VOL521

Rebuild the Media Information Region (MIR) of a T10000C/D Tape

Use the command tpverify -M library-equipment-number:slot or tpverify -M mediatype.volume-serial-number, where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

  • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The tpverify command rebuilds a missing or damaged media information region (MIR) on an SAM-QFS SAM-QFS tape cartridge, even if the tape is marked bad in the media catalog. Rebuilding is automatically specified when MIR damage is detected.

In the example, we validate T10000D (ti) volume VOL523 using the MIR Rebuild method:

root@solaris:~# tpverify -M ti.VOL523

Cancel Data Verification for a Specified Tape

Use the command tpverify -c library-equipment-number:slot or tpverify -c mediatype.volume-serial-number, where:

  • library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

  • slot is the slot address where the target volume resides within the library.

  • mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types".

  • volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

The tpverify -c command cancels the current verification operation and records the last verified position on the tape in the media catalog. So you can stop a verification job to free a drive or volume for archiving or staging and then resume verification at the same point later.

In the example, we cancel verification of T10000D (ti) volume VOL533:

root@solaris:~# tpverify -c ti.VOL523

Display the DIV Status and Verification Progress for a Tape

Use the command itemize -2 library-equipment-number, where library-equipment-number is the equipment ordinal number that the /etc/opt/SUNWsamfs/mcf file assigns to the automated tape library.

The itemize -2 command catalogs the media in the specified library and lists the DIV status and verification progress for each volume.

In the example, we display verification status for volumes in the library with equipment ordinal number 800. The lvtime (time last verified) fields display the time when tpverify last completed a full verification of the tape. A status field value of div indicates that the tape is DIV-capable while a value of none indicates that it is not. The lvpos (last verified position) fields show where tpverify was last canceled and where it will start when run again.

root@solaris:~# itemize -2 800
Robot VSN catalog: eq: 800       count: 60
slot    access_time  count  use  ty vsn
        lvtime      status          lvpos
   0    Apr  2 16:34     6   0%  ti VOL519
        Apr  2 09:23   div          0
   1    Apr  2 16:17    28  29%  ti VOL510
        Apr  2 16:17   div          0x9bb9
   2    none             0   0%  ti VOL511
        none          none          0
  ...
root@solaris:~# 

Managing Periodic Media Validation

Periodic Media Validation is the automated form of the tpverify command. This section provides instructions for maintenance tasks that may occasionally be necessary (for instructions on configuring Periodic Media Verification, see the StorageTek Storage Archive Manager and StorageTek QFS Software Installation and Configuration Guide). These tasks include:

View and Validate the verifyd.cmd Configuration File

To view the verifyd.cmd file at any time or to validate the file following editing, use the command tpverify -x.

The tpverify -x command checks the /etc/opt/SUNWsamfs/verifyd.cmd file and either calls out errors or displays the contents of the file.

root@solaris:~# tpverify -x
Reading '/etc/opt/SUNWsamfs/verifyd.cmd'.
PMV: off
     Run-time:
     Start Time: 2200
End Time: 0500
PMV Scan: all
PMV Method: Standard
STA Scan: off
Action: none
PMV VSNs: all
PMV Policy:
     Last Verified Age: 6m
root@solaris:~# 

Reload the verifyd.cmd Configuration File

To reload the verifyd.cmd file without stopping the verification process, use the command tpverify -r.

root@solaris:~# tpverify -r
root@solaris:~# 

Display All Defects Listed in the Periodic Media Verification Tape Defects Database

To list all defects that have been identified by Periodic Media Verification and stored in the tape defects database, use the command tpverify -l.

In the example, there are no defects in the database:

root@solaris:~# tpverify -l
No defects found.
root@solaris:~# 

Display Defects Listed for a Particular Volume

To list all defects that have been identified on a particular volume, use the command tpverify -l mediatype.volume-serial-number, where the optional mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

In the example, there are no defects listed in the database for the LTO (ti) volume VOL514:

root@solaris:~# tpverify -l ti.VOL514
No defects found.
root@solaris:~# 

Clear Defects Listed in the Periodic Media Verification Tape Defects Database

To delete all defects that have been identified by Periodic Media Verification from the tape defects database, use the command tpverify -d.

To delete all defects listed for a particular volume, use the command tpverify -d mediatype.volume-serial-number where the optional mediatype is one of the two-character media type codes listed Appendix A, "Glossary of Equipment Types" and volume-serial-number is the alphanumeric string that uniquely identifies the volume within the library.

root@solaris:~# tpverify -d
root@solaris:~# tpverify -d ti.VOL514
root@solaris:~#