|
|
This topic provides an overview of the Storage Device Interface (SDI) and various commands and procedures that are available for managing mass storage devices and media.
The Storage Device Interface (SDI) is a framework for driver software for many of the hardware devices on a system. Besides organizing, simplifying, and standardizing the way device drivers are written, SDI also makes it easier to administer a wide variety of both devices and interfaces.
SDI divides the device driver logically into two layers
SDI supports both SCSI and non-SCSI devices. It routes target driver requests to the correct HBA driver and HBA driver responses to the correct target driver.
To better explain this relationship, suppose you have a system which includes one ESDI-controlled hard disk, one non-SCSI cartridge tape drive, a SCSI HBA adapter (type x) controlling a SCSI hard disk and a SCSI 9-track tape, and a second SCSI HBA adapter (type y) controlling a SCSI hard disk and a CD-ROM.
All three hard disks are controlled by the sd01 target driver. Both tape units are controlled by st01, and the CD-ROM drive is controlled by sc01. This is possible because the target drivers do not need to know the specific details of how a command is issued (a function that varies between different controller types), but rather, only the type of operation to be performed (for example, read a file from a particular disk).
Each HBA driver receives the requests from and performs the operation on the appropriate physical device. Results from the request, successful or not, are returned to SDI by the HBA driver in a common device- and controller-independent format. Finally, SDI returns the results of the request to the appropriate target driver.
All SDI drivers use device driver interfaces, although not all device drivers are part of SDI. (See ``DDI interface versioning'' for more information.) Currently, SDI includes mass storage device driver support for hard disks, tapes, CD-ROM devices, and Write-Once-Read-Many (WORM) devices.
The following commands are provided for working with SDI devices.
Command | Description |
---|---|
sdiconfig(ADM) | determine which SDI disk, tape, and SCSI controllers are present |
sdiadd(ADM) | hot add SCSI mass storage devices |
sdirm(ADM) | hot remove SCSI mass storage devices |
sdimkdev(ADM) | generate device nodes for the SDI subsystem |
sdimkdtab(ADM) | update the device table entries for the SDI subsystem |
sdipath(ADM) | manage paths in a multipath I/O environment |
sdighost(ADM) | lists and/or removes device nodes associated with Ghost Names |
sdi_timeout(ADM) | query or change SDI device timeout tunables |
sdimkosr5(ADM) | convert a disk layout formatted for previous releases of SCO OpenServer to VTOC format |
Target drivers deal with the device-specific aspects of the hardware. Most of the time, a hardware device actually consists of a controller card and a physical device (for example, a hard disk and a hard disk controller, or a cartridge tape drive and a tape drive controller). Target drivers deal with the details of operating the physical device (the hard disk, cartridge tape drive, or whatever device is connected to the controller card).
The target driver controls the behavior of a device and decides what device actions are needed to fulfill requests passed to the driver. In this scheme, the HBA driver performs the low-level work of programming the controller to accomplish the actions requested by the target driver.
The following mass storage target drivers are provided.
Target Driver | Device Type |
---|---|
sd01(HW) | hard disks |
st01(HW) | tape devices |
sc01(HW) | CD-ROM devices |
sw01(HW) | WORM devices |
mc01(HW) | medium changers |
Additional target drivers might be developed in the future to support other classes of devices which are not currently supported. While the target drivers are architecturally very similar, their differences result from the device-specific aspects which are needed to correctly support each of the device classes.
HBA drivers handle the controller-specific aspects of operating a device. To read a given block of data on one of the slices on the hard disk, the target driver determines which actual physical sector on the disk will be read, and the HBA driver programs the disk controller registers, issues the read request, and responds to the interrupt generated by the read request. The results of the read operation, whether successful or not, are passed back to the target driver, which then signals the completion of the operation.
SDI provides a number of different HBA drivers. However, in general, HBA drivers fall into two categories--those for SCSI HBA cards and non-SCSI controller cards. Examples of non-SCSI controllers include ESDI, MFM, and IDE controllers.
Supported HBA drivers provided include adsa, adsc, adse, adsl, adss, amd, blc, c8xx, cpqsc, dak, dpt, flashpt, ictha, ida, ide, lmsi, mitsumi, qlc1020, and sony. HBA drivers which are supplied, but which are no longer supported, include c7xx, efp2, fdeb, fdsb, mcis, wd7000, and zl5380. New or enhanced HBA drivers are made available periodically. For the most current list of supported hardware see ``Accessing the SCO Compatible Hardware Web Pages''.
The following types of physical mass storage devices are supported.
Each physical mass storage device is supported by the following software.
When a new storage device is added to the system, the device database is automatically updated--you do not need to modify anything by hand.
Standard device names are used to identify mass storage devices.
The default alias for the first hard disk on the system is disk1. Subsequent hard disks have alias names of disk2, disk3, and so on. See disk(HW) for information about the standard device names for hard disks.
A tape drive (whether for cartridge, 9-track, 8-millimeter, or DAT tape) is a character device and uses device names in the /dev/rmt directory.
The following default tape device aliases are supported (these names reference the first tape device in the system):
On the first operation of the tape, a retensioning device seeks first to the beginning of the tape, then to the end of the tape, and finally, to the beginning of the tape again. Use a retensioning device for streamer cartridges that have not been accessed for some time or have been transported between accesses. The retension operation is time-consuming, but it ensures that the cartridge streamer tape is tensioned properly. A nonretensioning device does not cause retension of the tape before the first operation on the tape.
A rewinding device will seek the beginning of the tape (rewind the tape) when the cartridge streamer is closed. A nonrewinding device does not rewind the tape on close and thus enables an application to write more than one archive to the streamer tape.
The default alias for the first CD-ROM drive on the system is cdrom1. Subsequent CD-ROM drives have alias names of cdrom2, cdrom3, and so on. See sc01(HW) for information about the standard device names for CD-ROM drives.
See sw01(HW) for information about standard device names for WORM drives.
See mc01(HW) for information about standard device names for medium changers.
The following subtopics describe tasks associated with mass storage devices and storage media.
How much time you spend overseeing the storage devices on your system depends on the number of users on your system and how they use system resources. A large user community and many resources require a lot of care and feeding. Here are a few suggestions for managing storage devices:
# sdiconfig -l 0:0,7,0: HBA : (cpqsc,1) Compaq SCSI-2 0,0,0: DISK : COMPAQ ST12550N 3223 0,5,0: CDROM : COMPAQ CD-ROM CR-503BCQ1.1i 0,6,0: DISK : CONNER CP3500-540MB-3.52527
# prtconfSYSTEM CONFIGURATION:
Memory Size: 48 Megabytes System Peripherals:
Floppy Drive 1 - 1.44 MB 3.5 SCSI CD-Rom Drive 1 - COMPAQ - CD-ROM CR-503BCQ Disk Drive 1 - COMPAQ - ST12550N - 2000 MB Disk Drive 2 - CONNER - CP3500-540MB-3.5 - 518 MB 80387 Math Processor
where special_file is the path to slice 0 of the raw device file (such as /dev/rdsk/c0b0t1d0s0). See prtvtoc(ADM).
where filesystem is the name of a mounted filesystem (such as /var). See devnm(ADM).
dfYou may also use df(ADM) to display information about the generic superblock for mounted or unmounted filesystems, directories, or unmounted resources. The du(ADM) command is also useful for summarizing disk usage.
where special_file is the path to the raw device file to the cartridge tape device (such as /dev/rmt/c0s0). The -it options of the cpio command print a table of contents of the data on the tape. See cpio(C).
Hard disks are shipped from the factory already formatted. It is not necessary to reformat your hard disks for installation. If it becomes necessary to reformat an existing hard disk because of hardware or media defects, please contact your disk vendor.
If you get an error message saying a filesystem is corrupt run the fsck(ADM) command. The fsck command can be used to check the integrity of any mounted filesystem, and runs automatically on the root filesystem whenever the system is rebooted following an abnormal shutdown. The fsck command can also be used to repair a corrupted filesystem, if repair is possible.
See ``Solving filesystem problems'' for an in-depth discussion about using fsck with various types of filesystems.
In a multipath I/O environment, there are multiple paths to any single hard disk. If your computer has multipath capability, use the sdipath(ADM) command to manage multipath I/O. The sdipath command provides the ability to list paths including status and performance information, and provides operations for controlling which paths are active so you can tune your system for better performance or higher availability. You can also repair paths that have failed.
In a multipath I/O environment, the name for a disk device is determined
by the first path discovered to the disk.
Ghost names are provided to avoid the naming conflicts
encountered when controllers fail in a multipath I/O environment--the
operating system continues to use the original device name even
when a device is no longer accessible (or has a different first path).
You can run
sdighost(ADM)
to change all ghost name references to be real names.
See ``Adding or removing hardware controllers'' for information about adding or removing hardware controllers or adapters.
Support is provided for device drivers written to the Storage Device Interface versions 3.0 and later, and drivers written to the Device Driver Interface versions 5.0 and later.
If you do make configuration changes for these devices manually, the configuration tools might become unusable, or your system might be left in an unbootable state.
We commonly use the word ``partition'' to refer to two concepts:
Just as the noun ``partition'' refers to both a portion of the disk and a subdivision of that partition, the verb ``partition'' also points to two steps:
The phrase ``partitioning the disk'' is used by many people
to refer to both steps.
To avoid confusion, we differentiate between the two
by using the terms ``partition the disk'' and ``defining slices.''
Additional information about partitions and slices is available in
vtoc(HW).
A single hard disk can support multiple operating systems but not in the same space on that disk. You have the choice of either using all the space on your hard disk into one partition, or dividing the hard disk into a maximum of four partitions. Each partition can hold a separate operating system. For example, you could have a UnixWare system partition, a SCO OpenServer system partition, an OS/2 partition, and a DOS partition.
Carefully consider the type, number and size of partitions you want on your system before creating them; changing them later requires that existing partitions and data be destroyed. When creating partitions, note that:
Your first opportunity to create partitions comes during the initial system load (ISL) of your system. At that time, you can define partitions and slices for each of two hard disks, a primary and a second hard disk. When you install on an existing system you are asked whether you want to keep the existing partitioning scheme (the default scheme) or create a new one. If you are installing on a new machine, the default scheme is one partition (partition #1), which uses 100 percent of each disk.
If you add a hard disk after ISL, use the
diskadd(ADM)
command to create the partitions and slices.
See
``Adding hard disks''.
Changing the number or size of hard disk partitions destroys existing partitions and data on the disk being re-partitioned. If you must change your hard disk partitions, be sure to back up your data first (back up each partition on the disk).
Only one partition can be active at a time. There are two ways to change the active partition.
[boot]
prompt, you can enter parameters to specify
which partition to boot from.
See boot(F) for more information about boot parameters.
Each VTOC on a partition can contain
up to 184 slices (numbered from 0 through 183).
Slices can be allocated as filesystems, swap area(s) or dump slices.
The slices on your hard disk(s) are initially assigned as part of the initial system load (ISL) process.
If you add a hard disk after ISL, use the diskadd(ADM) command to create the slices. See ``Adding hard disks''.
The following information from the Getting Started Guide provides guidelines for defining slices and filesystems.
This filesystem is required, and can be of type vxfs (default, recommended) or ufs.
The filesystem type must be bfs.
The default size provided should be adequate for your system, and must
not, in any case, exceed 128MB.
The default swap value is adequate for most systems; you may consider increasing its size if you are running large applications which consume system resources. If you do increase the size of your swap slice, you decrease the amount of space on your disk to store user data. See ``Adding swap space'' for information about increasing swap space.
This slice is not enabled by default, and in most cases is not necessary. If you create a dump slice, it should be as large as your system's RAM.
These filesystems should be configured as the same type you chose for the root filesystem. If you do not enable these filesystems, they are created as subdirectories of the root filesystem.
This filesystem should be configured as the same type you chose for the root filesystem. If you do not enable this filesystem, /var is created as a subdirectory of the root filesystem.
This filesystem can be configured as memfs, in which case all files and directories are automatically flushed during each reboot, or as the same type you chose for the root filesystem.
This filesystem must be configured as memfs. All files and directories are automatically flushed during each reboot. If you do not enable this filesystem, /var/tmp is created as a subdirectory of the root filesystem.
If you plan on installing the Online Data Manager, you should enable this volume as type slice with a size of 1MB.
Some devices, such as SCSI hard drives, provide their own mapping scheme. If you have such a device, set this slice to a small size and do not enable it on the second disk.
After your system has been in operation for a while determine whether the allocation of slices (as reflected in the VTOC definition) is appropriate. Does it meet the needs of your users? Consider whether system performance might be improved by a larger number of smaller filesystems than you currently have, or by allocating filesystems to different hard disks. Begin by analyzing how well your system performs with the existing filesystem arrangement. See ``Managing system performance'' for a description of the sar(ADM) command that evaluates performance.
If you frequently get console messages warning of insufficient memory, the amount of main memory or the swap area configuration may be insufficient to support users' demands. Before adding more main memory, try expanding the swap area. See ``Adding swap space''.
Before you reassign slices on a boot disk, do a full system backup. To reassign slices on the boot disk, you must reinstall the operating system.
Use the disksetup(ADM) command to reassign slices on disks other than the boot disk.
See ``Adding hard disks'' or diskadd(ADM).
The SCSI hot addition or hot removal feature allows for addition or removal of SCSI storage devices (not controllers) from a running system. See ``Hot adding or removing SCSI storage devices''.
Hot-plug machines provide the capability to physically add, remove or replace a controller on a ``hot'' (running) system. Typically, hot-plug machines have a built-in hot-plug controller, and power can be turned on or off to selected slots. See ``Managing Hot Plugable controllers''.
In a non-multipath I/O environment, when a hard disk is moved from one controller to another, it occupies two addresses (a mapping between the old address and the new address). You cannot add a hard disk at the old address until you remove the mapping. Use sdighost(ADM) to remove the mapping.
When real memory fills with system processes or temporary files, the system must swap idle processes to disk. Swap space is located in one or more slices in your disk partition(s).
If you use your system to run many processes, especially graphical processes, you might need more swap space. Also, if you add more RAM to your system after the initial system load, you might want to increase your swap space. See ``Adding swap space''.
There are two approaches to copying data placed on mass storage media.
Which approach you choose depends on whether the filesystems are mounted, the data format, and the amount of data your are copying.
The cp(C) command is typically used when both the source and the destination file systems are already mounted. This command copies files quickly from one location to another.
Enter
ls dirname | cpio -ovB -O special_file
where dirname is the path of the directory you want to copy (such as /tmp) and special_file is the path to the tape (character) device (such as /dev/rmt/ctape1).
If the data on the tape is in cpio format, you can use cpio(C) to copy from tape to hard disk.
where dirname is the path to the directory into which you want to copy the files (such as /var/tmp).
where special_file is the path to the tape (character) device (such as /dev/rmt/c0s0 or ctape1).
If the data on the tape is in tar format, you can use tar(C) to copy from tape to hard disk.
where dirname is the path to the directory into which you want to copy the files (such as /var/tmp).
where special_file is the path to the tape (character) device (such as /dev/rmt/c0s0 or ctape1).