Specifications

20 IBM System z Personal Development Tool: Volume 3 Additional Topics
The following Linux commands were used to set def_reserved_size to 65536:
$ su (change to root)
# rmmod sg (removes the sg module)
# /sbin/modprobe sg def_reserved_size=65536
(loads the sg module with the default reserved size up to 64k)
# cat /proc/scsi/sg/def_reserved_size
(displays the current setting for def_reserved_size)
# exit (leave root)
This change allowed both cards to use 64k reserved buffer size for data transfers. Note that
these commands do not make a permanent change. A Linux reboot puts the default size back
to 32768.
2.3 SCSI utilities
Two zPDT utilities can work directly with SCSI tape drives,
5
assuming the Linux system has
access to the SCSI adapter. Awstape files (in Linux) can be moved to and from SCSI tape
devices using the scsi2tape and tape2scsi commands.
$ scsi2tape /dev/st0 /z/my/TAPE23 copy SCSI tape to awstape file
$ tape2scsi /my/tapes/111111 /dev/st0 write SCSI tape from awstape file
$ scsi2tape -c /dev/st0 /z/mytape2 compress the awstape file
The two commands mentioned here are typically used when zPDT is not active.
6
Linux can provide basic tape utility functions through the mt package. This package is not
required for zPDT, but may be useful in other ways. The package is normally not installed by
default. On older Linux distributions it was found, as follows:
򐂰 For RHEL 5.3, install mt-st-0.9b-2.2.2 (or a later version).
򐂰 For openSUSE 11.1, install cpio-2.9-75.45 (or a later version).
On more recent Linux distributions you may need to search for it. Once installed, you can use
the man mt command to obtain basic documentation.
2.4 awstape utilities
zPDT users often build a substantial “tape” library on disk, all in awstape format. The
tapeCheck command may be used to verify that a file (which corresponds to a tape volume) is
in the correct awstape format.
$ tapeCheck /z/TAPE01 verify format of awstape file
The tape2file command copies an awstape file to a simple byte stream in a Linux file,
removing the awstape control blocks within the file.
$ tape2file /z/mytape /tmp/filex
The card2tape command copies a Linux text file (in ASCII or EBCDIC) to an awstape file as
80-byte records, using the same conversion conventions as the awsrdr device manager:
$ card2tape /tmp/myLinux.stuff /z/tape01 copy without translation
5
In principle, any SCSI tape device that can be used by Linux may be used, although only a small set of drive types
are officially supported by zPDT.
6
If the SCSI devices are not in the active devmap, these utilities can be safely used while zPDT is active.