Home
  LDdriver
  Dfu
  CashBack
  Gtan
  Hcam
  Downloads
  Downloads (http)
  Downloads (ftp)
  OpenVMS Decus Archive
  OpenVMS Freeware Archive
  OpenVMS Documentation
  Contact
     

LDdriver is a pseudo device driver for the OpenVMS platform which allows any file to be treated as a disk.

History.

LDdriver was originally written for VAX/VMS around 1985 by a former colleague of mine, Adrie Sweep, a software engineer in The Netherlands. The basic principle worked fine, although it was very inflexible in configuring and usage. Some time later the driver was changed to use so called cloned devices to allow for a very flexible way of managing the virtual disks. Over the years a number of things have been added to allow for far greater versatility, and LD has obviously been ported to Alpha. LD has been a part of OpenVMS since VMS V7.3-1, used by CDRECORD. Beginning in V8.2 LD is fully integrated.

Although LDdriver is currently part of VMS, development by VMS engineering will probably not continue as I have left HP. The good thing is that I will continue to develop LDdriver in my spare time, making separate kits available over time.

What is it?

LDdriver is, as its name implies, a Logical Disk driver running on OpenVMS. Its main use is to use a file on any type of hard disk as a disk. For example, we have a file called LDDISK:[VMS]DISK.DAT then we can use that file as a disk by using the command LD CONNECT LDDISK:[VMS]DISK.DAT LDA1:. After that we have a device LDA1: on the system which we can use as a disk.

To begin using LD its system startup procedure needs to run: SYS$STARTUP:LD$STARTUP, if needed it can be placed in SYS$SYSTEM:SYSTARTUP_VMS.COM. The normal way to use it is without any parameter, but if 9999 LD devices are not enough a parameter can be specified, and that is the controller letter to use for LD. If not specified then LDA will be used, but if one would like an additional controller like LDB then specifying B as the first parameter should do the trick.

If any help is needed, just remember the command LD HELP. Every command is described in detail, and a couple of examples are provided.

The major new feature in LD V9.0 is virtual tape support. This allows a file on disk to be used as a tape device, which can be very handy for testing. To use it substitute the LD command by LM, and create LM devices (Logical Magtape) instead of LD devices.

More information.

There has been an article for the OpenVMS technical journal which has been published in June 2005. You can find it here (pdf).

A presentation about new developments has been given at the OpenVMS Bootcamp in Nashua, NH (USA) in June 2006. You can find it here (ppt).

Another presentation has been given at the OpenVMS Technical Update Days in Nieuwegein (The Netherlands) on October 11, 2006. You can find it here (ppt).

The new presentation about virtual tape support given at the HP OpenVMS Advanced Technical Bootcamp can be found here (ppt).

License:

LDdriver is freeware. It may be freely downloaded and used. The sources are available in the kit, and support is limited. In case of problems report them here and they may get fixed. We are not responsible for any malfunction or data loss caused by this software.

LD V9.7.

LDdriver V9.7 has been released. The following problems have been corrected:

If a containerfile for a virtual tape resided on a disk controlled by SYS$DQDRIVER (IDE disk, Alpha only) then the system could hang when connecting the container file.

If the system has no allocation class specified, and the system name ended in LD then LD SHOW/ALL or LD DISCONNECT/ALL would give an error when it selected the wrong device.

LD V9.6.

LDdriver V9.6 has been released. The following problems have been corrected:

On Ia64 the trace data was not properly displayed, the microseconds resolution field was invalid. This could only happen on OpenVMS V8.3 or above.

On all platforms the display of timing information with /TIMESTAMP=DELTA was incorrect. This could only happen on OpenVMS V8.3 or above.

If a container file does not have the NO_CACHING attribute set it will be set when the file is disconnected (provided that there is write access to the file). Not doing that may leave data in the XFC cache from operations like copy, unzip, etc. causing problems later on when reconnecting the container file.

LD V9.5.

LDdriver V9.5 has been released. A problem has been corrected which may cause applications to fail with floating point errors (like HPARITH faults)  when LD tracing is active. The problem only occurred when LD was running on OpenVMS version V8.3 or higher.

LD V9.4.

LDdriver V9.4 has been released. The only change in this release is in the installer, so that it will now correctly install on OpenVMS E8.4 (fieldtest) and higher.

LD V9.3.

LDdriver V9.3 has been released. This is only a bugfix release fixing two issues:

  • The LM SWITCH command was broken in LD V9.2:

    $ lm switch TEST LMA1:
    %CLI-F-SYNTAX, error parsing 'TRUNCATE'
    -CLI-E-ENTNF, specified entity not found in command tables

  • The default buffer size was set incorrectly to 0 for an LM device:

    Magtape $11$LMA1: (THEINT), device type (Generic SCSI tape), is online, file-
    oriented device.

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

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


    The effect was that MOUNT/BLOCKSIZE=x was not honored, and that copy to
    a files-11 mounted tape may fail for certain files. Other errors are also
    possible, like DUMP from tape may always give 512 byte blocks.

LD V9.2.

LDdriver V9.2 has been released. The major new feature is variable container file support for tape. This allows a file on disk to be used as a tape device, without having to preallocate a certain amount of blocks. This is enabled at CONNECT time with the qualifier /EXTEND. Also, a limit may be placed on the maximum container file size. The default is unlimited, which means that extending the file will stop as soon as the underlaying disk is full.

Example:

$ lm create tape.dsk/size=0
$ lm connect/log/full/extend=10000/limit=5000000 tape.dsk lma1:
%LM-I-CONNECTED, Connected $2$LMA1: to $4$DKA400:[JUR.LD.V92.SRC]TAPE.DSK;1
-LM-I-OPTIONS, Tape unit, Tape loaded, Extend file on demand (size=10000, limit=5000000)
%LM-I-METADATA, Metadata available

Version:                 1
Creator:                 JUR
Process name:              EH?
Account:
UIC:                     [100,100]
Created on system:       THENET
VMS version:             V8.3
Time at creation:        1-MAR-2009 21:30:28.51
Time at last connect:    1-MAR-2009 21:30:36.53
Time at last disconnect: 1-MAR-2009 21:30:28.51
Data start:              1
Data size:               0
Flags:                   tagsinuse
Checksum:                30F9EAF7


This will create a virtual tape of initially 0 blocks in size, and the extension of the container file will be done with 10000 blocks at a time. There's a limit of 5000000 blocks, if the file grows to that limit then the end of tape marker will be returned at 95% of the maximum capacity.

After writing the tape and dismounting it, excess blocks can be removed from the container file with LM DISCONNECT/TRUNCATE or LM UNLOAD/TRUNCATE. This will effectively truncate the container file to the maximum logical block where data has been written.

Specifying /LIMIT without /EXTEND on the CONNECT command is not allowed. The default extension limit for /EXTEND is 65536 blocks if not specified. Specifying /LIMIT=0 is the same as not specifying /LIMIT.

Bug fixes:

IO$_SETMODE to a tape device will now set the correct default device buffer size.

Under very specific circumstances a skip reverse operation to tape resulted in a read request from disk with a random number of bytes. Some controllers rejected the command with SS$_CTRLERR, other errors could be an SS$_BUGCHECK from the driver itself.

A system crash could occur when running LD$STARTUP.COM or LM$STARTUP on a system which was very low on nonpaged pool. Doing that right now will return an error.

The known issues for V9.2 are the same as for V9.0.

The kit may be installed on OpenVMS Alpha V7.3-2, V8.2, V8.3 and X8.4 (Pre-release), or on OpenVMS IA64 V8.2-1, V8.3, V8.3-1H1 and X8.4 (Pre-release).

The kit is located here.

LD V9.1.

LDdriver V9.1 is a bugfix for the installer. The only change is that V9.1 will allow installation on OpenVMS Integrity V8.3-1H1. Attempting to install V9.0 on VMS V8.3-1H1 will result in missing files like LM$STARTUP.COM, LM$UTILITY.EXE etc. If LD V9.0 was installed on OpenVMS Integrity V8.3, and the system has been updated to V8.3-1H1 everything will be fine and no reinstall of LD V9.1 will be needed.

If LD V9.0 has been installed and runs fine then there's NO need to install V9.1 as the images are the same.

LD V9.0.

The current version is V9.0 which runs on OpenVMS Alpha (V7.3-2, V8.2, V8.3), and OpenVMS Itanium (V8.2-1, V8.3). Older versions will probably work, but this has not been tested. This version is NOT supported on OpenVMS VAX, LD V8.3 is the last version to support VAX. The reason is that LD makes heavy use of 64-bit arithmetic and system services. For that reason it will for certain not work on Alpha VMS versions below V7.0.

You can download the LD V9.0 kit here.

New Features

V9.0 has the following new features:

The major new feature is virtual tape support. This allows a file on disk to be used as a tape device, which can be very handy for testing. To use it substitute the LD command by LM, like this:

$ @sys$startup:lm$startup
$ lm create tape.dsk/size=10000
$ lm connect/log/full tape.dsk lma1:
%LM-I-CONNECTED, Connected $3$LMA1: to $3$DKA100:[JUR.LD.V90.SRC]TAPE.DSK;1
-LM-I-OPTIONS, Tape unit, Tape loaded
%LM-I-METADATA, Metadata available

Version:                 1
Creator: JUR
Process name: SysDamager
Account: SYSTEM
UIC: [100,100]
Created on system: THEBAT
VMS version: V8.3
Time at creation: 8-MAY-2007 20:50:19.90
Time at last connect: 8-MAY-2007 20:50:25.49
Time at last disconnect: 8-MAY-2007 20:50:19.90
Data start: 1
Data size: 9999
Flags: tagsinuse
Checksum: 3A4D74B7
$ show dev/full lma1
Magtape $3$LMA1: (THEBAT), device type (Generic SCSI tape), is online, file-
oriented device.
    Error count                    0    Operations completed                  2
Owner process "" Owner UIC [JUR]
Owner process ID 00000000 Dev Prot S:RWPL,O:RWPL,G:R,W
Reference count 0 Default buffer size 2048
Density default Format Normal-11
Allocation class 3
  Volume status:  no-unload on dismount, odd parity.
$ lm trace lma1/all
$ init lma1 test
$ mount lma1 test
%MOUNT-I-MOUNTED, TEST mounted on _$3$LMA1: (THEBAT)
$ lm show/trace lma1
I/O trace for device $3$LMA1:
8-MAY-2007 20:51:59.14 on node THEBAT
End Time           Elaps    Pid       Lbn     Bytes  Iosb    Function
---------------------------------------------------------------------
20:51:49.649071 00.000005 2020042F 0 0 NORMAL PACKACK
20:51:49.649133 00.000000 2020042F 0 0 NORMAL REWIND
20:51:49.649174 00.000001 2020042F 0 0 NORMAL SETMODE|MT3_DENSITY
20:51:49.664598 00.014676 00000000 1 131072 NORMAL READPBLK
20:51:49.666553 00.001917 00000000 257 131072 NORMAL READPBLK
20:51:49.676429 00.009853 00000000 513 131072 NORMAL READPBLK
20:51:49.686808 00.010357 00000000 769 131072 NORMAL READPBLK
20:51:49.686837 00.036922 2020042F 0 80 OPINCOMPL READPBLK
20:51:49.686904 00.000001 2020042F 0 0 NORMAL REWIND
20:51:49.686945 00.000000 2020042F 0 0 NORMAL SETMODE|MT3_DENSITY
20:51:49.687029 00.000001 2020042F 0 0 NORMAL REWIND
20:51:49.687083 00.000014 2020042F 0 80 NORMAL WRITEPBLK
20:51:49.687150 00.000010 2020042F 0 80 NORMAL WRITEPBLK
20:51:49.687209 00.000010 2020042F 0 80 NORMAL WRITEPBLK
20:51:49.687261 00.000001 2020042F 0 0 NORMAL WRITEOF
20:51:49.687292 00.000001 2020042F 0 0 NORMAL WRITEOF
20:51:49.687332 00.000009 2020042F 0 80 NORMAL WRITEPBLK
20:51:49.687378 00.000009 2020042F 0 80 NORMAL WRITEPBLK
20:51:49.687412 00.000001 2020042F 0 0 NORMAL WRITEOF
20:51:49.687442 00.000001 2020042F 0 0 NORMAL WRITEOF
20:51:49.692443 00.004969 00000000 1 1024 NORMAL WRITEPBLK
20:51:49.692483 00.005014 2020042F 0 0 NORMAL REWIND
20:51:49.692533 00.000001 2020042F 0 0 NORMAL AVAILABLE
20:51:49.692586 00.000001 2020042F 0 0 NORMAL AVAILABLE
20:51:53.556264 00.000003 2020042F 0 0 NORMAL PACKACK
20:51:53.556314 00.000000 2020042F 0 0 NORMAL REWIND
20:51:53.556357 00.000000 2020042F 0 16 NORMAL SENSEMODE|MT3_DENSITY
20:51:53.556416 00.000000 2020042F 0 0 NORMAL SETMODE|MT3_DENSITY
20:51:53.556471 00.000001 2020042F 0 0 NORMAL PACKACK
20:51:53.556505 00.000001 2020042F 0 0 NORMAL REWIND
20:51:53.568662 00.012108 00000000 1 131072 NORMAL READPBLK
20:51:53.570605 00.001909 00000000 257 131072 NORMAL READPBLK
20:51:53.572169 00.001541 00000000 513 131072 NORMAL READPBLK
20:51:53.573773 00.001583 00000000 769 131072 NORMAL READPBLK
20:51:53.573811 00.017262 2020042F 0 80 NORMAL READPBLK
20:51:53.582545 00.000014 2020042F 0 80 NORMAL READPBLK
20:51:53.582615 00.000009 2020042F 0 80 NORMAL READPBLK
20:51:53.582667 00.000001 2020042F 0 80 ENDOFFILE READPBLK
20:51:53.582736 00.000001 2020042F 0 0 NORMAL REWIND

There are three commands for volume switch support: LM LOAD, UNLOAD and SWITCH. Initially an LM device can be created without a connected containerfile, with LM CONNECT/NOLOAD LMAx.

After that it can be unloaded with LM UNLOAD LMAx, and reloaded with LM LOAD file LMAx. Switching a volume can be done in one command with LM SWITCH file LMAx. LM SHOW/FULL will display if the tape is loaded or not. So right now DISMOUNT/UNLOAD (the default) will keep the file connected, but move it to the unload state. It is possible to reload it and keep the same file with LM LOAD LMAx (special case command). If the device is unloaded it will return SS$_MEDOFL
when it's accessed. LM LOAD and SWITCH can use the same qualifiers as CONNECT, UNLOAD can use the same qualifiers as DISCONNECT.

If a device is not connected to a container file it can simply be removed with LM DISCONNECT LMAx.

        LM SWITCH newfile.dsk LMA1

This command allows volume switching for backup. The existing virtual tapeunit is re-used with a new container file. If backup is at the end of a tape and issues an Opcom request this commands allows switching of the containerfile.

One thing to notice is that a tape containerfile must be at least 5000 blocks in size. The virtual end of tape is currently fixed at 95% of the containerfile size, after writing that amount of data the driver will return SS$_ENDOFTAPE after every write. This is a warning message only, the data will be written correctly. If the physical end of data is reached an SS$_DRVERR will be returned.

        LM ANALYZE file.dsk [/RECORDS] [/DATA]

This command will verify the integrity of the container file. It can only be used for virtual tapes, disks have their own format (ODS-2/5). The qualifier /RECORDS will show all records with their possible attributes. /DATA will dump the contents of the data records in hex and ascii:

$ lm analyze tape/records
%LM-I-METADATA, Metadata available
Version:                 1
Creator: JUR
Process name: SysDamager
Account: SYSTEM
UIC: [100,100]
Created on system: THEBAT
VMS version: V8.3
Time at creation: 8-MAY-2007 20:50:19.90
Time at last connect: 8-MAY-2007 20:50:25.49
Time at last disconnect: 8-MAY-2007 20:53:23.54
Data start: 1
Data size: 9999
Flags: tagsinuse
Checksum: A7C35A3F
Record:        0 Offset:              0 Lbn:          1 Length:       80
Record: 1 Offset: 116 Lbn: 1 Length: 80
Record: 2 Offset: 232 Lbn: 1 Length: 80
Record: 3 Offset: 348 Lbn: 1 Length: 0 Flags: EOF
Record: 4 Offset: 384 Lbn: 1 Length: 0 Flags: EOF
Record: 5 Offset: 420 Lbn: 1 Length: 80
Record: 6 Offset: 536 Lbn: 2 Length: 80
Record: 7 Offset: 652 Lbn: 2 Length: 0 Flags: EOF
Record: 8 Offset: 688 Lbn: 2 Length: 0 Flags: EOF
Record: 0 Offset: 0 Lbn: 1 Length: 0 Flags: EOD
%LM-I-ANALYZEOK, Container file structure successfully verified
Bytes read: 524288
Records read: 10
Databytes read: 400
Eof count: 4

        LD CREATE/ERASE

This will erase the containerfile after creation. It may be used to speed up initial shadow copies, or when init has a problem initializing a virtual disk due to previous stale data and the
user lacks VOLPRO privilege to override that.

If creation of a containerfile is done on a disk with highwater marking enabled, a warning will be issued that it may take some time if the filesize is above 100000 blocks (VMS V8.2 and higher only).

        LD CONNECT/LOGICAL=(NAME=logical-name[,TABLE=table][,MODE=mode])

This allows a logical name to be associated with the connected LD device.

        LD SHOW/FULL

This will show all attributes of the selected LD device:

$ ld show/all/full
%LD-I-CONNECTED, Connected _$3$LDA1: to $1$DGA100:[JUR.LD.V90.SRC]FILE.DSK;1
-LD-I-OPTIONS, Shared
%LD-I-CONNECTED, Connected _$3$LDA2: to _$3$DQA0:
-LD-I-OPTIONS, Replaced, Trace active, No DSE support, Not Forced Error capable


        LD SHOW/TRACE/TIMESTAMP=START or END

This allows selection of absolute start and end time of trace data.

        LD SHOW/SYMBOL

This will get the LD unit number in DCL symbol LD_UNIT, and the container file specification in the symbol LD_CONTAINER. For tape it will be LM_UNIT and LM_CONTAINER.

There's more accurate timing in trace messages (microsecond accuracy) (Only in VMS V8.3 and higher):

$ ld show/trace lda1
I/O trace for device $3$LDA1:
17-MAY-2006 09:21:15.16 on node THEBAT
End Time           Elaps    Pid       Lbn     Bytes  Iosb    Function
---------------------------------------------------------------------
09:21:12.232269 00.000000 2060042F 0 0 NORMAL PACKACK
09:21:12.240950 00.008581 2060042F 1 512 NORMAL READPBLK
09:21:12.247513 00.006426 2060042F 1034 512 NORMAL READPBLK
09:21:12.248595 00.000959 2060042F 50033 512 NORMAL READPBLK
09:21:12.249557 00.000838 2060042F 50034 512 NORMAL READPBLK
09:21:12.255176 00.005504 2060042F 50016 512 NORMAL READPBLK
09:21:12.263548 00.008258 2060042F 50016 512 NORMAL WRITEPBLK


LD SHOW/TRACE can now show the contents of the LBN and BYTECOUNT fields in decimal and hex with /LBN=[HEX,DECIMAL] or /BYTECOUNT=[HEX,DECIMAL].

Trace data for the LM device will by default not contain the data to/from disk initiated by the driver (with a PID field of 0). To enable tracing of this data use /ALL with LD TRACE.

If an older version of LD was loaded when the new LD version is installed, the system has to be rebooted before LM can be used since LD and LM use the same driver.

Known problems.

LM SHOW/TRACE/CONTINOUS can not yet be trusted completely, it may cause invalid data to be written to tape if used on an LM device while writing to tape.

Switching volumes due to tape full on a Files-11 mounted tape may get errors.

The accurate timing measurements may be way off if a cpu is stopped and restarted. Disconnecting and reconnecting the LD device will fix it.

Copying .OBJ files (and possibly others) may give SS$_BADATTRIB errors. This is not stricktly an error since any copy of a file on a files-11 mounted tape may generate this error for records smaller than 14 bytes. These small records are rejected by the VMS I/O system as documented in the I/O User's reference manual. A real tape device will behave the same.

Issue with LDdriver on volumesets.

There is an issue when an LD containerfile is stored on a volumeset. Reads and writes to or from the file are always directed to the member where the container file is stored, which can result in disk corruption on that member, if the containerfile extends to other members of that volume set. This is fixed in LD V8.3 and the V9.0 kit.

This problem was introduced in LD V8.0, and is also present in LD V8.1 and V8.2. The native version of LD present in VMS V8.3 is also affected. This is for all supported architectures (Alpha, Ia64 and Vax).

The new kit can be found on the download page.

Issue with LM SWITCH command in LD V9.2

The LM SWITCH command will give an error:

 $ lm switch TEST  LMA1:
%CLI-F-SYNTAX, error parsing 'TRUNCATE'
-CLI-E-ENTNF, specified entity not found in command tables

This is a problem in the command table definitions of LD. A workaround is this:

  1. Get the new table definitions here.

  2. Execute these commands:

$ set command/tables=sys$share:dcltables.exe/output=sys$common:[syslib]dcltables.exe ldcld.cld
$ install replace sys$share:dcltables
$ set command/tables=sys$share:dcltables

This will be fixed in the next release.

Issue with floating point data corruption LD V9

A problem has been reported for LD which may cause applications to fail with floating point errors (like HPARITH faults)  when LD tracing is active. The problem has been identified and a new driver and kit will be created soon. As a workaround, don't use I/O tracing.

The problem can happen in LD V9.0 through V9.4. LD V9.5 will have a solution.

 

For any requests of new functionality please drop me a mail. I will seriously consider all suggestions.



Last changed on
8-Aug-2012

 
  Digiater.nl - Westelbeers - info@digiater.nl