HPUX cdrom[4]






 cdrom(4)                                                           cdrom(4)





 NAME
      cdrom - CD-ROM background information

 DESCRIPTION
      The purpose of this manual entry is to provide background information
      pertaining to CD-ROM.  Information regarding existing standards,
      terminology, data layout, and levels of support is given.  More
      detailed information is available in the standard documents listed
      later.

      Note that several topics are discussed here which are not supported in
      the current HP-UX release.  However, these topics are included because
      they are useful for understanding CD-ROM formats and terminology.
      Refer to the DEPENDENCIES section for details regarding what items are
      supported in the current release.

    Standard Formats
      Currently, there are two standard formats defined for CD-ROM.  One was
      produced by the CD-ROM Ad Hoc Advisory Committee (popularly called the
      High Sierra Group, abbreviated HSG).  The standard document produced
      by this group is called The Working Paper for Information Processing -
      Volume and File Structure of Compact Read Only Optical Discs for
      Information Interchange.  This document is available from the National
      Information Standards Organization (NISO).

      The second standard evolved from the HSG standard and was produced by
      the International Organization for Standardization (ISO).  The name of
      the standard document is Information Processing - Volume and File
      Structure of CD-ROM for Information Interchange , reference number ISO
      9660: 1988 (E).

    Data Layout
      The overall data layout on a CD-ROM can be represented as follows:

      center, doublebox; C.
      System Area - 32 kbytes
      =

      Volume Descriptor
      _
      _
      Volume Descriptor Terminator
      _
      =

      Path Table
      _
      Path Table
      _
      =

      Directory and File Data



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





      =

      There are typically four sections (indicated by double horizontal
      lines in the table above), only two of which must occur in the order
      shown above.  The system area section consists of the first sixteen
      2048-byte blocks on the media.  Its content is not specified by either
      standard, so it is possible for the creator of the CD-ROM to put data
      there that would be useful to the system for which the CD-ROM is
      intended.

      The volume descriptor section typically contains one primary volume
      descriptor and zero or more supplementary volume descriptors.  Each
      volume descriptor is 2048 bytes in length, and describes the
      attributes and structure of a directory hierarchy on the CD-ROM.  The
      list of volume descriptors is terminated by one or more volume
      descriptor terminators.  A volume descriptor terminator is also 2048
      bytes in length, and simply signals the end of the volume descriptor
      section.

      The path table section contains all the path tables for all directory
      hierarchies on the CD-ROM.  However, path tables do not have to be
      placed together in this manner.  They can be spaced out across the
      CD-ROM in whatever manner is acceptable to the person preparing data
      for the CD-ROM.  This is often done to minimize seek times.

      The directory and file data section contains all the directory and
      file data for all directory hierarchies on the CD-ROM.  Data can be
      made non-contiguous by occasional placement of a path table in the
      midst.

    Volumes and Directory Hierarchies
      A volume is a single physical CD-ROM.  A directory hierarchy is a
      hierarchical file system written on a volume.  Multiple directory
      hierarchies can be placed on a single volume, or a single directory
      hierarchy can span multiple volumes.  Each directory hierarchy on a
      volume is described by a volume descriptor.

      Directory hierarchies on the same volume can be totally independent of
      each other with each one defining a totally unique and unrelated file
      system.  They can also be related to each other through the sharing of
      data between them.

      A volume set is a set of one or more volumes that are to be treated as
      a unit.  Each successive volume in the volume set updates or augments
      the data on the volumes preceding it.  Thus, the last volume in a
      volume set is always the volume which describes the most up-to-date
      directory hierarchy for the volume set.  A unique and ascending value
      called the volume sequence number, is assigned to each volume in a
      volume set.  Volume sets are useful for updating large multi-volume
      databases without having to rework the entire set.




 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





    Volume Descriptors
      Each directory hierarchy on a volume is described by a volume
      descriptor.  There are several types of volume descriptors, but the
      two of most interest are the primary volume descriptor and the
      supplementary volume descriptor.  Their content is almost identical,
      but they have different intended uses.

      The primary volume descriptor describes the primary directory
      hierarchy on a volume.  If there are additional directory hierarchies
      on the volume, or different ways to view the same directory hierarchy,
      these are described by supplementary volume descriptors.  In the case
      of a volume set, the primary volume descriptor on each volume
      describes the primary directory hierarchy for that volume and all
      preceding volumes in the set thus far.

      Volume descriptors contain the following information:

           standard ID (identifies the format of the volume);
           system ID;
           volume ID;
           size of the volume;
           volume set size;
           volume sequence number;
           logical block size;
           path table size;
           pointers to the path tables;
           directory record for the root directory;
           volume set ID;
           publisher ID;
           data preparer ID;
           application ID;
           copyright filename;
           abstract filename;
           bibliographic filename (ISO only);
           volume creation date and time;
           volume modification date and time;
           volume expiration date and time;
           volume effective date and time;
           application use area.

      Refer to cdfs(4) for more detailed information about volume
      descriptors.

    Path Tables
      A path table defines a directory hierarchy structure within a volume.
      Each path table contains a record for each directory in the hierarchy.
      In each record are kept the directory's name, the length of any
      extended attribute record associated with the directory, the logical
      block number of the block in which the directory begins, and the
      number of the parent directory for that directory.  (All directories
      in a path table are numbered according to the order in which they



 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





      appear in the path table.)

      There are two types of path tables.  One is a type-L path table in
      which all numerical values in each path table record are recorded
      least-significant-byte-first.  The other type, type-M, is a path table
      in which all numerical values are recorded most-significant-byte-
      first.  One of each type of path table is required by both standards.
      The ISO standard allows for one additional optional copy of each type
      of path table, while the HSG standard allows for up to three
      additional optional copies of each type.  Additional copies of path
      tables are useful for redundancy or seek time minimization.

    Extended Attribute Records
      An extended attribute record (abbreviated XAR) is a data structure
      specifying additional information about the file or directory with
      which the XAR is associated.  An XAR contains the following
      information:

           owner id;
           group id;
           permissions;
           creation date and time;
           modification date and time;
           expiration date and time;
           effective date and time;
           record information;
           application use area.

      Refer to cdfsdir(4) for more information regarding the contents of an
      XAR.

      If an XAR is recorded, the XAR is written beginning at the first block
      of the file or directory.  The actual data for the file or directory
      is written beginning at the next block after the block in which the
      XAR ends.

      Where possible, XAR information is mapped into the stat structure by
      the stat() system call (see stat(2)).  However, many items do not map
      very well due to lack of appropriate fields in the stat structure for
      information provided by the XAR.  To preserve backward compatibility
      of the stat structure, such information is discarded by stat().  The
      fsctl() system call can be used to obtain the XAR for a particular
      file or directory (see fsctl(2)).

    Interleaving
      For performance reasons, data in a file can be interleaved when
      recorded on the volume.  This is accomplished by dividing the file
      into pieces called file units.  The size of each file unit (in logical
      blocks) is called the file unit size.  The interleaved file is then
      recorded onto the volume by writing a file unit, skipping one or more
      blocks, writing another file unit, skipping more blocks, and so on



 Hewlett-Packard Company            - 4 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





      until the entire file is recorded.  The number of blocks to skip
      between file units is called the interleave gap size.  Blocks making
      up the interleave gap are available for assignment to other files.

      File unit and interleave gap sizes are kept in the directory record
      for each file.  Thus, the file unit and interleave gap sizes may
      change from file to file, but cannot change within the same file
      (unless the file is written in sections - see below).

      Directories cannot be interleaved.

      Refer to cdfsdir(4) for more information.

    File Sections
      In order to be able to share data between files, a file can be broken
      up into file sections.  File sections for a particular file are not
      necessarily all the same size.

      Each file section is treated like a separate file in that each section
      gets its own directory record.  This implies that each file section
      has its own size, its own XAR, and its own unique file unit and
      interleave gap sizes.  However, all file sections for the same file
      must all share the same filename.  The order of the file sections in
      the file is determined by the order of the directory records for each
      section.  A bit in each directory record determines whether or not
      that record is the last record for the file.

      A file section can appear more than once in a single file, or appear
      many times in many different files.  A file section in one volume can
      also be claimed by a file in a subsequent volume in a volume set (this
      is how updates are accomplished).

      Each file section can have its own XAR.  However, if the final file
      section of a file has no associated XAR, the entire file is treated as
      if it has no XAR.  This is done to make updates work sensibly.

      Directories must always consist of a single section.

      Refer to cdfsdir(4) for more information.

    Implementation and Interchange Levels
      CD-ROM standards define two levels of implementation and three levels
      of interchange.  implementation levels provide a way for receiving
      systems that support CD-ROM to specify their level of support.  The
      implementation levels are:

           Level 1     The system is permitted to ignore supplementary
                       volume descriptors, their associated path tables, and
                       all directory and file data associated with them.





 Hewlett-Packard Company            - 5 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





           Level 2     No restrictions apply.

      In all cases, receiving systems must fulfill the receiving system
      requirements specified in section 10 of the ISO standard (no
      equivalent section exists for HSG).

      Interchange levels provide a way to specify the data structure and
      complexity that exists on a CD-ROM.
       The levels are:

           Level 1     Each file consists of a single file section.
                       Filenames contain no more than eight characters, and
                       filename extensions contain no more than three.
                       Directory names contain no more than eight
                       characters.

           Level 2     Each file consists of a single file section.

           Level 3     No restrictions apply.

 DEPENDENCIES
      HP-UX supports only the primary volume descriptor.  When a volume is
      mounted, HP-UX mounts the directory hierarchy described by the first
      primary volume descriptor it finds.  Supplementary volume descriptors
      are recognized and ignored, as are their associated directory
      hierarchies.

      Directory hierarchies spanning multiple volumes are not supported.

      Volume sets consisting of more than one volume are not supported.

      Path tables are ignored in HP-UX.  The normal pathname lookup scheme
      used in HFS file systems is used instead.  This is done to allow other
      mountable file systems to be mounted on top of a mounted CDFS file
      system.  Also, since HP-UX maintains a cache of cdnodes for CDFS files
      (see cdnode(4)), the additional performance gains provided by path
      tables are minimal.

      HP-UX does not support multiple file sections.  Each file must be
      recorded in a single file section.

      HP-UX supports level 1 implementation and

 SEE ALSO
      fsctl(2), stat(2), cdfsdir(4), cdfs(4), cdnode(4).

      Information Processing - Volume and File Structure of CD-ROM for
      Information Interchange, Ref. No.  ISO 9660: 1988 (E).

      The Working Paper for Information Processing - Volume and File
      Structure of Compact Read Only Optical Discs  for Information



 Hewlett-Packard Company            - 6 -     HP-UX Release 9.0: August 1992






 cdrom(4)                                                           cdrom(4)





      Interchange, National Information Standards Organization [Z39].





















































 Hewlett-Packard Company            - 7 -     HP-UX Release 9.0: August 1992