Revision Information: This manual supersedes V2.5
Date: October 1998
Operating System: OpenVMS V6.2 thru 7.2
Note: Part of the Freeware Software
The OpenVMS Freeware CD-ROM contains free software tools and utilities to aid software developers in creating applications and managing and using OpenVMS systems.
Many of these tools are popular packages already widely known and in use, while others are internally developed Digital tools our engineers are making available to our OpenVMS customers. For example, the OpenVMS Freeware CD-ROM includes Bliss-32 for OpenVMS VAX, Bliss-32 for OpenVMS AXP, and Bliss-64 for OpenVMS AXP.
Disclaimer on Testing, Quality, and Licensing
The OpenVMS Freeware for VAX and AXP Systems CD-ROM is provided "AS IS" without warranty. Digital imposes no restrictions on its distribution, nor on the redistribution of anything on it. Be aware, however, that some of the packages on the CD-ROM may carry restrictions on their use imposed by the original authors. Therefore, you should carefully read the documentation accompanying the products.
Digital Equipment Corporation is providing this software free of charge and without warranty. Included in the [FREEWARE] directory on this CD are the GNU software licenses. Unless otherwise stated in sources or source packages, the GNU licenses cover all software supplied on this CD.
Digital makes no claims about the quality of this software. It is provided to the customer as a free service.
The Disk / File utilities is a tool developed to help finding and solving disk , directory and file problems. The usage of low-level VMS-I/O features have resulted in a powerfull and high-performance utility. Also, DFU provides many features which are not available with normal DCL commands.
DFU supports all types of disk sets which comply to the VMS ODS-2 standard such as volume sets, stripe sets, shadow sets and RAID sets, and combinations of these. Spiralog disks are NOT supported
DFU also supports the new Extended File Specifications (also known as ODS-5) which is introduced in VMS 7.2 (Alpha-only).
DFU is fully Year-2000 compliant.
1.1 Support on DFU
Although there is no official support on DFU you may mail questions/remarks/bug reports to the author via internet at:
ton.dorland@digital.com.
1.2 General description
DFU provides the following functions (in alphabetical order) :
Each function is described in detail in the corresponding chapter.
DFU is supported on OpenVMS V6.2 through V7.2 (VAX and Alpha).
1.3 New features and bugfixes of V2.6
This version of DFU offers some improved and new features, as well as a couple of bugfixes. All bugfixes previous released as V2.5 ECO 1 and ECO 2 are included in V2.6. The table below lists all new features :
The following bugs and problems are fixed :
1.4 Restrictions and Parameters
The DFU program has a few restrictions :
The following minimum process quotas are recommended for DFU usage:
If you use DFU on volume sets with a large number of members you may need to increase the SYSGEN parameter CHANNELCNT.
If you use the directory command on very large directory files (> 1000 blocks) and run into errors you may need to increase the following parameters:
Do not change parameters unless you run into errors such as EXCEEDED
QUOTA or INSUFFICIENT WORKING SET LIMITS.
1.5 Restrictions on FAST-IO features
VMS 7.1 introduced a way to improve I/O performance, called FAST-IO. This feature does only work on Alpha. DFU will try to perform directory processing using FAST-IO. If this fails DFU will switch back to 'normal' I/O. To enable FAST-IO the following conditions must be met:
If DFU can use FAST-IO then commands such as DIR/ALIAS, DIR/VERSION and VERIFY/DIR will gain a 10-15% performance improvement.
This chapter describes the installation procedure and other actions
which must be taken to run DFU.
2.1 Installation procedure
DFU must be installed with the PRODUCT INSTALL utility. During the installation PRODUCT INSTALL does the following:
The DFU utility in fact contains just 2 files :
The installation no longer offers an opportunity for private installation. If you don't want DFU to be available systemwide you must manually move DFU.EXE and the help file to your private directory.
To install DFU log in into a privileged account. Next, copy the .PCSI installation kit to disk:[directory] (may be anywhere on your system). Note that there are two different kits, one for the VAX and one for the Alpha architecture, named DEC-VAXVMS-DFU-V0206--1.PCSI and DEC-AXPVMS-DFU-V0206--1.PCSI. Next enter the following command:
$ Product Install DFU/SOURCE=disk:[directory] The following product has been selected: DEC VAXVMS DFU V2.6 Do you want to continue? [YES]
If you enter YES the installation will proceed :
*** DEC VAXVMS DFU V2.6: Disk and File Utilities for OpenVMS Do you want all the default values for this product? [YES]
If you enter YES DFU will be installed with all manuals. If you enter NO you will be prompted for the manuals you want to install. Finally, Product Install will continue with the installation :
%PCSIUI-I-DONEASK, execution phase starting The following product will be installed: DEC VAXVMS DFU V2.6 %PCSI-I-VOLINFO, estimated space information for volume DISK$OPENVMSVAX -PCSI-I-VOLSPC, 93 required; 373793 available; 373700 net Portion Done: 0%...10%...20%...30%...70%...80%...100% The following product has been installed: DEC VAXVMS DFU V2.6
If you installed DFU system wide you may manually execute SYS$STARTUP:DFU$STARTUP.COM on any node in the cluster. Executing DFU$STARTUP.COM adds DFU.EXE to the installed file list and thus improves performance. if you want DFU Installed each time the system boots you must add the command @SYS$STARTUP:DFU$STARTUP to the file SYS$STARTUP:SYSTARTUP_VMS.COM.
Next you must grant any DFU user including yourself the DFU_ALLPRIV
identifiers if they must be able to use all DFU functions. See chapter
2.2 for the meaning of this identifier.
2.2 Security and access
DFU has some functions which must not be made available for general usage. Therefore DFU has a certain group of commands which require the user to be granted the DFU_ALLPRIV qualifier. The DFU_ALLPRIV identifier is created during the installation procedure. To enable a user to perform these special functions the system manager must grant this identifier as follows :
$ mc authorize UAF> grant/id DFU_ALLPRIV username
If the DFU_ALLPRIV identifier is not granted then the functions listed below cannot be performed :
Note that this behaviour is different from previous versions of DFU. Some commands which required the DFU_ALLPRIV identifier on previous DFU versions have been removed from the list above. It is highly recommended that the DFU_ALLPRIV identifier is only granted to a limited number of users.
All DFU functions need SYSPRV or BYPASS privilege.
IMPORTANT *** IMPORTANT *** IMPORTANT
Please note that the DFU$STARTUP.COM procedure installs DFU.EXE with
BYPASS privilege. Because of the new SPAWN command you must not grant
non-privileged users the DFU_ALLPRIV identifier. Otherwise they can get
the BYPASS privilege simply by using the SPAWN command. As a workaround
you can change the DFU$STARTUP.COM procedure to remove the /BYPASS
privilege from the INSTALL command.
2.3 Running DFU
To run DFU you can enter :
$ RUN disk:[mydir]DFU
or (if DFU is installed systemwide):
$ MC DFU
You can also define and use a symbol for DFU as follows:
$ DFU == "$disk:[dir]DFU" $ DFU
DFU now prompts with :
Disk and File Utilities for OpenVMS DFU V2.6 Freeware version Copyright (C) 1998 DIGITAL Equipment Corporation DFU>
You can now enter DFU commands. HELP gives you online help. After each command DFU returns to the DFU> prompt. You can recall and edit commands, just as with DCL (20 commands will be stored in the recall buffer). Use EXIT or CTRL/Z to leave DFU. If you use a symbol for DFU, you also process a single command and return to DCL immediately:
$DFU SEARCH disk/qualifiers
During a DFU run, you can interrupt DFU with CTRL/C or CTRL/Y. These
interrupts are caught by DFU to allow a correct rundown of the current
command. It may therefore take some time before DFU responds to a
CTRL/C or Y interrupt.
2.4 Using an indirect file list
There are 3 commands, DIRECTORY, DEFRAG and SET which accept an indirect file as input parameter. This is achieved by using the @ sign. An indirect file is a file containing a list of valid filenames (each line in such a file must contain exactly one filename). Such indirect files can be the output file of the DFU Search command eg.:
$ DFU DFU> SEARCH mydisk/CHAR=DIRECTORY/OUTPUT=x.x DFU> DIRECTORY/COMPRESS @x.x
DFU uses SMG (Screen management routines) to perform output for an
interactive DFU session. This chapter describes the layout of the DFU
screen, the special commands used only in the SMG interface and other
items with respect to the SMG interface.
3.1 Enabling/Disabling SMG
DFU automatically selects SMG output if you run an interactive DFU
session on a terminal or workstation which supports SMG. In a batch job
or a non-DEC terminal DFU will use normal line oriented output. You can
explicitly disable SMG by defining the logical DFU$NOSMG to any value.
3.2 Automatic switching between SMG and Line mode
You may prefer to perform interactive DFU sessions in SMG mode, and
single DFU commands in normal line mode. This can be done by using the
command procedure listed below:
$! Procedure to switch beteen SMG and line mode $ DFU = "$DFU" $ if p1 .eqs. "" $ then $!Interactive session $ define/user sys$input sys$command $ dfu $ else $!Single command so disable SMG $ define/user dfu$nosmg x $ dfu 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' $ endif $ exit
3.3 Layout of the SMG screen
After starting DFU the screen looks as follows :
+-----------------------< DFU V2.6 (Freeware) >-----------------------------+ | | | Disk and File Utilities for OpenVMS DFU V2.6 | | Freeware version | | Copyright © 1998 DIGITAL Equipment Corporation | | | | DFU functions are : | | | | DEFRAGMENT : Defragment files | | DELETE : Delete files by File-ID; delete directory (trees) | | DIRECTORY : Manipulate directories | | REPORT : Generate a complete disk report | | SEARCH : Fast file search | | SET : Modify file attributes | | UNDELETE : Recover deleted files | | VERIFY : Check and repair disk structure | | | | | +----------------------------------Statistics-------------------------------+ | | | | +---------------------------------------------------------------------------+ DFU>
This screen is divided into 3 sections:
3.4 Special Screen commands
In SMG mode the following keys perform special functions :
Although only some 20 lines are visible in the output (main) screen DFU in fact remembers 500 output lines. You can scroll back and forward through one screen with the NEXT and PREV SCREEN keys, and one line with the REMOVE and INSERT HERE keys. At the beginning of each new DFU command these lines are cleared.
If you execute a command which produces a lot of output, you can paginate the output by using the /PAGE qualifier.
On a workstation with DECwindows/Motif you can change the DECterm size to be more than the standard 24 lines. DFU's SMG screen will automatically adjust to the screen size of such a DecTerm.
3.5 Side effects
There are a few side effects when using SMG mode. CTRL/C and CTRL/Y are
catched but not echoed. Also all broadcast messages are trapped and
will be displayed in the main screen at the end of the current DFU
command. Sometimes this may slightly disrupt the main screen, which can
be repaired with the CTRL/W key.
Further, during the execution of a DFU command the cursor will disappear. After the command finishes the cursor will reappear at the DFU> prompt.
Note : this chapter is meant for first time users of DFU. If you already used DFU before you may probably skip this chapter.
This chapter gives a brief overview of the commands which can be used with DFU, and how they can provide the system manager with the necessary information.
One of most common actions by a system manager is trying to locate specific files eg. files with a certain file size. Although a lot can be done with the VMS DIRECTORY command this can be a time consuming process, especially if the complete disk must be scanned. The SEARCH command of DFU is exactly meant for this situation. It gives a very quick list of specific files, with their size, and if needed the number of file fragments. Some useful SEARCH commands are :
DFU> SEARCH disk/SIZE=MINIMUM=1000 (files > 1000 blocks) DFU> SEARCH disk/IDENT=SYSTEM (files owned by SYSTEM) DFU> SEARCH disk/FRAGMENT=MINIMUM=10 (files with at least 10 fragments) DFU> SEARCH disk/CHAR=MARKED (all files marked for delete) DFU> SEARCH disk/CREATED=SINCE=YESTERDAY (all files created since YESTERDAY)
Of course these qualifiers can be combined to narrow the search. As the SEARCH command scans INDEXF.SYS, not directories, the output generated by SEARCH may look a bit random (but it is just the order in which the file headers are in the INDEXF.SYS file). To smooth the output use the /SORT qualifier.
Another important action for a system manager is to gather some overall disk information, such as number of files, free space statistics and fragmentation information. The REPORT command will generate such a disk report. To get individual disk space usage information the /USAGE qualifier can be used. This will work even if there is no disk quota enabled on the disk.
At regular intervals a system manager may need to check a disk with ANALYZE/DISK. The DFU VERIFY command provides more or less the same functionality but many times faster. The /FIX qualifier provides some REPAIR options which (unlike ANALYZE/DISK/REPAIR) do NOT lock the disk, and thus do not interfere with other disk operations. However, the disk can be rebuilt completely by using the /REBUILD qualifier.
Occasionaly a user will delete the wrong file, leaving the system manager or operator with the tedious task of restoring the file from a backup set. The UNDELETE command may be able to recover the file if it has not yet been overwritten with a new one. Much care has been taken to make this command as safe as possible; therefore no disk corruptions will be the result of an UNDELETE. If DFU encounters a problem with a deleted file it will refuse to UNDELETE it.
Another type of typical system manager problems deals with directories. The DFU command DIRECTORY can handle such problems. DIRECTORY can generate reports about empty directories (/EMPTY qualifier) or directories which contain files with a certain number of versions (/VERSION=n qualifier). Also, directories may become internally fragmented. This can be quickly solved with the /COMPRESS qualifier.
A second problem with directories is in deleting a directory with many files. This may take several hours using a DCL DELETE *.* command. This problem is solved by using DFU's DELETE/DIRECTORY command which can delete large directories some 10 times faster than the normal DELETE command does. Also, using DELETE/DIR/TREE will delete a complete directory tree with just one command.
The last 2 commands deal with individual files. SET allows settings of some special file attributes. Since VMS V6.0 this functionality is also provided by the DCL SET FILE/ATTRIBUTE command, but DFU's SET offers some more options. The DEFRAG command is an interface to the MOVEFILE function offered by VMS 5.5 and higher. This allows a simple defragmentation of individual files.
The next chapters gives a detailed description of each individual DFU command.
VMS 7.2 introduces an extension on the current ODS2 file system, called the Extended File Specifications, or ODS-5. This feature is available only on Alpha systems. Also, VMS 7.2 adds support for 255 levels of subdirectories. This is often called deep-directory support. Both features are now fully supported by DFU V2.6. There is no need to perform any special action to execute DFU commands on ODS-5 disks. Nevertheless the following points are worth to be considered before using DFU on VMS 7.2 and ODS-5 disks:
$ SET PROCESS/PARSE=EXTENDED
A DID-ed name looks like 'device:[x,y,z]file.ext'. As can be seen the directory string has been replaced by the file id (x,y,z) of the parent directory.
This chapter describes the DEFRAG command with the related parameters
and qualifiers.
6.1 Description
The DEFRAG command can be used to defragment a single file or a group of files. You can also enter an indirect command file containing a list of files. This feature allows you to create an output file with SEARCH and use that as an input to DEFRAG.
DEFRAG makes use of the file-primitive MOVEFILE function. Therefore files which are open, or which are marked NOMOVE will not be DEFRAGmented.
6.2 Error messages
The most common errors returned by DEFRAG are :
Defragment a file or a list of files on the disk.
DEFRAG file1,file2,@file...
file1,file2,@file...
The file(s) to be defragmented. You can also use an indirect command file (@file) which contains a list of files to be defragmented. This may be an output file generated with the SEARCH/OUTPUT command.
/BESTTRY
Normally DEFRAG tries to create a contiguous file. If there is not enough contiguous free space the operation will fail. With the /BESTTRY qualifier DEFRAG tries to move the file with the contiguous-best-try method. This means a maximum of 3 fragments. You should only use this qualifier when a normal DEFRAG fails. If a DEFRAG/BESTTRY also fails this is an indication that the disk's free space is too fragmented. Run a REPORT to see what the largest contiguous free space is, and check the free space fragmentation index./DEVICE
The device on which the files reside. The device name is added to the file name. If you generate a file list with the DFU SEARCH command you don't need this qualifier anymore. However you may have a list of files produced from another source and thus need to append a device name to it. Example:DFU> SEARCH mydisk/...../frag=min=50/output=x.x DFU> DEFRAG @x.x/LBN=logical-block-number
Forces a single file to be moved to the specified logical block number. Do not use this qualifier when processing a list of files./STATISTICS
This qualifier displays the performance statistics: CPU time, Elapsed Time, I/O and PageFaults./WRITECHECK
Perform a writecheck on the resultant file. The default is /NOWRITECHECK. Note that a writecheck doubles the number of involved disk I/O's.
This chapter describes the DELETE command with the related parameters
and qualifiers.
7.1 Introduction
The DELETE command is designed for 2 purposes: