Method and apparatus for ultra high-speed formatting of a disk drive volume

A method for deriving format data for a functional disk drive volume includes the following steps. Initially format data is written onto a reference functional disk drive volume. A reference functional volume format data structure is then established which associates reference functional volume functional track values with physical track addresses for each track of the functional volume for which the format data was written. Thereafter, when a command is received to format a new functional volume, a copy of the reference functional volume format data structure is derived. Then, when a write command, for example, directed to a track of the new functional volume is received, the copy of the reference functional volume format data structure is used to access a corresponding formatted track from the reference physical disk drive volume. If a write action is then performed on the corresponding formatted track, the updated track is then written back to a physical disk drive at a new location.

FIELD OF THE INVENTION
 This invention relates to a method and apparatus for formatting of disk
 drive systems and, more particularly, to an ultra high speed method for
 formatting such disk drive systems.
 BACKGROUND OF THE INVENTION
 A primary function of a disk drive subsystem is to store data. Many host
 operating systems incorporate data access methods that require disk
 volumes to be initialized with a specific number of data records and a
 specific data content. The process of initializing a disk volume is called
 formatting and is generally performed by a format utility under control of
 a central processing unit.
 Operating systems employ software utilities to format disk drive volumes,
 with many utilizing the count, key, data (CKD) format protocol. Such
 formatting actions can consume a substantial amount of time and processor
 resources. For example, although each formatted disk track contains the
 same information and predictable count fields, the format utility must
 write the CKD information on every track to be formatted. Such write
 actions require the use of the central processing unit resources, channel
 resources and disk subsystem resources. As the writing of data to a disk
 track is a slow process, such formatting is a substantial time-consuming
 function. For example, an IBM S/390 format utility can take as long as 20
 minutes to format an IBM 3390 Model 3 Disk Volume.
 The IBM RAMAC (IBM and RAMAC are trademarks of the International Business
 Machines Corporation) virtual array storage subsystem employs a virtual
 storage architecture in which functional volumes (i.e., virtual storage
 volumes) are represented as a set of pointers in tables. The IBM RAMAC
 system employs an operation called "SnapShot" wherein new views of a
 functional disk volume or data set are "snapped" by copying the pointers.
 None of the actual data is accessed, read, copied or moved.
 To enable the operation of the SnapShot action, a log-structured file
 procedure is employed wherein updates to data are never done in place on
 the disk drives. More specifically, any updates that are made to the data
 are effective only for a particular view of the data and the other views
 remain unchanged. A log structured array functions as a true log file, in
 that only the last entry is valid. Thus, when a functional volume track is
 updated, the current updated copy is always written to the end of the log
 file, creating a gap in the disk system called "free space" which is
 recovered in a later action. Accordingly, when the RAMAC system updates a
 view of a functional volume, that update is written to a new location and
 the log of that view is then caused to reflect the new updated data
 location. The other views of the data remain the same and the pointers
 point to the pre-update version of the data.
 Notwithstanding the speed of the data duplication action which results from
 a virtual array storage subsystem function, the formatting of a functional
 disk volume that is required by some host data access methods still
 requires the expenditure of large amounts of time and system resources.
 Accordingly, it is an object of this invention to provide an improved
 method and apparatus for formatting a functional disk volume.
 It is another object of this invention to provide an improved method and
 apparatus for formatting a functional disk volume which provides
 substantial speed advantages over prior art format utilities.
 SUMMARY OF THE INVENTION
 A method for deriving format data for a functional disk drive volume
 includes the following steps. Initially format data is written onto a
 reference functional disk drive volume. A reference functional volume
 format data structure is then established which associates reference
 functional volume functional track values with physical track addresses
 for each track of the functional volume for which the format data was
 written. Thereafter, when a command is received to format a new functional
 volume, a copy of the reference functional volume format data structure is
 derived. Then, when a write command, for example, directed to a track of
 the new functional volume is received, the copy of the reference
 functional volume format data structure is used to access a corresponding
 formatted track from the reference physical disk drive volume. If a write
 action is then performed on the corresponding formatted track, the updated
 track is then written back to a physical disk drive at a new location.

DETAILED DESCRIPTION OF THE INVENTION
 Referring now to FIG. 1, a disk subsystem 10 includes a control unit 12 and
 a plurality of physical disk drives 14, 16, 20, etc. Control unit 12
 includes a central processing unit (CPU) 22 which communicates with other
 elements of control unit 12, via a bus system 24. An input/output module
 26 is coupled to bus system 24 and provides a communication interface for
 control unit 12 with a host computer 28 and physical disk drives 14, 16,
 18 and 20. A format utility 34 present in host 28 provides a format action
 for functional disk volumes contained within a functional track field 36.
 A cache memory 30 is coupled to bus system 24 and provides an
 intermediate, high-speed memory repository for track data that is being
 updated.
 A random access memory (RAM) 32 includes, amongst other data, a plurality
 of programs and data structures that are required for operation of the
 invention. Control program 35 provides overall control of control unit 12
 in conjunction with CPU 22. A functional track table 36 includes a
 reference functional volume pointers region 38 which includes one pointer
 for each track of a reference functional volume, each pointer indicating
 an address in a disk track table 42 wherein a physical track address is
 stored for one of the disk drives 14, etc. Functional track table 36
 further includes a new functional volume pointers region 40 which is a
 duplicate of reference functional volume pointers region 38, as will be
 understood from the description below.
 While the following discussion will assume that each of the procedures,
 programs and data structures shown in RAM 32 are already loaded thereinto,
 it is to be understood that each thereof can be contained on one or more
 storage devices such as disk media 44 and downloaded therefrom into CPU 22
 for execution.
 Referring now to FIG. 2, the operation of the invention will be described
 in conjunction therewith and the flow diagram of FIG. 3. Initially, prior
 to any requirement to format a new disk drive volume, host 28 executes
 format utility 34 to format a reference functional (i.e., virtual) volume
 (step 100). In response, control unit 12 receives format write commands
 from host 28 to initialize data records on functional volume 50 for every
 track identified to host format utility 34. Immediately afterwards, the
 derived formatting data is likewise written to a reference physical disk
 volume, e.g., physical disk drive 14 . More specifically, each track of
 reference physical disk drive 14 has count, key and data fields written
 thereinto.
 At this point, CPU 22 is operated by control program 35 to cause the
 writing into functional track table 36 of a set of a reference volume
 pointers 38 that each, individually, points to an address in disk track
 table 42 wherein a particular physical disk track address 46 on reference
 disk drive 14 is stored. The respective physical disk track address
 identifies where the physical data is located that is indicated by the
 reference volume track pointer. Each physical disk track address 46
 designates a physical track in reference disk volume 14.
 Accordingly, once reference volume pointers 38 have been entered into
 functional track table 36, access can be had to any formatted track on
 reference disk volume 14 by simply accessing the reference volume pointer
 (step 102, FIG. 3).
 Thereafter, when a request is received to format a new disk volume/track,
 the reference functional volume pointers 38 are duplicated as a set of new
 functional volume pointers 40 in functional track table 36 (step 104). At
 this point, there are two identical sets of pointers to physical disk
 track table 42, the corresponding entries in both of which point to
 identical physical track addresses 46.
 Next, as shown in decision step 106, until a write/update command is
 received, the procedure recycles and waits. Upon receiving a write/update
 command designating a particular track of a new functional disk volume
 (e.g., functional disk volume 52) to be written into, control program 35
 causes CPU 22 to access the addressed (pre-formatted) track by utilizing a
 new volume format pointer for a physical track corresponding to the
 addressed track. The new volume pointer 40 enables a physical track
 address 46 to be accessed from disk track table 42. Thereafter, using the
 accessed physical track address, the corresponding physical track is read
 from the addressed location in physical disk drive volume 14 and is
 written to cache memory 30 (FIG. 1) in order to enable the update action
 to be accomplished (step 108).
 At this stage, a formatted track has been obtained from reference physical
 disk volume 14 and written into cache memory 30, without requiring a
 format action to be carried out with respect to functional volume 52.
 Thereafter, CPU 22, under control of control program 35, updates the track
 data contained in cache 30, in accordance with data received from host
 processor 28 (step 110). Then, control program 35 causes CPU 22 to select
 a new physical track (e.g. in disk volume 16) and writes the updated track
 data thereinto. Concurrently, the new volume pointer in functional track
 table 36 is updated to point to the address in disk track table 42 which
 contains the physical track address of the updated track in physical disk
 volume 16 (step 112).
 Thereafter, reference functional disk volume 50 is maintained as the
 reference functional volume for future formatting actions and, as each
 track thereof is accessed for format purposes, the resulting updated data
 in the accessed track is written to a new disk track so as to enable reuse
 of the format track within physical disk volume 14. Accordingly,
 subsequent format actions can be accomplished, substantially
 instantaneously, without requiring further execution of format utility 34.
 It should be understood that the foregoing description is only illustrative
 of the invention. Various alternatives and modifications can be devised by
 those skilled in the art without departing from the invention.
 Accordingly, the present invention is intended to embrace all such
 alternatives, modifications and variances which fall within the scope of
 the appended claims.