Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psdf(4) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dksetup(8)

dkindex(8)

dkpsdfinit(8)

psdf(4)                                                             psdf(4)

NAME
     psdf - disk format

SYNOPSIS
     #include <sys/dkondisk.h>

DESCRIPTION
     PSDF (Pyramid Standard Disk Format) is a set of data structures used
     to save configuration information on disk devices. Special, privileged
     areas of the disk are used and redundant copies of the information are
     kept, thereby guarding against most media failures.

     PSDF consists of a location index containing pointers to the on-disk
     locations of various configuration data structures and the configura-
     tion data structures themselves. Each disk driver implements a conven-
     tion for locating the index structure on a particular disk.

     The location index contains pointers to the redundant copies of the
     alternate sector map (bad block table), the device type structure
     (struct dktype), the disk partition structure (struct dkpart), and the
     disk tuning structure (struct dktune). Each of these structures
     resides on disk wrapped in a sector buffer structure containing a ver-
     sion number and a magic number. The buffer structures are the
     struct xxxondisk structures shown below. Conversion of the structure
     on a particular disk to the version in use on the current system is
     done by the kernel when the structure is read from disk. Structures
     are always written in the version currently in use on the system.

     These structures may be read and written using the following ioctls:

          struct dkindex
                    DKIOCGETINDEX and DKIOCSETINDEX

          struct dktype
                    DKIOCGETTYPE and DKIOCSETTYPE

          struct dkpart
                    DKIOCGETPART and DKIOCSETPART

          struct dktune
                    DKIOCGETTUNE and DKIOCSETTUNE

     In addition, the ioctl DKIOCSETMODE may be used with the mode DKMO-
     DENOPSDF to tell the driver that the disk does not support the PSDF
     and therefore the SET ioctls above should not result in the data
     structure being written to disk.

     /*
      * "@(#)dkondisk.h        Revision: 1.8     3/11/91 19:26:17"
      */

     /*    Pyramid Technology - Apr 1990    */



Page 1                       Reliant UNIX 5.44                Printed 11/98

psdf(4)                                                             psdf(4)

     #ifndef dkondiskh
     #define dkondiskh
     #ident     "@(#)dkondisk.h PTrev: 1.8 3/11/91 19:26:17"

     #ifdef KERNEL
     #include "sys/dkio.h"
     #else
     #include <sys/dkio.h>
     #endif

     /*
      * The on disk configuration structures
      */

     #define DKMAGIC      0xf1e2d3c4L  /* magic number for all structures */
     #define DKXMAGIC     0xc4d3e2f1L  /* magic number for index structure */
     #define DKNINDEX     4            /* # indexes per disk */
     #define DKNCOPIES    8            /* max # data structure copies */
     #define DKSTRUCTSIZE 2048         /* min size of the on disk structures */
     #define DKMAXSECTOR  4096         /* max supported sector size */
                                        /* smaller sectors are okay  */
     #define DKIDLEN      64           /* max length of the id string */

     /*
      * The index structure lives on disk in a well-known location and
      * contains pointers to the other information maintained on disk.
      */
     struct dkindexondisk
     {
         long  dkversion;
         long  dkmagic;
         union
         {
             struct dkindexv1
             {
                 char dkxid[DKIDLEN];   /* unique, per device id string */
                 struct dkaddr
                 {
                     long cylinder;
                     long head;
                     long sector;
                 } dkxasm[DKNCOPIES],   /* alternate sector map */
                   dkxtype[DKNCOPIES],  /* struct dktype */
                   dkxpart[DKNCOPIES],  /* struct dkpart */
                   dkxtune[DKNCOPIES],  /* struct dktune */
                   dkxmisc[DKNCOPIES];  /* reserved */
             } dkxv1;
             char fill[DKSTRUCTSIZE - 2*sizeof(long)];
         } U;
     };
     typedef struct dkindexv1 dkindext;   /* the most current version */



Page 2                       Reliant UNIX 5.44                Printed 11/98

psdf(4)                                                             psdf(4)

     struct dktypeondisk
     {
         long  dkversion;
         long  dkmagic;
         union
         {
             struct dktype dktv1;
             char fill[DKSTRUCTSIZE - 2*sizeof(long)];
         } U;
     };
     typedef struct dktype dktypet;        /* the most current version */

     struct dkpartondisk
     {
         long  dkversion;
         long  dkmagic;
         union
         {
             struct dkpart dkpv1;
             char fill[DKSTRUCTSIZE - 2*sizeof(long)];
         } U;
     };
     typedef struct dkpart dkpartt;        /* the most current version */

     struct dktuneondisk
     {
         long  dkversion;
         long  dkmagic;
         union
         {
             struct dktune dkuv1;
             /* leave large so it can grow easily */
             char fill[DKMAXSECTOR - 2*sizeof(long)];
         } U;
     };
     typedef struct dktune dktunet;        /* the most current version */

     #endif /* dkondiskh */

SEE ALSO
     dksetup(8), dkindex(8), dkpsdfinit(8).













Page 3                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026