Volume, directory, and file considerations
Programming for optical devices can be easier if you understand these considerations for volumes, directories, and files.
- 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 can be in a storage slot or the opposite side of an online volume.
- The volume is not physically in an optical media library, but volume information for the volume is kept when the volume is removed.
- The volume is in an optical device, but the device is powered off, varied off, or no longer connected.
- 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
flippedseveral 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 need to be written to volumes strategically, depending on the required 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.
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.
YEAR_1995. Taking this one step further, there can be subdirectories within these subdirectories named
MONTH_APRIL. The following example contains 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 requirements.
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 can range from 0 bytes to 9 999 999 827 968 bytes (accessible through the integrated file system) or 4 294 705 152 bytes (accessible through HFS) depending on the capacity of a volume.
- The amount of system disk unit or main storage on the system
- 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.