dropdown menu

Tape Devices

TAPE DEVICES:

IBM tape drives and libraries mainly use Atape (install fileset):

# lslpp -l | grep Atape
  Atape.driver              12.6.2.0  COMMITTED  IBM AIX Enhanced Tape and

After install and device configuration tape devices will look like this

# lsdev -Cc tape
rmt0            Available 04-01-02     IBM 3592 Tape Drive (FCP)
rmt1            Available 04-01-02     IBM 3592 Tape Drive (FCP)
rmt2            Available 02-01-02     IBM 3592 Tape Drive (FCP)
rmt3            Available 04-01-02     IBM 3592 Tape Drive (FCP)
smc0            Available 02-01-02     IBM 3584 Library Medium Changer (FCP)
smc1            Available 04-01-02     IBM 3584 Library Medium Changer (FCP)

rmt: tape device
smc: library medium changer

==============================

Special tape drive files

After tape device configuration, new device files will be created automatically under /dev:

# ls -l /dev/rmt0*
crw-rw-rwT    1 root     system       46,1664 Nov 04 19:42 /dev/rmt0
crw-rw-rwT    1 root     system       46,1665 Nov 04 19:42 /dev/rmt0.1
crw-rw-rwT    1 root     system       46,1673 Nov 04 19:42 /dev/rmt0.10
crw-rw-rwT    1 root     system       46,1668 Nov 04 19:42 /dev/rmt0.2
crw-rw-rwT    1 root     system       46,1672 Nov 04 19:42 /dev/rmt0.20
crw-rw-rwT    1 root     system       46,1669 Nov 04 19:42 /dev/rmt0.3
crw-rw-rwT    1 root     system       46,1664 Nov 04 19:42 /dev/rmt0.4
crw-rw-rwT    1 root     system       46,1680 Nov 04 19:42 /dev/rmt0.40
crw-rw-rwT    1 root     system       46,1681 Nov 04 19:42 /dev/rmt0.41
crw-rw-rwT    1 root     system       46,1665 Nov 04 19:42 /dev/rmt0.5
crw-rw-rwT    1 root     system       46,1668 Nov 04 19:42 /dev/rmt0.6
crw-rw-rwT    1 root     system       46,1688 Nov 04 19:42 /dev/rmt0.60
crw-rw-rwT    1 root     system       46,1669 Nov 04 19:42 /dev/rmt0.7
crw-rw-rwT    1 root     system       46,1696 Nov 04 19:42 /dev/rmt0.null
crw-rw-rwT    1 root     system       46,1666 Nov 04 19:42 /dev/rmt0.smc

These files wil be used for writing and reading on tapes. (These special files are /dev/rmt#, /dev/rmt#.1, /dev/rmt#.2, ... /dev/rmt#.7)
By selecting one of these special files, you decide how I/O on the tape drive will be performed: Density, Rewind-on-Close, Rewind-on-Open

Density: It has 2 values. Density #1 is the highest and #2 is the next highest possible density. (for read operation density is ignored)

Rewind–on–Close: If rewind–on–close is selected, the tape is positioned at the beginning of the tape when the file is closed.

Retension–on–Open: Retensioning means winding to the end of the tape and then rewinding to the beginning of the tape to reduce errors. If retension–on–open is selected, the tape is positioned at the beginning of the tape as part of the file open process.



Suppose you want to write three files in tape drive rmt2 with Density Setting #1. You want to write the 1st file to the beginning of the tape, the 2nd file after the 1st file, and the 3rd file after the 2nd file. The following list of special files, in the given order could be used:
1. /dev/rmt2.3
2. /dev/rmt2.1
3. /dev/rmt2 

These particular special files are chosen because:
1.  /dev/rmt2.3: this has Retension–on–Open, which ensures that the first file is at the beginning of the tape. Rewind–on–Close is not chosen because the next I/O operation is to begin where this file ends. (If we are sure the tape is already at the beginning, then using /dev/rmt2.1 would be faster since time for retensioning the tape is eliminated.)

2. /dev/rmt2.1: this has neither Retension–on–Open nor Rewind–on–Close. There is no reason to go to the beginning of the tape either when the file is opened or when it is closed.

3. /dev/rmt2: this is the final file. Retension–on–Open is not wanted since third file follows the second file. Rewind–on–Close is selected because there are no plans to do any more writing after the third file on the tape. The next use of the tape will begin at the beginning of the tape.

(Besides controlling tape operations by choosing a particular rmt special file, you can use the tctl command to control tape operations.)

==============================

Info about tape devices:

Serial number:

# lscfg -vpl rmt0
  rmt0             U78AA.001.WZSHX4S-P1-C3-T2-W500507630F734541-L0  IBM 3592 Tape Drive (FCP)

        Manufacturer................IBM
        Machine Type and Model......03592E07
        Serial Number...............0000078A2434
        Device Specific.(FW)........398B
        Loadable Microcode Level....A1700D78


WW name:

# lsattr -El rmt0 | grep World
node_name       0x500507630f334541 World Wide Node Name                                  False
ww_name         0x500507630f734541 World Wide Port Name                                  False

(on IBM site ww_name was collected, lsattr shows other attibutes like device type, compressed or not... )

==============================

tctl                gives subcommand to tape (move forward/backward)
tcopy               copies magnetic tapes

==============================

Finding parent FC device of a tape (or smc device):


1. lscfg -l rmt* (or lscfg -l smc*)                         <--check location of tape devices
  rmt0             U78AA.001.WZSHX4S-P1-C3-T2-W500507630F734541-L0  IBM 3592 Tape Drive (FCP)
  rmt1             U5877.001.T26V0AX-P1-C3-T2-W500507630FB34541-L0  IBM 3592 Tape Drive (FCP)

2. lscfg -l fcs*                                            <--check FC adapter location
  fcs2             U78AA.001.WZSHX4S-P1-C3-T1  8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
  fcs3             U78AA.001.WZSHX4S-P1-C3-T2  8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
  fcs0             U5877.001.T26V0AX-P1-C3-T1  8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
  fcs1             U5877.001.T26V0AX-P1-C3-T2  8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)

3. compare location codes
rmt0 --> fcs3
rmt1 --> fcs1

==============================

Upgrade Atape

(0. In TSM save current device config)
1.  rmdev -dl rmt#                                            <-- remove tape devices (lsdev -Cc tape)
2. installp -u Atape.driver                                   <--remove older Atape driver (IBM site says it is optional)
3. installp -acXd /tmp/Atape.12.10.1.0 all                    <--install and commit Atape driver
4. reboot recommended (or cfgmgr to reconfigure devices)


==============================

As tapes are used by TSM instance owner, rw permissions needed for all:

$ ls -l /dev/rmt*
crw-rw-rwT    1 root     system       46,1664 Nov 04 19:42 /dev/rmt0
crw-rw-rwT    1 root     system       46,1665 Nov 04 19:42 /dev/rmt0.1
crw-rw-rwT    1 root     system       46,1673 Nov 04 19:42 /dev/rmt0.10
crw-rw-rwT    1 root     system       46,1668 Nov 04 19:42 /dev/rmt0.2
crw-rw-rwT    1 root     system       46,1672 Nov 04 19:42 /dev/rmt0.20

==============================




2 comments:

Mohammed Zameer said...

Very helpful commands

FerGo said...

Thank you for the information, could you explain the process to update the firmware for tape library?

Thanks.