Volume, directory, and file considerations

Several special considerations will make your optical programming easier.

Volume considerations

Consider the following terms when referring to volumes:
  • Online. The volume is mounted in a drive under the read/write heads.
  • Near online. The volume is in the optical media library, but not online. The volume may be in a storage slot or the opposite side of an online volume.
  • Removed. The volume is not physically in an optical media library, but volume information for the volume was kept when the volume was removed.
  • Offline. The volume is in an optical device, but the device is either powered off, varied off, or no longer connected.
Consider the following characteristics of optical volumes:
  • An optical volume is one side of an optical cartridge.
  • Some optical cartridges contain two volumes, others contain one.
  • All volume names must be unique.
  • Depending on the optical media density and type, the capacity of a volume can range from a few hundred megabytes to many gigabytes.
  • Normally, a near online volume takes less than 10 seconds to become an online volume. This requires the volume to be mounted into a drive.
  • The number of drives in the optical media library determines how many volumes can be online at any time. Only one volume can be mounted in a drive (online) at one time. The remaining volumes in the library are near online.
  • Volumes are generally independent of each other, with one exception. The two volumes on the same cartridge can never be completely independent. Both volumes on a cartridge can never be online at the same time. Copying between two volumes on the same cartridge can be done, but it requires the cartridge to be "flipped" several times to copy all of the requested files.
  • There is no limit to the number of removed volumes that can exist.

How an application manages volumes depends almost entirely on the requirements of the application. Data should be written to volumes strategically, depending on the desired retrieval time in the future. If it is not desirable to wait for a near online volume to become online, the application might need to be set up so that the most likely volumes to be accessed are online.

Directory considerations

The only limit to the number of directories that can be created on a volume is the capacity of the media. This restriction also applies to the number of files that can exist in an optical directory. Directories are not required to exist for files to be stored on a volume. If you want, all files can be stored in the root directory of a volume. The root directory is the ″/″ directory that is created when a volume is initialized. This root is not considered a directory in the traditional sense since it cannot be created or deleted like other directories. The root directory will always exist on initialized optical volumes.

Directories can be used to categorize optical files into more manageable subsets. Directories can contain files from a particular time period, subject, characteristic, or any combination of these. For example, there may be a directory SPOOLFILES with subdirectories YEAR_1994 and YEAR_1995. Taking this one step further, there could be subdirectories within these subdirectories named MONTH_MARCH and MONTH_APRIL. See the following for an example of this structure:
/SPOOLFILES /YEAR_1994 /MONTH_MARCH
86 Optical Support V5R3
|
|
/MONTH_APRIL /YEAR_1995 /MONTH_MARCH /MONTH_APRIL
In this example, the following are the fully qualified directory names:
/SPOOLFILES 
/SPOOLFILES/YEAR_1994 
/SPOOLFILES/YEAR_1994/MONTH_MARCH 
/SPOOLFILES/YEAR_1994/MONTH_APRIL 
/SPOOLFILES/YEAR_1995 
/SPOOLFILES/YEAR_1995/MONTH_MARCH 
/SPOOLFILES/YEAR_1995/MONTH_APRIL

Directories can be useful when categorizing files, but they are not necessary. Like volume names, directory names must be unique within the same volume. For example, volume VOL001 cannot have two directories named DIR001. Volume VOL001 can, however, have a DIR001 directory and a DIR000/DIR001 directory. Also, a DIR001 directory can exist on volume VOL001 and volume VOL002. For information about directory naming conventions, see Path names.

File considerations

The size of optical files depends almost entirely on the requirements of the application and the users of those files. The size of an optical file (accessible through HFS or the integrated file system) can range from 0 bytes to 4 294 705 152 bytes depending on the capacity of a volume. The physical size of the target piece of media is limited by the amount of free space available.

When selecting optimal file sizes for your application, pay special attention to the following considerations:
  • The amount of system disk unit or main storage on the iSeries™ server
  • How the data will be read (sequentially or randomly)
  • Whether the entire file will typically be retrieved, or just a small portion
  • Whether files will be updated once they are written to the volume

Generally, the larger the file, the better the performance and media use. When larger files are used, less media space is taken up by file directory information and more is used for actual data. Also, the performance related to file size is not a linear comparison. It does not take twice as long to write 20 KB of data as it does to write 10 KB of data. Performance (KB/second) improves as the amount of data being read or written increases.