1828658 Members
1291 Online
109983 Solutions
New Discussion

Re: tk89

 
SOLVED
Go to solution
Jon Pinkley
Honored Contributor

Re: tk89

Dean,

I am attaching a zipped command procedure I wrote to determine the amount of "raw capacity" is left on a DLT drive. I've used it with TZ87, TZ89, DLT8000 and SuperDLT1 drives. The SuperDLT1 drives are quirky, or more likely I am misinterpreting the data returned, but the amount of data that is reported for an empty cartridge is less than one with a small amount of data.

The procedure uses the SYS$ETC:SCSI_INFO program, and interprets the data returned in sense bytes.

To use the procedure:

$ @dlt_remaining_tape mkxxx: ! a DLT device

If the mk device is not mounted, it will mount the tape, report the capacity, skip to the end of the tape, and report the remaining capacity, then dismount the tape.

If the tape is mounted, it just reports the remaining capacity (raw) from that position to the end of the tape.

This isn't exact, but it is very useful.

Following is the response to another thread that I never posted. The only new info is the warning about label processing only checking the first 4 characters of the label unless you specify /exact_label


We use 31744 as block size instead of 32256, although it may not be optimal for DLT drives. I am not sure it the "multiple of 1024" has any effect on DLT, it was what we always used on our 8mm Exabyte drives, and I never changed it.

+++++++++++++++++++++++++++++++++++++++

If you are using a tape drive that has data compression capability built in, you will want to enable it. For example, the DLT2000 has 10GB raw capacity, and claims 20GB with compression. The amount you can get on a tape with compression turned on is very dependent on how much redundancy is in the data, but in general you will get more data on a tape if you enable compression.

As far as tape labeling is concerned, I would recommend against using /ignore=label, and I go one step further, by forcing all 6 characters of the label to be checked via the /exact_label qualifier. This is all covered in the backup documentation. We also prevent accidental reuse of the same tape before it has "expired" by specifying a tape expiration date. Neither of these protects against someone overwriting your tape; they are blade guards that protect against mistakes.

Here are example commands that we use with backup.

First saveset on tape:

Note: use the $ init command to initialize tape before its first use by backup, backup will verify the label is what you specified, and if it is not identical, it will prompt the operator (unless /NOASSIST was specified, or no operator console is enabled) to load the tape with the specified label.

Example to init tape in drive mke400: to "TP0001"

$ initialize mke400: tp0001 /own=system /prot=(s:wred,o:rwed,g,w) /media_format=compaction

If you have a pool of tapes, I would recommend only using the initialize once, then just rotate the tapes after they have reached there date specified by /tape_expiration.


$ BACKUP /BLOCK=31744 - ! largest multiple of 1024 < 32767
/GROUP=0 /CRC - ! group=0 no xor redundancy, most modern tapes have it built in redundancy
/LABEL=6_char - ! exact label
files_to_backup -
tape_drive:max17charsavesetname -
/REWIND - ! initialize tape
/PROTECT=(S,O:RWED,G,W) - ! access only by ower or process with VOLPRO
/TAPE_EXPIRATION=date_when_tape_can_be_reused -
/COMMENT="Your comment here" -
/MEDIA_FORMAT=COMPACTION - ! enable compression by tape drive
/EXACT_ORDER ! don't ignore/generate last 2 char of label

Rest of savesets on the same tape:

$ BACKUP /BLOCK=31744 - ! largest multiple of 1024 < 32767
/GROUP=0 /CRC - ! group=0 no xor redundancy, most modern tapes have it built in redundancy
/LABEL=6_char - ! exact label
files_to_backup -
tape_drive:max17charsavesetname -
/NOREWIND - ! append saveset to end of tape
/COMMENT="Your comment here" -
/MEDIA_FORMAT=COMPACTION - ! enable compression by tape drive
/EXACT_ORDER ! don't ignore/generate last 2 char of label

Note that the /protect and /tape_expiration are meaningful only with /rewind, since they affect the tape header.

Add other appropriate backup qualifiers, /journal=journal_file /list=listing file /ignore= (see backup documentation)

it depends
Mark Hopkins_4
Occasional Advisor

Re: tk89

I need to clear something up here.

/NOALIAS is not necessary on an image backup
of a system disk. In fact, it only applies
to restore operations (the function being
somewhat arcane).

Regardless of whether you specify /alias,
/noalias or leave it off altogether, an image
backup will backup each file on the disk
once and only once. The savesets will be
exactly the same size.

e.g.

dir/size=all $14$dka100:[000000]*.bck

Directory $14$DKA100:[000000]

RMSTA2_ALIAS.BCK;1 2356389/2356410
RMSTA2_DEFAULT.BCK;1
2356389/2356410
RMSTA2_NOALIAS.BCK;1
2356011/2356025

The slight difference here was the result of
backing up a slightly active disk (a log file
got bigger).

There was a bug some time ago (at least 11
years) where /alias didn't do the right
thing, but this has been fixed for at least
11 years.

If you find a case where this isn't true,
report it and we'll fix it (at least on a
more or less recent version ;-)).

Mark Hopkins
OpenVMS engineering
Dean McGorrill
Valued Contributor

Re: tk89

Jon,
I couldn't get it to unzip, can you post it text. sounds like a useful tool!
Mary, have any opening in VMS engineering? :) I sure miss working on it

Dean
Jon Pinkley
Honored Contributor

Re: tk89

Dean,

How did you download the zip file? I just downloaded it my PC, and was able to unzip. It also worked when I ftped to VMS from my PC using binary mode ftp.

Cut/paste ths following into a browser

http://forums1.itrc.hp.com/service/forums/getattachment.do?attachmentId=291545&ext=.ZIP

I tried using (on VMS)

$ wget --output-file=dlt_remaining_tape.zip "http://forums1.itrc.hp.com/service/forums/getattachment.do?attachmentId=291545&ext=.ZIP"

and that did not retrieve a good zip file. I am not sure why. Perhaps CURL would work, I don't have it installed.

I am attaching it as text,

Here are some examples of uing it.(best if you cut and past to 132 column display)

$ sho dev/ful mkd600

Magtape SIGMA$MKD600:, device type COMPAQ SuperDLT1, is online, record-oriented
device, file-oriented device, available to cluster, error logging is
enabled, controller supports compaction (compaction disabled), device
supports fastskip (always).

Error count 0 Operations completed 55776857
Owner process "" Owner UIC [SYSTEM]
Owner process ID 00000000 Dev Prot S:RWPL,O:RWPL,G:R,W
Reference count 0 Default buffer size 512
Density default Format Normal-11

Volume status: no-unload on dismount, beginning-of-tape, odd parity.

$ sho dev/ful mk

Magtape SIGMA$MKD600:, device type COMPAQ SuperDLT1, is online, record-oriented
device, file-oriented device, available to cluster, error logging is
enabled, controller supports compaction (compaction disabled), device
supports fastskip (always).

Error count 0 Operations completed 55776857
Owner process "" Owner UIC [SYSTEM]
Owner process ID 00000000 Dev Prot S:RWPL,O:RWPL,G:R,W
Reference count 0 Default buffer size 512
Density default Format Normal-11

Volume status: no-unload on dismount, beginning-of-tape, odd parity.

Magtape SIGMA$MKE400:, device type COMPAQ DLT8000, is online, record-oriented
device, file-oriented device, available to cluster, error logging is
enabled, controller supports compaction (compaction disabled), device
supports fastskip (always).

Error count 0 Operations completed 12629918
Owner process "" Owner UIC [SYSTEM]
Owner process ID 00000000 Dev Prot S:RWPL,O:RWPL,G:R,W
Reference count 0 Default buffer size 512
Density default Format Normal-11

Volume status: no-unload on dismount, beginning-of-tape, odd parity.

First example is with tapes not mounted. This shows capacity and remaining capacity.
How it does it: mount tape, show determine remaining capacity from current (starting position)
Skip to end of tape data, determine remaining capacity from current position (logical end of tape)
Unmount/nounload tape

$ @dlt_remaining_tape mkd600
%MOUNT-I-MOUNTED, ILS036 mounted on _SIGMA$MKD600:
Total uncompressed capacity of tape ILS036 is 112940572 KB on drive SIGMA$MKD600:
Remaining uncompressed capacity of tape ILS036 is 91651496 KB on drive SIGMA$MKD600:
$ @dlt_remaining_tape mke400
%MOUNT-I-MOUNTED, ILSI15 mounted on _SIGMA$MKE400:
Total uncompressed capacity of tape ILSI15 is 39374696 KB on drive SIGMA$MKE400:
Remaining uncompressed capacity of tape ILSI15 is 25592400 KB on drive SIGMA$MKE400:
$

If the device is mounted, then it just determine remaining capacity from current position. This is useful for
example in a batch job that is doing multiple backups to the same tape, and you want the log file to show how much
tape was used by each saveset. Mount tape, (if appending, skip to end of tape) execute dlt_remaining_tape,
for each saveset, backup, execute dlt_remaining_tape.

$ mou/for mke400
%MOUNT-I-MOUNTED, ILSI15 mounted on _SIGMA$MKE400:
$ set mag/skip=file:8 mke400: ! skip to 4th saveset
$ @dlt_remaining_tape mke400
Remaining uncompressed capacity from current position of tape ILSI15 is 37956688 KB on drive SIGMA$MKE400:
$ set mag/skip=file:9 mke400: ! skip 3 more savesets
$ @dlt_remaining_tape mke400
Remaining uncompressed capacity from current position of tape ILSI15 is 37788752 KB on drive SIGMA$MKE400:
$ set mag/skip=end mke400: ! go to end of tape
$ @dlt_remaining_tape mke400
Remaining uncompressed capacity from current position of tape ILSI15 is 25592400 KB on drive SIGMA$MKE400:
$ set mag/rew mke400: ! back to start of tape
$ @dlt_remaining_tape mke400
Remaining uncompressed capacity from current position of tape ILSI15 is 39374696 KB on drive SIGMA$MKE400:
$ set mag/skip=file:17 mke400:! skip directly to seventh saveset
$ @dlt_remaining_tape mke400
Remaining uncompressed capacity from current position of tape ILSI15 is 37788752 KB on drive SIGMA$MKE400:
$ dism/nounl mke400

Compare these to first run when the tape was not mounted. Also, compare after skipping 3 savesets, then 4 savesets, vs. skipping 7 (results are the same).
it depends
Dean McGorrill
Valued Contributor

Re: tk89

I got it unzipped. I'd called it dlt, but
someone has defined a logical for the tape
drive, called dlt :) Looks like great
tool, as I am a tape newbe. tx jon

Dean
Jon Pinkley
Honored Contributor

Re: tk89

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1147427

note dated Jul 25, 2007 00:56:23 GMT has more details about how the DLT_Remaining_Tape.com procedure gets the information from the drive.

It also has a pointer the a pdf version of the DLT4000 tape drive product manual which describes the SCSI commands the DLT drives use.

http://www.citi.umich.edu/lab/admin-notes/dlt4000productmanual.pdf
it depends