Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sw01(7) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adsc(7)

dpt(7)

ioctl(2)

mcis(7)

mount(1M)

sc01(7)

sd01(7)

st01(7)

wd7000(7)






       sw01(7)                                                      sw01(7)


       NAME
             sw01 - Portable Device Interface (PDI) WORM Target Driver

       DESCRIPTION
             The sw01 driver is a PDI-compliant WORM (Write Once Read Many)
             target driver that provides access to one or more WORM drives.
             Each drive must be attached to a SCSI Bus that is controlled
             by a PDI-compliant host adapter driver.

             Access to the particular drive is accomplished through the
             sw01 device nodes located in /dev/[r]worm.

             Each device node identifies a particular drive based on the
             SCSI ID assigned to that drive.  The binding between a device
             node and a WORM drive is as follows:

             /dev/rworm/worm0    WORM drive with lowest SCSI ID

             /dev/rworm/worm1    WORM drive with next to lowest SCSI ID

             and so on.

             A WORM drive uses removable media divided into consecutively
             numbered, fixed-size sectors that may be accessed in any
             order, similar to a hard disk.  Most of the standard tools for
             reading and writing to and from a hard disk, such as such as
             dd(1M) or read(2), work with a WORM drive.  However, keep in
             mind that for WORM drives, each sector can be written to only
             once.  This characteristic causes problems if a WORM device is
             mounted [mount(1M)] without using the read-only flag, -r.

          sw01 Device Nodes
             /dev/worm:

                   Nodes in this directory provide "Block I/O" access to
                   the represented WORM drives.

                   cCbBtTlL    C - Controller Number
                               B - SCSI Bus Number
                               T - SCSI Target ID
                               L - SCSI Logical Unit Number

             /dev/rworm:

                   Nodes in this directory provide "Raw (Character) I/O" access
                   to the represented WORM drives.


                           Copyright 1994 Novell, Inc.               Page 1













      sw01(7)                                                      sw01(7)


                  cCbBtTlL    C - Controller Number
                              B - SCSI Bus Number
                              T - SCSI Target ID
                              L - SCSI Logical Unit Number

                  wormN       N - The drive number. The drives are numbered
                                  sequentially starting at 1 as they are
                                  found by the system.


         ioctl Calls
            The sw01 driver supports several ioctl functions [see
            ioctl(2)], which are accessed through the ioctl system call.
            Many of the supported ioctl calls provide a convenient method
            for sending one of the preselected SCSI commands directly to
            the drive.  SCSI commands not explicitly supported by sw01 can
            be sent to the drive using the pass-through facility provided
            by the SDI host adapter driver.

            The following ioctl calls are defined and required by the SDI
            interface.

            B_GETTYPE         Returns the type of peripheral bus (for
                              example, scsi) used and the name of the
                              driver (for example, sw01) for this specific
                              device

            B_GETDEV          Returns the major and minor number of the
                              pass-through device for the WORM drive

            SDI_RESERVE       Sends a SCSI Reserve command to the drive

            SDI_RELEASE       Sends a SCSI Release command to the drive

            The following ioctl calls send the appropriate Group-0 SCSI
            command to the device.  These commands are defined by the SCSI
            bus specification and should also be described in the SCSI
            interface section of the reference manual supplied with your
            WORM drive.

            W_TESTUNIT        Sends a Test Unit Ready command to the
                              device

            W_REZERO          Sends a Rezero Device command to the device




                          Copyright 1994 Novell, Inc.               Page 2













       sw01(7)                                                      sw01(7)


             W_SEEK            Sends a Seek command to the device

             W_INQUIR          Sends an Inquiry command to the device, and
                               returns the resulting data back to the
                               calling process

             W_STARTUNIT       Sends a Start Unit command to the device

             W_STOPUNIT        Sends a Stop Unit command to the device

             W_PREVMV          Sends a Prevent Media Removal command to the
                               device

             W_ALLOMV          Sends an Allow Media Removal command to the
                               device

             The following ioctl calls send the appropriate Group-1 SCSI
             command to the device.  The Group-1 SCSI commands are defined
             by the SCSI bus specification and should be described in the
             SCSI interface section of the reference manual supplied with
             your WORM drive.

             W_READCAPA        Sends a Read Capacity command to the device,
                               and returns the data sent by the drive

             W_VERIFY          Sends a Verify command to the device

             The following ioctl calls send the appropriate Group-6 SCSI
             command to the drive.  Group-6 SCSI commands are vendor
             specific and should be described in the SCSI interface section
             of the reference manual supplied with your drive.  Since the
             format of these SCSI commands is vendor specific, these ioctl
             calls are supported only by products compatible with the
             Toshiba D070 drive.

             W_STNCHECK        Sends a Stand-By Check command to the device

             W_LOADCART        Sends a Load Cartridge command to the device

             W_UNLOADCA        Sends an Unload Cartridge command to the
                               device

             W_READCB          Sends a Read Control Block command to the
                               device




                           Copyright 1994 Novell, Inc.               Page 3













      sw01(7)                                                      sw01(7)


            The following ioctl calls send the appropriate Group-7 SCSI
            command to the drive.  Group-7 SCSI commands are vendor
            specific and should be described in the SCSI interface section
            of the reference manual supplied with your drive.  Since the
            format of these SCSI commands is vendor specific, these ioctl
            calls are supported only by products compatible with the
            Toshiba D070 drive.

            W_CHECK           Sends a Check command to the device

            W_CCHECK          Sends a Contrary Check command to the device

            The following ioctl calls are also supported the sw01 driver.

            B_GET_SUBDEVS     Returns the number of sub-devices supported
                              by this driver

         Files
            /usr/include/sys/sw01.h
            /etc/conf/pack.d/sw01/space.c
            /dev/[r]worm/*
            /usr/include/sys/scsi.h
            /usr/include/sys/sdi.h
            /usr/include/sys/sdi_edt.h

      REFERENCES
            adsc(7), dpt(7), ioctl(2), mcis(7), mount(1M), sc01(7),
            sd01(7), st01(7), wd7000(7)




















                          Copyright 1994 Novell, Inc.               Page 4








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