Trailing-Edge
-
PDP-10 Archives
-
BB-H311B-RM
-
swskit-utilities/ds.mem
There are 6 other files named ds.mem in the archive. Click here to see a list.
USING THE DS PROGRAM
This document discusses version 1(31) of the DS program.
The program DS (Disk Stuff) is a utility program to provide
information about TOPS-20 disks, both as structures, and as individual
units or packs. As such it can be a big aid in any attempted
reconstruction of a trashed pack, or recovery of damaged files. In its
current incarnation, this program does not do any writing to the units
about which it gathers information, which means that the actual
bit-flipping for any repairs must be done via other means, such as
FILDDT. This also means that there should be no fear of running DS and
accidentally making things worse or trashing yet another disk.
To provide much of its information, the DS program requires special
process capabilities. The program will enable these itself. The
program is oriented to the level of the user who possesses sufficient
understanding to interpret the information provided, and possibly take
corrective action.
DS does not make the attempt to be all-inclusive. Other available
programs such as CHECKD, FILDDT, DIRTST, and DIRPNT provide functions
which DS does not attempt to duplicate, at least currently. Some
reference to these programs will be made later on in this document.
1.0 THE STRUCTURE COMMAND
The STRUCTURE command is used to specify that I/O is to be directed
at the given structure. This implies that the given structure is
already mounted by the system and accessible to the user. The implied
command structure of DS is such that the structure or unit to which I/O
is to be directed must be specified before commands attempting to
reference that structure or unit. The alternative would be to specify
the structure or unit with each command, which was deemed less desirable
for the environment where one is predominantly interested in examining a
single structure or unit, and continually having to give its identity
would be an irritant. The DRIVE command is used to specify a particular
unit for I/O.
2.0 THE DRIVE COMMAND
The DRIVE command is provided to allow the specification of a
particular drive unit to direct I/O to, by giving the channel and unit
specification for the drive. This information, if not known a priori,
might be obtained from the INFORMATION command, depending on the
condition of the unit. The STRUCTURE command is used to specify a
mounted structure. The DRIVE command may refer to an unmounted pack, or
a pack which is part of a mounted structure. If the specified unit is
USING THE DS PROGRAM Page 2
part of a mounted structure, a warning message to that effect will be
printed. An off-line or otherwise inaccessible unit will not be
accepted as the argument for the DRIVE command.
3.0 THE INFORMATION COMMAND
This command produces yet another variant of the UNITS display for
the disk drives available to the system. The standard channel, unit,
controller, alias, structure ID, logical pack number, drive type, and
drive status are provided. The major purpose is to provide the channel
and unit numbers of a pack for physical unit addressing, but display may
provide some useful information on a suspicious pack. The possible
values in the Status column are:
Off-line - unit is off-line currently.
Mounted - unit is part of a mounted structure.
Diagnostic - unit is allegedly being used by an on-line diagnostic.
Errors - unit has an error that was detected during reading.
BadBAT - unit has a bad BAT block. Other information may be wrong.
BadHOM - unit has a bad HOME block.
Write-locked - unit is write-locked.
4.0 THE CHECK COMMANDS
The CHECK commands are designed to read the specified object and
report on its condition. Some of the information provided can help to
repair that condition.
4.1 CHECK PAGE
The CHECK PAGE command desires the disk address of a page on the
selected unit or structure. In addition, a repeat count may be
specified, or UNTIL-STOPPED may be used. A Control-E will abort the
repeat operations. The page is read using DSKOP and its condition
reported. The responses should be one of the following:
[ n errors counted ] - error summary for the operation.
No problems encountered reading page - page read correctly on the
first try.
USING THE DS PROGRAM Page 3
% Transient read errors encountered reading page - more than one
try was required to read the page, but ECC was not needed.
% ECC is required to read page - the page was able to be read
correctly by applying error correction to the data.
% Page is completely unreadable - ECC was not sufficient to read
the the page. The contents might still be recovered if more heroic
measures are taken, such as many repetitions, or moving the pack to
another drive. The system will probably always report this page dead in
this configuration. Possibly only one sector of the page is damaged,
however, and this could be determined by selecting addresses to exclude
various sectors, or by using a program which attempted a
sector-by-sector recovery of the page.
4.2 CHECK INDEX-BLOCK
The CHECK INDEX-BLOCK command desires the disk address of the page
containing the index block. That page is then read using DSKOP as in
the CHECK PAGE command, and the same messages reported. If the page is
found to be readable, further checks are made, and one or more of the
following messages issued:
Contents of Index Block appear to be consistent - no other problems
detected with the index block page.
% BAT Bit is set for Index Block - the bit indicating that this
index block contains the address of a page in the BAT Blocks is set.
For various reasons, this does not always indicate an unreadable page
addressed by this index block, but if the block is otherwise valid, it
indicates that the system did have I/O problems with one of the pages at
some time.
% Non-address bits in Index Block are non-zero - this indicates
that in at least some of the words of the index block, there is non-zero
data in the high-order nine bits of the word. Except for the first four
words, containing the checksum, these bits should all be zero.
% Checksum for Index Block is incorrect, should be <number> - this
indicates that the page does not have the correct checksum to be a valid
index block. The monitor will not use such an index block, and generate
an error. The "correct" checksum for the page is given for the purposes
of comparison, and as an aid to those cases where you may be building an
index block up by hand, or repairing or modifying it to point to another
set of pages. This calculation of the checksum will allow you to avoid
doing it by hand, and validate the constructed index block to be sure
you have the overhead and consistency information right.
USING THE DS PROGRAM Page 4
4.3 CHECK FILE-READABILITY
The CHECK FILE-READABILITY command desires a possibly wild file
specification for the files it is to check for "readability". The
function performed is more or less identical to the program READ. All
pages of the files specified are read-tested. The data pages are tested
as in CHECK PAGE, and the index blocks and super index block are tested
as in CHECK INDEX. The error messages which may result are similar to
the preceding commands. This command may be aborted with a Control-E,
at which time the error total line is printed. Each filename is listed
as the command begins to process the file. This command does not
require a prior DRIVE or STRUCTURE command to have been given.
The disk address of any page of the file with problems is included
with the error messages for that page. The address can allow further
followup with some of the other commands, such as CHECK PAGE or CHECK
INDEX.
5.0 THE COPY COMMANDS
The purpose of the COPY command is the recovery of data. That data
might be a simple page of disk data, or the contents of a file or a long
file. In order to recover the data, the appropriate disk address must
be given. Obviously, this command is oriented towards disks where the
pack is bad enough off to not be mountable, perhaps too hard to repair
in place, but there is a limited number of files which must be
recovered.
This command also has uses in the attempt to repair a structure
toward mountability. For instance, it is extremely useful to use this
command to copy out the root-directory for the structure during a repair
operation. That way, one can run DIRTST and DIRPNT on the file and both
check its consistency and get a listing of disk addresses to follow the
tree down to the desired files.
The same could be done with other directory files. Even in cases
where the ultimate desire is to delete a sick directory, and make a new
one without performing repairs; the COPY command might be used to copy
out the sick directory into a data file which might then be later
analyzed for clues as to the cause of the corruption.
All of the COPY commands set the byte size of the file created to
36 bits and the end-of-file pointer to the byte beyond the last page of
the file copied out. All reads from the selected unit are diagnosed for
errors, and any index blocks involved are checked over also. Messages
concerning any problems with any of the pages will appear on the
terminal. The destination file specification must be on a disk device
since PMAP I/O is done to create the output file.
USING THE DS PROGRAM Page 5
5.1 COPY PAGE
The COPY PAGE command accepts a disk address and an output file
specification, and copies the page at that disk address to the output
file from the specified structure or unit.
5.2 COPY FILE
The COPY FILE command accepts a disk address on the selected unit
or structure, which is used as the address of the index block for the
file copied out to the output file specification.
5.3 COPY LONG-FILE
The COPY LONG-FILE command accepts a disk address on the selected
unit or structure, which is used as the address of the super-index block
of the file copied out to the output file specification.
6.0 THE DUMP COMMANDS
The DUMP commands provide interpreted dumps of various disk
structures, as described below. Other programs such as DIRPNT provide
additional disk structure information that DS does not. The dump output
can be redirected from the terminal to another file by using the OUTPUT
command, in case the output is to be saved, or a hard-copy produced, for
instance.
6.1 DUMP PAGE
The simplest DUMP command is DUMP PAGE. It accepts the disk
address of a page on the selected drive or structure, and dumps out the
contents of that page to the selected output file in octal, SIXBIT,
left- and right-justified ASCII, and PDP-11 format ASCII, preceded by
the page offset of the word. This command may be aborted with
Control-E.
6.2 DUMP INDEX-BLOCKS
The DUMP INDEX-BLOCKS command takes a possibly wild file
specification, and for each file in the specification, produces a
listing of the disk addresses for the data pages of the file, along with
the disk address of any index or super-index blocks. Any disk reading
problems encountered while obtaining this information are printed. This
command may be aborted with Control-E.
USING THE DS PROGRAM Page 6
6.3 DUMP HOME-BLOCKS
The DUMP HOME-BLOCKS command produces a listing of the HOME blocks
for the selected unit or structure, along with consistency information.
The HOME blocks are read and checked and the results printed. One or
more of the following will appear:
Primary HOME Block is unreadable - the primary HOME block could not
be read by the program.
Read of Primary HOME Block encountered errors - the HOME block was
able to be read by mutilple tries or ECC.
Secondary HOME Block is unreadable - as for primary.
Read of Secondary HOME Block encountered errors - as for primary.
Primary HOME Block is bad - the primary HOME block failed to pass
the consistency tests required for a HOME block. See the interpreted
dump for more information on what is wrong.
Secondary HOME Block is bad - as for primary.
HOME Blocks are inconsistent - the HOME blocks do not agree with
one another. See the difference listing for which words disagree.
HOME Blocks appear to be ok - no problems noticed.
Next appears the interpreted listing of the contents of the HOME
blocks. The format is word offset in the block, mnemonic, "explanation"
of the usual contents, and then the contents of the word printed in the
appropriate units.
After that is a listing of differences between the primary and
secondary HOME blocks as an aid in diagnosing error conditions.
6.4 DUMP BAT-BLOCKS
The DUMP BAT-BLOCKS command produces a listing of the BAT blocks
for the selected unit or structure, along with consistency information.
The BAT blocks are read and checked and the results printed. One or
more of the following will appear:
Primary BAT Block is unreadable - the primary BAT block could not
be read by the program.
Read of Primary BAT Block encountered errors - the BAT block was
able to be read only by multiple tries or ECC.
Secondary BAT Block is unreadable - as for primary.
USING THE DS PROGRAM Page 7
Read of Secondary BAT Block encountered errors - as for primary.
Primary BAT Block is bad - the primary BAT block failed to pass the
consistency tests required for a BAT block. See the interpreted dump
for more information on what might be wrong.
Secondary BAT Block is bad - as for primary.
BAT Blocks are inconsistent - the BAT blocks do not agree with one
another. See the difference listing for which words disagree.
BAT Blocks appear ok - no problems noticed.
Next the count of BAT block pairs added by the MAPPER program
(DDRPI) is displayed, and the count of entries written by the monitor,
and the total.
After that, if there are any entries in the blocks, they are
displayed, broken down into the disk address on the unit of the
beginning of the bad region, the size of the bad region in sectors, the
APR serial number of the processor writing the entry, and the channel
and unit number of the drive that the pack was mounted on when the
region was first noted bad.
Finally, a listing of the differences between the primary and
secondary BAT blocks is done as an aid in diagnosing error conditions.
6.5 DUMP MICROPROCESSOR-FILE-SYSTEM-DIRECTORY
The DUMP MICROPROCESSOR-FILE-SYSTEM-DIRECTORY command is just about
the only method existing to peek into the internals of the front-end
file system for the 2020 processor-based systems. It will provide
information on the contents and location of the files in the region used
by the microprocessor front-end by interpreting the pointer locations in
the HOME blocks and the word pairs in the file-system directory.
First the HOME block information is printed, in the same format as
the DUMP HOME-BLOCKS command uses. Then follows the directory page
information. The pre-defined files are named, and the others, the
so-called "indirect files" are numbered. Then there is a header line
and a line of interpreted directory information, consisting of the page
offset within the microprocessor file system of the starting page of the
file region, the corresponding disk address, the microprocessor format
cylinder, track and sector of that address, and the length in pages of
the file region. There are consistency checks done on the page offset,
file length, and unused bit fields of the cylinder/track/sector word,
which may generate warning messages.
Diagnostic read messages may appear if there is trouble in reading
the directory page of the file system or the HOME blocks. This command
may be aborted with Control-E.
USING THE DS PROGRAM Page 8
7.0 THE VERIFY COMMAND
The VERIFY command performs a function similar to that of the
VERIFY function of the FORMAT program. It reads the specified unit or
structure using DSKOPs, page by page, sequentially, and will report any
errors encountered reading any page. Pages which turn out to be
unreadable will thereby become logged in the BAT blocks for the
appropriate unit. Clearly, this particular function is of the most use
just after the structure has been created; however, the location of
pages which recover after a few tries or which recover after ECC is
applied is sometimes useful. For instance, elimination of such pages
from the swapping space by putting them in the BAT blocks is generally a
good idea.
The VERIFY command may be aborted by using Control-E. An error
totals line will be printed. The Control-A character may be used during
a VERIFY to obtain a status line of the current disk address being
worked on, the percentage of the structure or unit completed, and the
current error count.
8.0 THE OUTPUT COMMAND
The OUTPUT command is provided to allow specifying an alternate
file specification for the output produced by the program (primarily the
DUMP commands). The default is the terminal. The output can be changed
with another OUTPUT command, which closes the current file. Any error
which results in a question-mark error message will also do an implicit
close on the output file so that the data is not lost. In this
situation, the output has been redirected back to the terminal.
9.0 THE PUSH COMMAND
The PUSH command is the way provided to transfer to a new EXEC in
an inferior process without leaving DS and being able to POP back to it
after completing whatever you needed to PUSH for.
10.0 THE FILDDT COMMAND
The FILDDT command will attempt to run SYS:FILDDT.EXE in an
inferior process. The physical addressing features of FILDDT provided
for Release 4 of TOPS-20 provide access to the disk in ways that DS does
not. For instance, FILDDT will allow writes to the disk if patching is
enabled, whereas DS makes no changes on the disk. In a disk repair
operation, information might be provided by DS, and the actual changes
made by FILDDT in order to correct the disk data. EXITing from FILDDT
will return to DS command level.
USING THE DS PROGRAM Page 9
11.0 THE EXIT COMMAND
The EXIT command leaves DS. If a CONTINUE is attempted after an
EXIT, it is as if START had been typed.
12.0 THE HELP COMMAND
The HELP command prints out the assembled-in help text for the
commands.
13.0 THE TAKE COMMAND
The TAKE command accepts the file specification for a command file.
TAKEs may not be nested, and an error will abort the TAKE file. Since
DS will be mainly used in an information-gathering capacity when there
is an unknown disk error condition, use of standard TAKE files is not
expected as a normal situation.
14.0 EXAMPLE TYPEOUTS
Here are some example outputs from using the program:
@DS
DS Disk Utility Program %1(31)
DS>? one of the following:
CHECK COPY DRIVE DUMP EXIT
FILDDT HELP INFORMATION OUTPUT PUSH
STRUCTURE TAKE VERIFY
DS>INFORMATION (ABOUT DISK UNITS)
Channel Unit Controller Alias Str-ID Pack Type Disk Status
0 6 -- PS PS 2/2 RP06 Mounted
0 7 -- SNARK SNARK 1/1 RP06 Mounted
1 0 -- PS PS 1/2 RP06 Mounted
1 1 -- NET NET 1/1 RP06 Mounted
1 2 -- RP04 Off-line
2 3 -- RP06 Off-line
2 4 -- MISC MISC 1/1 RP06 Mounted
2 5 -- FINAL FINAL 1/1 RP06 Mounted
5 1 -- REL4 REL4 1/1 RP06 Mounted
DS>STRUCTURE (TO USE) PS:
DS>DUMP ? one of the following:
BAT-BLOCKS HOME-BLOCKS
INDEX-BLOCKS MICROPROCESSOR-FILE-SYSTEM-DIRECTORY
PAGE
DS>DUMP HOME-BLOCKS (FOR STRUCTURE)
USING THE DS PROGRAM Page 10
HOME Blocks for Logical Unit 0:
HOME Blocks appear to be ok
0 HOMNAM SIXBIT/HOM/: HOM
3 HOMSNM SIXBIT/Structure Name/: PS
4 HOMLUN # of Packs in STR,,Logical Unit in STR: 1,,0
5 HOMHOM Sector Number of This HOME Block,,Sector # of Other: 1,,12
6 HOMP4S Number of Pages for Swapping on this Unit: 8029.
7 HOMFST First Swapping Cylinder on Unit: 455
10 HOMRXB Address of ROOT-DIRECTORY Index Block: 10005740
11 HOMBXB Address for BACKUP-COPY-OF-ROOT-DIRECTORY: 10013700
12 HOMFLG Flags: No Flags Set, Unlimited Directories Allowed
13 HOMSIZ Number of Sectors in this Unit: 121360.
14 HOMBTB Number of Cylinders in Structure: 820.
15 HOMMID Pack Unique Code: 125656632624
61 HOMFE0 Front End File System Starting Sector: 0
62 HOMFE1 Front End File System Size in Sectors: 0.
101 HOMFE2 BOOTSTRAP.BIN Starting Sector: 100000000224
102 HOMFE3 BOOTSTRAP.BIN Size in Sectors: 256.
165 HOMUID -11 Format Unit I.D. (12 Characters): P S^@^@^@^@^@^@^@^@^@^@
170 HOMOID -11 Format Owner I.D. (12 Characters): O P E R A T O R^@^@^@^@
173 HOMFSN -11 Format File System Name: T O P S - 2 0
176 HOMCOD Unique Code 707070: 707070
177 HOMSLF Sector Number of this Block: 1
DS>
DS>DUMP BAT-BLOCKS (FOR STRUCTURE)
BAT Blocks for Logical Unit 0:
BAT Blocks appear ok
Mapper added count: 0. MONITOR added count: 14. Total: 14.
Unit-Address Size(Sectors) APR number Channel Unit
5670 4. 1. 0 7
156634 4. 1. 0 7
162126 4. 1. 0 7
204524 4. 1. 0 7
167256 4. 1. 0 7
161302 4. 1. 0 7
171102 4. 1. 0 7
171146 4. 1. 0 7
203062 4. 1. 0 7
177502 4. 1. 0 7
156412 4. 1. 0 7
263032 4. 4097. 0 4
234464 4. 4097. 0 3
6560 4. 4097. 0 2
DS>
DS>DRIVE (TO USE IS ON CHANNEL) 0 (UNIT) 2
% Unit is part of a mounted Structure
DS>DUMP MICROPROCESSOR-FILE-SYSTEM-DIRECTORY (FOR UNIT)
HOME Block Information:
USING THE DS PROGRAM Page 11
101 HOMFE2 Microprocessor File System Starting Sector: 100000000224
102 HOMFE3 Microprocessor File System Size in Sectors: 256.
103 HOMFE4 Microprocessor Format Cylinder/Track/Sector: 1/0/0
Directory Page Information:
Free Space Region
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
32. 424 1/ 4/ 10 32.
Microcode File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
1. 230 1/ 0/ 4 12.
Monitor Pre-BOOT File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
13. 310 1/ 1/ 26 1.
Diagnostic Pre-BOOT File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
14. 314 1/ 1/ 32 1.
BOOTCHECK 2 File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
15. 320 1/ 2/ 0 12.
Monitor BOOT File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
27. 400 1/ 3/ 22 1.
Diagnostic BOOT File
Starting Page Offset Disk Address CYL/TRK/SEC Length in Pages
28. 404 1/ 3/ 26 4.
DS>DUMP PAGE (AT DISK ADDRESS) 1
Address Octal SIXBIT L-ASCII R-ASCII 11-ASCII
0/ 505755000000 HOM Q > h^@^@ " } P^@^@ m^K^@^@
1/ 0 ^@^@^@^@^@ ^@^@^@^@^@ ^@^@^@^@
2/ 0 ^@^@^@^@^@ ^@^@^@^@^@ ^@^@^@^@
3/ 545741446400 LOADT Y >^L M^@ 2 |^Y^Z^@ a K^@ M
4/ 1000000 ! ^@^@^H^@^@ ^@^@^P^@^@ ^A^@^@^@
5/ 12000001 * ! ^@^@ P^@^@ ^@^A ^@^A ^J^@^A^@
6/ 0 ^@^@^@^@^@ ^@^@^@^@^@ ^@^@^@^@
7/ 620 &0 ^@^@^@^A H ^@^@^@^C^P ^@^@^P^A
10/ 10005740 ( O@ ^@^@ @^K p ^@^A^@^W ` ^H^@ `^K
11/ 10013700 (!? ^@^@ @^W ` ^@^A^@ / @ ^H^@ @^W
12/ 0 ^@^@^@^@^@ ^@^@^@^@^@ ^@^@^@^@
13/ 1121600 !*. ^@^@^I # @ ^@^@^R G^@ ^A^@^@ #
14/ 1440 ,@ ^@^@^@^C^P ^@^@^@^F ^@^@ ^C
15/ 125071500124 *HYH!4 ^U # M^@ * * G^Z^@ T 9 * T^@
16/ 0 ^@^@^@^@^@ ^@^@^@^@^@ ^@^@^@^@
% Page Dump aborted
DS>
USING THE DS PROGRAM Page 12
DS>STRUCTURE (TO USE) PS:
DS>CHECK PAGE (AT DISK ADDRESS) 725220 (NUMBER OF TIMES) UNTIL-STOPPED
% Transient read errors encountered reading page
% Transient read errors encountered reading page
% Transient read errors encountered reading page
% Transient read errors encountered reading page
% Transient read errors encountered reading page
% Check Page function aborted
[ 5. errors counted ]
DS>CHECK PAGE (AT DISK ADDRESS) 725220 (NUMBER OF TIMES) 3
[ 0. errors counted ]
DS>
DS>CHECK INDEX-BLOCK (AT DISK ADDRESS) 1000
No problems encountered reading page
% BAT Bit is set for Index Block
% Checksum for Index Block is incorrect, should be 56575,,372200
% Non-address bits in Index Block are non-zero
DS>CHECK FILE-READABILITY (OF FILES) DS.EXE
[Attempting to read file DS.EXE.2]
[ Total problems noted: 0]
DS>COPY ? one of the following:
FILE LONG-FILE PAGE
DS>COPY PAGE (AT ADDRESS) 1000 (TO) FOO.BAR.1 !New file!
[ COPY Completed ]
DS>
DS>DUMP INDEX-BLOCKS (OF FILE) DS.EXE
Disk Addresses for File DS.EXE.2
Contents of Index Block for Section 0, Disk Address 10050464
0/ 10050470 10050474 10050500 10050504
4/ 10050510 10050530 10050534 10050540
10/ 10050544 10050550 10050554 10050560
12. Pages in use by this Index Block
DS>DRIVE 0 0
DS>VERIFY (UNIT)
[ Working on pack on Channel 0, Unit 0 ]
Working on disk address 2140 ( 0%), error count is 0
Working on disk address 7444 ( 1%), error count is 0
Working on disk address 15220 ( 2%), error count is 0
% Verification pass aborted
[ Total problems noted: 0 ]
DS>EXIT
@
[End of DS.MEM]