=:The OpenVMS Frequently Asked Questions(FAQ)C

The OpenVMS Frequently Asked Questions(FAQ)



 r \ ^  
PreviousContentsIndex




3

Chapter 9
Files


U

9.1 How can I undelete a file?



GOpenVMS doesn't have an "undelete" function. However, if you Hare quick to write-protect the disk or if you can guarantee that no new Hfiles get created or existing files extended, your data is still on the Gdisk and it may be possible to retrieve it. The FLORIAN tool available Efrom various websites can potentially recover the file, see question gSection 13.1 for pointers. Other alternatives here include the DFU <tool, available on the OpenVMS Freeware CD-ROM distribution.

HIf you are setting up a user environment for yourself or for others, it Bis quite easy to use DCL to intercept the DELETE command, using a symbol:

 

"
&$ DEL*ETE :== @SYS$LOGIN:MYDELETE.COM 




FThe DELETE symbol will cause the procedure to be invoked whenever the Auser enters the DELETE command, and it can copy the file(s) to a D"trashcan" subdirectory before issuing a "real" HDELETE on the files. Other procedures can retrieve the file(s) from the F"trashcan" subdirectory, and can (and should) clean out the F"trashcan" as appropriate. (Realize that this DELETE symbol Acan interfere with DELETE/GLOBAL and other similar DCL commands.)u

9.2 Why does SHOW QUOTA give a different answer than DIR/SIZE?



HDIRECTORY/SIZE doesn't take into account the size of file headers which Hare charged to your quota. Also, unless you use DIRECTORY/SIZE:ALL, you Gwill see only the "used" size of the file, not the allocated Gsize which is what gets charged against your quota. Also, you may have files in other directories.

 

"
)$ DIRECTORY/SIZE=ALL/GRAND [username...] 7Grand total of D1 directories, F1 files, B1/B2 blocks. +$ DIRECTORY/SIZZ=ALL/GRAND [-]username.DIR 2Grand total of 1 directory, 1 file, B3/B4 blocks. 
$ SHOW QUOTA 1User [username] has B5 blocks used, B6 available >of B7 authorized and permitted overdraft of B8 blocks on disk 




GIf the user has no files in other directories and all file-headers are .only 1 block, then the following should apply:

 

"
  B5=B2+B4+F1+1 




>If the diskquota has drifted out of synchronization, then the Gsystem-manager can force a quota rebuild---due to various factors, the Fquota file can potentially drift from the actual use over time, and a ;periodic rebuild can be performed at appropriate intervals.

GAlso be aware that the DIRECTORY/SIZE command can report larger values Dthan might otherwise be expected when used to evaluate files and/or Gdirectories that are alias links---such as the system roots on OpenVMS Fsystem disks---as the command reports a total that is cumulative over Dall of the files and directories examined, without regard for which Bones might be alias entries and which are not. (In other words, a CDIRECTORY/SIZE of an entire OpenVMS system disk will report a disk Guseage value larger than the (usually more accurate) value reported by Gthe SHOW DEVICE command. This as a result of the alias entries linking >each SYS$SYSDEVICE:[SYSCOMMON]SYS*.DIR directory file and the 4SYS$SYSDEVICE:[000000]VMS$COMMON.DIR file together.)u

9.3 How do I make sure that my data is safely written to disk?



FIf your application must absolutely guarantee that data is available, Dno matter what, there's really no substitute for RMS Journaling and Ehost- or controller-based shadowing. However, you can achieve a good Gdegree of data integrity by issuing a SYS$FLUSH RMS call at appropriateCtimes (if you're using RMS, that is.) If you're using a high-level Elanguage's I/O system, check that language's documentation to see if Fyou can access the RMS control blocks for the open file. In C you can use fflush followed by fsync.

@For details on disk bad block handling on MSCP and on SCSI disk 6devices, please see Ask The Wizard (ATW) topic (6926).



HFor additional information on the OpenVMS Ask The Wizard (ATW) area and Bfor a pointer to the available ATW Wizard.zip archive, please see 0Section 3.9.v

9.4 What are the limits on file specifications and directories?



HA file specification has an aggregate maximum size of 255 characters at Gpresent. The node and device specification may be up to 255 characters Feach - file name and file types may be up to 39 characters each. File Aversions are from 1 through 32767, though 0 (latest version), -0 D(oldest version) and -n (n'th previous version) can be used in most Hcontexts. A file specification may not have more than 8 directories and Bsubdirectories - while it is possible to create subdirectories of Dgreater depth, accessing them is problematic in most cases and this should be avoided.

HApplication developers should use OpenVMS-supplied routines for parsing Efile specifications - this ensures that changes in what is allowable Hwill not tend to break your application. Consider that various parts of Gthe file specification may contain quoted strings with embedded spaces Cand other punctuation! Some routines of interest are SYS$FILESCAN, BSYS$PARSE and LIB$TRIM_FILESPEC. For further information, see the #OpenVMS Guide to File Applications.

FPerformance of larger directory files improves (greatly) with OpenVMS HV7.2 and later---operations on directory files of 128 blocks and larger Gwere rather slower on earlier OpenVMS releases due to the smaller size Eof the directory cache and due to the directory I/O processing logic.

FFor fastest directory deletions, consider a reverse deletion---delete Gfrom the last file in the directory to the first. This reversal speeds Hthe deletion operation by avoiding unnecessary directory I/O operations Eas the files are deleted. Tools such as the Freeware DFU can be used for this purpose,?as can various available reverse-DELETE DCL command procedures.s

9.5 What is the largest disk volume size OpenVMS can access?



GOne Terabyte (TB; 2**31 blocks of 2**9 bytes; 0x07FFFFFFF blocks). 255 Hvolumes in a volume set. The largest contiguous allocation possible for *any particular file is 0x03FFFFFFF blocks.

EPrior to the release of V6.0, the OpenVMS file system was limited to @disk volumes of 8.38 GB (2**24 blocks, 16777216 blocks) or less.

DOn some systems, there are restrictions in the console program that Hlimit the size of the OpenVMS system disk. Note that data disks are not Daffected by console program limits. For example, all members of the VAXstation 3100Cseries are limited to a system disk to 1.073 GB or less due to the Fconsole, though larger data disks are possible. This limit due to the HSCSI drivers used by and built into the console ROM to read the OpenVMS Dbootstrap files, and these same drivers are also used by OpenVMS to write the system crashdump.

>There are numerous discussions of this VAXstation 3100 in the Fcomp.os.vms newsgroup archives. Please use Google newsgroup search to @search the archives for further details, for discussions of the Bworkarounds, and for details of the potential for a simple failed Gbootstrap and particularly for discussions of the potential for severe #system disk corruptions on crashes.

ESome SCSI disks with capacities larger than 8.58 gigabytes (GB) will Grequire the use of an OpenVMS ECO kit (eg: ALPSCSI04_062 or later; see lSection 14.26 for details) for new SCSI device drivers. Failure to use =this ECO can cause "rounding errors" on the SCSI disk device Ecapacity---OpenVMS will not use nor display the full capacity of the Cdrive---and "%sysinit-e-error mounting system device status equals G000008C4" (8C4 -> "%SYSTEM-?-FILESTRUCT, unsupported file structure Hlevel") errors during bootstrap. (One workaround for the bootstrap when 6the bitmap is located far into the disk is the use of GINIT/INDEX=BEGIN.) The problem here involves the particular extensions :and fields used for larger capacity disks within the SCSI =specifications and within the various intepretations of same.

For ATA (IDE) disk drives:



gSee Section 14.4.4.2 for additional ATA SYS$DQDRIVER information.

CBe aware that a known restriction in certain older versions of the EAlpha SRM Console prevents booting most ATA (IDE) drives larger than F8.455 GB, depending on exactly where the various files are located on Dthe volume. Updated SRM consoles for systems with SRM and ATA (IDE) @drive support are (will be) available. (OpenVMS Engineering has Esuccessfully bootstrapped 20GB ATA (IDE) disks using the appropriate SRM console version.)



/  
Note

EAll disk-related listed in this section are stated in units of "disk G(base ten) gigabytes" (1 GB = 10^9 bytes) and not in units of B"software (base two) gigabytes" (1 GB = 2^30; 1 GB = 1073741824.) lbytes. Please see Section 14.26 for details of the nomenclature and of the units.


CBe aware that larger disks that are using an extension of SCSI-2---Fdisks that are using a mode page field that the SCSI-2 specifications Dnormally reserved for tape devices---to permit a larger disk volume Gsize will require a SCSI driver update for OpenVMS, and this change is Dpart of V7.1-2 and later, and also part of ALPSCSI07_062 and later. F(These larger disks disks will typically report a DRVERR, or will see Hthe volume size "rounded down".) SCSI disks larger than 16777216 blocks Fcira 8.455 GB (base ten); 8GB (base two) require this ECO, or require )the use of OpenVMS Alpha V7.1-2 or later.

HApplications written in C can be limited to file sizes of two gigabytes Band less, as a result of the use of longword values within C file Boperations, and specifically off_t. This restriction is lifted in EOpenVMS V7.3-1 and later, and with the application of the C ECO kits Cavailable for specific earlier releases. The use of a longword for Eoff_t restricts applications using native C I/O to file sizes of two Dgigabytes or less, or these applications must use native RMS or XQP calls for specific operations.

nAlso see Section 14.14, Section 14.26.x

9.6 What is the maximum file size, and the RMS record size limit?



ERMS can store individual files of a size up to the maximum supported Gvolume size. Under OpenVMS V6.0 and later, the volume size and the RMS Cmaximum file size limit is 2**31 * 512 bytes---one terabyte (1 TB).

C"Use a volume set to provide a large, homogeneous public file Hspace. You must use a volume set to create files that are larger than a Fsingle physical disk volume. (The file system attempts to balance the Cload on the volume sets, for example, by creating new files on the 1volume that is the least full at the time.)"

E"You can add volumes to an existing volume set at any time. The 7maximum number of volumes in a volume set is 255."

EThe RMS formats---sequential, relative, and indexed---are limited by Ethe one terabyte maximum volume size. RMS relative files are further Dlimited to a number of records that will fit in 32 bits---4 billion Crecords. Sequential and indexed formats do not have a record limit.

qAlso see Section 2.17.1, Section 14.26.p

9.7 How do I write CD-Recordable or DVD media on OpenVMS?



DHow to create CD-R, CD-RW, DVD-R, DVD+R, DVD-RW, or DVD+RW media on OpenVMS?



FAlternatively, consider the following command on OpenVMS Alpha V7.3-1 and later:

 

"
@SYS$MANAGER:CDRECORD.COM HELP 




EWhile folks have had success getting PC-based CD-R/RW or DVD-R/RW or EDVD+R/RW tools to work with OpenVMS partitions, it is far easier and Cmore reliable to use the OpenVMS-based versions of these tools and Edirectly-attached devices. If you use a Windows-based tool, you will Dwant to specifically select its raw mode, image mode, or block-copy Cmode, depending on the terminology within the particular tool. The Gtransfer mode and selections is variously refered to as a disk-at-once E(DAO) 2048-byte block ISO Mode 1 raw/image/block data disk recording mode.

FMore details: Creation of CD recordable or DVD recordable media under AOpenVMS typically involves one of two approaches: the use of the optional CD-R (`Scribe')Fcapabilities available for the InfoServer or other "offline" hardware Gpackages (PC-based packages will be included in this), or the use of a Bhost-based package such as the CDRECORD or CDWRITE13_VMS or other Dutilities, including OpenVMS ports of common open-source tools made Havailable by Dr. Eberhard Heuser-Hofmann and various others. Commercial (packages and options are also available.Dr. Heuser-Hofmann has DVDwrite=, a commercial package which can record DVD media. ( 

;OpenVMS can read ODS-2, ODS-5, and ISO-9660 format CD-ROMs.D(If you are very careful, you can create a dual-format CD-R; a CD-R Awith both ODS-2 and ISO-9660 or both ODS-5 and ISO-9660 or both.)

InfoServerB hardware configurations are no longer available from HP, but may A potentially be acquired through other means; as used equipment. A InfoServer support also has very specific CD-R recording device D prerequisites, and these recording devices are no longer generally available.

EPackages related to the use of DVD archiving are also available, see Athe multi-volume capabilities of the DVDarchive/restore Freeware.

 

"
JF http://www.geocities.com/SiliconValley/Lakes/9999/vmscdwri.html  




;Additional information is available at the following sites:



U.S. DesignF offers a package that includes the tools necessary to create a CD or ; DVD-R with either ISO-9660 or ODS-2 format, for standaloneACD-R/RW, DVD-R, or DVD+R/RW drives, for recent OpenVMS versions. Details are available at:



lAlso see Section 9.7.2 for details on access to recorded media on older CD-ROM drives.H

9.7.1 CD and DVD notation, terminology?



CCD-ROM is pre-recorded Compact Disk media, and is the original and Boldest CD format. The original CD media was physically stamped, a Erecording process that is now largely reserved to the highest-volume media reproduction requirements.

GCD-R is CD Recordable, a write-once storage medium that can be read by Fall but the oldest of CD drives; a format which can be read and often #even recorded by most CD-RW drives.

ECD-RW is CD ReWritable, a format which is readable by many CD drives Aand by most CD-R drives, and with media that can be recorded and re-recorded by CD-RW drives.

GCD media recording speeds are listed as multiples of 150 kilobytes per Esecond, so a 10X drive records at 1500 kilobytes (1.5 megabytes) per >second. 600 MB (70 minutes) and 700 MB (80 minutes) recording Acapacities are both widely available. The minutes designation is Dderived from the traditional audio-format recording capacity of the particular media.

:DVD-R/RW is the older of two common Digital Versatile DiskGrecording formats, and the DVD-R Recordable or DVD-RW ReWritable media Acan be read by many DVD drives. As with CD-R formats in older CD Ddrives, older DVD and particularly first-generation DVD players may (have problems reading this media format.

?DVD+R/RW is the newer of the two common Digital Versatile Disk Grecording formats, and the DVD+R Recordable or DVD+RW ReWritable media Bcan be read by many DVD drives. Akin to DVD-R/RW media, older and Hparticularly first-generation DVD drives can have problems reading this media format.

FThe DVD Plus-series drives and media tend to record faster than Minus Fdrives, as (as of this writing) the Plus (+) drives do not require an Einitial media formatting pass and the Minus (-) drives do. While the Gappropriate Plus (+) or Minus (-) DVD raw media must be chosen for the Fparticular DVD recorder (and DVD recording drives that are compatible Hwith and capable of using both Plus and Minus media are available), the Hresulting recorded media is generally readable (playable) in all recent GDVD drives and DVD players, regardless of type. (Compatibility is best Bwithin the same media-series devices of course, but be certain to Hverify compatibility across devices regardless of the particular device &or particular recording media chosen.)

HPresently Plus (+) media is slightly more expensive than Minus (-), but Gwith the prices of all CD and all DVD media continuing to consistently Efall, the differences in DVD media costs are becoming irrelevent for 4all but the production of huge volumes of DVD media.

FThe rated DVD recording speeds are in multiples of 1353 kilobytes per Fsecond, thus a DVD 1X drive is roughly equivalent to a CD 9X drive in $I/O requirements and transfer speed.

FDVD drive recording speed can and does vary. DVD disk drive recording Hspeed is limited by the rated recording speed of the media used, so the Eslower (and cheaper) DVD media will not record any more quickly in a Ffaster drive. A 2.4X DVD drive loaded with 1X media will record at 1X.[

9.7.2 Use of RRD42 and other older (embossed-media) CD drives?



The RRD42H series SCSI CD-ROM drive is sufficiently old that it can have problems D processing CD-R and CD-RW media. Other very old CD drives can have H equivalent media compatibility problems when attempting to read (much) G newer CD media and newer CD media technologies. These older CD drives 2 are generally intended for use with the so-calledE embossed media, rather than with non-embossed recorded (recordable) ! media now in common circulation.

FPlease consider using a slightly-less-ancient CD-ROM or CD-R or CD-RW 7drive when working with non-embossed recorded CD media.

HTo paraphrase one knowledgable---though deliberately nameless---storage @engineer, "The RRD42 drive is just past the drooling idiot stage".




 r Y \ ^  
PreviousNextContentsIndex