C H A P T E R  6

Disk and Diskette Drives Test (disktest)


disktest Description

disktest verifies the functionality of hard drives and diskette drives using three subtests (see TABLE 6-1)--Media, File System, and Asynchronous I/O.

Most disk drives are supported, including SCSI disks, native or SCSI floppy disks, and IPI drives. The type of drive being tested is displayed at the top of the Test Parameter Options dialog box.



Note - Disk partitions could range from 0 to 15. disktest can be performed on any of these selected partitions.



The disktest Test Parameter Options dialog box shows all the partitions that are available for testing. The file System subtest can only be run if the selected partition is mounted. The WriteRead option of the Media subtest is allowed only if a selected partition is not mounted.


disktest Test Requirements

By default, disktest does not mount any partitions. To specify that SunVTS premounts all mountable partitions, set the environment variable BYPASS_FS_PROBE to 0 (zero) before starting SunVTS. Premounting can be disabled by disabling BYPASS_FS_PROBE or changing it to a value other than 0 (zero).

The mount point used by disktest is the word disktest appended by the name of the disk partition. For example, if the disk partition name is /dev/dsk/c0t3d0s0, disktest mounts the partition as superuser under the name /disktest_c0t3d0s0.



caution icon

Caution - If a power failure occurs or if disktestis terminated abruptly while the Media subtest is running in WriteRead mode, disk data could possibly be corrupted.





caution icon

Caution - Running the Media subtest on a disk partition in the WriteRead mode might cause data corruption if the same partition is being used by other applications. Run SunVTS in the offline mode only when there are no other applications running.



disktest tests the disktest drive whether the Volume Management software is running or not. The following mount point names are used:

Loading an option file (refer to the SunVTS User's Guide for option file details) that was created when BYPASS_FS_PROBE was set to 0 (zero) might not work if the BYPASS_FS_PROBE environment variable is no longer set to 0. Testing might fail with the following error:


SUNWvts.disktest.8088 07/24/98 15:47:22 disktest c0t0d0 FATAL:
"Couldn't get file system information on /disktest_c0t0d0s0,
statvfs() system call failure error: No such file or directory.

This error is caused when SunVTS expects to use the predefined mount point names that are created when BYPASS_FS_PROBE is set to 0 (zero), but these mount points do not exist while BYPASS_FS_PROBE is not set to 0.

To use option files with disktest, create two separate option files for the two different states of the BYPASS_FS_PROBE environment variable.

When a large number of disktest instances are run in write/read mode, tests might fail with messages similar to the following.


03/22/03 03:33:40 ctech140 SunVTS5.1ps2: VTSID 8011 disktest.FATAL
c1t0d0: "Failed lock mtab semaphore. "semop" system call failure,
errmsg: Invalid argument." Probable_Cause(s): <disktest instances
exceeds system semaphore operation limitation (default system
limit for seminfo_semmnu = 30)><System software error>
Recommended_Action(s): <Add the line "set semsys:seminfo_semmnu=
0x100" to your /etc/system file and reboot the machine> <If the
problem persists, call your authorized Sun service provider.

To avoid this issue, add the following entry to the /etc/system file and reboot the system.


set semsys:seminfo_semmnu=0x100

 


disktest Subtests

The following table describes the disktest subtests:


TABLE 6-1 disktest Subtests

Subtest

Description

Media subtest

Verifies the disk media by enabling users to run disktest in different modes such as ReadOnly, ReadCompare, and WriteRead. The Media subtest treats the disk partition as one large piece of contiguous data.

In WriteRead mode, all instances of disktest communicate through a shared memory service to ensure that they do not overlay the same disk area at the same time. This avoids data corruption.

Each of the three modes can run two different methods of disk testings. These are Synchronous I/O and Asynchronous I/O.

SyncIO - Reads and writes data using Read/Write system calls in a sequential fashion until the specified percentage of media is covered.

AsyncIO - Reads and writes data using aio library calls such as aioread() and aiowrite() until the specified percentage of media is covered. aiowait() is used to synchronize aio operations.

File System subtest

The File system subtest is used to verify the disk file system integrity. It exercises mounted disk partitions carrying the file system. By default, the test only runs on system-mounted partitions, it does not pre-mount any additional partitions. If you want SunVTS to pre-mount all of the unmounted partitions which have a file system, you have to set the environment variable BYPASS_FS_PROBE to '0' (zero). The test creates two temporary files of the size specified by File System File Size, writes the data patterns and compares the two files against each other.



disktest Test Options

To reach the following dialog box, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system may not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.


FIGURE 6-1 disktest Test Parameter Options Dialog Box

Screenshot of the disktest Test Parameter Options dialog box


The following table describes the disktest option menu for different test modes.


TABLE 6-2 disktest Configurations and Options

disktest Options

Description

Partition

Displays the partition for the Media subtest. If a partition is mounted, its mount point is appended after the partition number, such as 1(/usr), where 1 is the partition number, and "(/usr)" is the mount point.

Test Media

Enables or disables the media subtest.

Media Write Read Mode

Selects Read-Only or Compare after Read, or Read after Write.

Media Test Method

Selects the media test methods (SyncIO and AsyncIO).

Media Coverage (% TB, GB, MB, KB, B)

Tests all or part of a partition (in percentage or in any of TB, GB, MB, KB, B units)

Raw Test Pattern (P0 to P16)

Specifies the write, read pattern.

  • P0 - Low Frequency Pattern
  • P1 - Low Transition Density Pattern
  • P2 - High Transition Density Pattern
  • P3 - Compliant Jitter Pattern
  • P4 - Compliant Jitter: RPAT
  • P5 - Compliant Jitter: CRPAT
  • P6 - Compliant Jitter: JTPAT
  • P7 - Compliant Jitter: CJTPAT
  • P8 - Compliant Jitter: SPAT
  • P9 - Compliant Jitter: CSPAT
  • P10 - 8 Bit Cable Pattern
  • P11 - 16 Bit Cable Pattern
  • P12 - 8 Bit Xtalk Pattern
  • P13 - 16 Bit Xtalk Pattern
  • P14 - MFM Pattern
  • P15 - Generic Test Patterns
  • P16 - SATA Test Patterns

Seek Pattern

Specifies the pattern of the disk head movement.

  • S - Sequential
  • SR - Sequential Reverse
  • LS - Low Power Sequential
  • R - Random
  • LB - Low Power Butterfly
  • LR - Low Power Reverse Butterfly
  • AB - Actuator Butterfly
  • AR - Actuator Reverse Butterfly

Seek Point (%, I, O, M, TB, GB, MB, KB, B)

Specifies the seek point offset for the I/O. You can specify the offset as a percentage or any of TB, GB, MB, KB, B or and I, M, O (Initial, Middle, Outer).

Media Transfer Size

Displays the transfer size of the Media subtest.

Test File System

Selects the File System subtest.

File System File Size

Specifies the size for each of the two temporary files for File System testing.

File System Transfer Size

Displays the transfer size of the file system subtest.

File System Test Pattern

Test pattern of File System subtest.

Connection Test for Hard Disk

  • Option Menu for hard disk partition - 0 - 7 [default]
  • Test Media - [Enable] (fixed to Enable)
  • Media Write Read Mode - [Read Only] (fixed to Read Only)
  • Media Test Method-[SyncIO] (fixed to SyncIO)
  • Media Coverage(%) - 1
  • Media Transfer Size - [2 KB]
  • Test File System - [Disable] (fixed to Disable)

Online Mode for Hard Disk

  • Partition - 0 - 7 [default]
  • Test Media - [Enable] [Disable]
  • Test Mode - [Read-only~] (fixed to Read-only)
  • Media Coverage (% TB GB MB KB B) - [10~] (fixed to 10%)
  • Media Transfer Size - [2KB~] (fixed to 2 KB)
  • Test File System - [Disable~] (fixed to Disable)
  • Media Test Method - [SyncIO] [AsyncIO]
  • Raw Test Pattern - [P15~] (fixed to P15)
  • Seek Pattern - [S~] (fixed to S)
  • Seek Point (% TB GB MB KB B) - [I~] (fixed to I)

Functional Test for Hard Disk

  • Partition - 0 - 7 [default]
  • Test Media - [Enable] [Disable]
  • Media Write Read Mode - [Readonly] [CompareRead] [WriteRead]
  • Media Test method - [SyncIO] [AsyncIO]
  • Media Coverage (% TB, GB, MB, KB, B)
  • Raw Test Pattern (P0 to P16)
  • Media Transfer Size - [2KB] [16KB] [32KB] [64KB] [128KB] [256KB] [512KB]
  • Test File System - [Enable] [Disable]
  • File System File Size - [512KB] [2MB] [8MB] [20MB] [100MB] [200MB]
  • File System Transfer Size - [512B] [1024B] [10KB] [40KB] [80KB]
  • File System Test Pattern - [sequential] [0x00000000] [0xffffffff] [0x5aa55aa5] [0xdb6db6db] [random]
  • Seek Pattern - [S~] (fixed to S)
  • Seek Point (% TB GB MB KB B) - [I~] (fixed to I)

Functional Test for Floppy Disk

  • (under Other-Devices group) - Partition: 0 - 7 [default]
  • Test Media - [Enable] [Disable]
  • Media Write Read Mode - [Read-only] [BackupWriteRead]
  • Media Test Method - [SyncIO] [AsyncIO]
  • Media Coverage (% TB, GB, MB, KB, B)
  • Raw Test Pattern (P0 to P16)
  • Media Transfer Size - [2KB] [10KB] [20KB]
  • Test File System - [Enable] [Disable]
  • Floppy File Size - [100KB] [200KB]
  • Floppy Transfer Size - [512B] [1024B] [10KB]
  • File System Test Pattern - [sequential] [0x00000000] [0xffffffff] [0x5aa55aa5] [0xdb6db6db] [random]

 


disktest Test Modes


TABLE 6-3 disktest Supported Test Modes

Test Mode

Description

Connection

Only one instance of disktest (which monitors UNIX error messages) is allowed for each disk device. disktest displays messages and reports errors. The test also opens the hard disk, checks the disk configuration, reads a few blocks, and then closes the hard disk. No File System subtest is run. No Write option is available in Connection test mode.

Functional

More than one instance of disktest is allowed for one disk device. The File System subtest, Media subtests, and diskette test can be run in Functional test mode.

In Functional mode, disktest performs an additional subtest (Write/Read device buffer subtest) for enclosures.

Online

SunVTS disktest runs the Read Only rawtest with fixed transfer size and fixed rawtest pattern. Both SyncIO and AsyncIO test methods are available. The File system subtest is disabled in the Online test mode. Only one disktest instance could be run in the Online test mode.



disktest Command-Line Syntax

/opt/SUNWvts/bin/disktest standard-arguments [-o partition=[0-7], rawsub=[E(nable)|D(isable)],rawrw=[Readonly|CompareRead|WriteRead], rawiosize=number [KB|kb|random],rawcover=number [TB|GB|MB|KB|B|tb|gb|mb|kb|b|],rawpattern=P|0x<8 number pattern [0|1|2|3|4|5|6|8|9|10|11|12|13|14|15],method=[AsyncIO+SyncIO],fssub=[E(nable)|D(isable)],fssize=number [K|KB|M|MB|k|kb|m|mb],fsiosize=number [K|KB|B|k|kb|b],fspattern=[seq(quential)|0x0(0000000)|0xf(fffffff)|0xa(5a5a5a5)|0x5(a5a5a5a)|ran(dom)|0xd(b6db6db)],dev=device-name,seekpattern=[S|SR|LS|R|LB|LR|AB|AR],seekpoint=i(nner)|m(iddle)|o(uter)|number [TB|GB|MB|KB|B|tb|gb|mb|kb|b],runtime=number M,errcnt=number,wrbuftest=Enable|Disable] ]


TABLE 6-4 disktest Command-Line Syntax

Argument

Description

partition=0-7

Specifies the partition number as follows:

  • n - The partition number (slice number), usually 0-7 for SPARC and 0-16 for x86
  • mount-point - The mount point for the mounted partition that you plan to test

For example: partition=6"(/export)"

rawsub= E(nable)|D(isable)

Enables or disables the Media subtest.

For example: rawsub= Enable

rawrw=

Readonly|CompareRead|WriteRead

Specifies the Media subtest Read, Compare, and Write mode:

  • Read only
  • Read twice, Compare

(works only with SyncIO method)

  • Write, Read, Compare, Restore

For example: rawrw=ReadOnly

rawiosize=number[...|KB|kb...]|random

Specifies the media size to transfer. The block size can be specified in kilobytes. For example, 2K to 512K.

For example: rawiosize=9

rawcover=number|number[TB|GB|MB|KB|B|tb|gb|mb|kb|b]

Specifies media coverage from 0-100 (percentage) of the partition. Media Coverage can also be specified in the following units--TB, GB, MB, KB and B.

For example: rawcover=40 or rawcover=4GB

rawpattern=P(0-16)|0x8 digit data pattern

rawpattern could be specified as a predefined pattern set, P(0-16), or an 8 digit pattern could be specified as: 0xaa55aa55+0xff00ff00+0x. The following is a description of the supported pre-defined patterns:

  • P0 - Low Frequency Pattern
  • P1 - Low Transition Density Pattern
  • P2 - High Transition Density Pattern
  • P3 - Compliant Jitter Pattern
  • P4 - Compliant Jitter: RPAT
  • P5 - Compliant Jitter: CRPAT
  • P6 - Compliant Jitter: JTPAT
  • P7 - Compliant Jitter: CJTPAT
  • P8 - Compliant Jitter: SPAT
  • P9 - Compliant Jitter: CSPAT
  • P10 - 8 Bit Cable Pattern
  • P11 - 16 Bit Cable Pattern
  • P12 - 8 Bit Xtalk Pattern
  • P13 - 16 Bit Xtalk Pattern
  • P14 - MFM Pattern
  • P15 - Generic Test Patterns
  • P16 - SATA Test Patterns

For example: rawpattern=P1

method=AsyncIO+SyncIO

Specifies the Media access method. You can choose to use either or both methods . If you use both access methods together, you must insert a `+' between the two:

  • AsyncIO: Runs the asynchronous I/O test, using the async read/write feature of the Solaris disk driver
  • SyncIO: Runs the synchronous I/O test.

For example: method=AsyncIO

fssub=E(nable)|D(isable)

Enables or disables the File System subtest. File System subtest runs on a mounted partition with a File System.

fsiosize=number[K|KB|B|k|kb|b]

Indicates the size of the file system subtest I/O transfer in bytes or Kilobytes:

  • B|b - bytes
  • K|k|KB|kb - Kilobytes

512B|1024B|10KB|40KB|80KB

fspattern=[seq(quential)|0x0(0000000)|0xf(fffffff)|0xa(5a5a5a5)|0x5(a5a5a5a)|ran(dom)|0xd(b6db6db)]

Specifies the file system data pattern as sequential or random or one of the patterns selected from the list. [seq(uential)|0x0(0000000)|0xf(fffffff)|0xa (5a5a5a5)| 0x5(a5a5a5a)|ran(dom)|0xd(b6db6db)]

For example:

  • fspattern=0xa
  • fspattern=seq

dev=device-name

Specifies the name of the disk to be tested.

For example: c0t3d0.

seekpattern=[S|SR|LS|R|LB|LR|AB|AR]

disktest supports the following pattern types:

  • S - Sequential
  • SR - Sequential Reverse
  • LS - Low Power Sequential
  • R - Random
  • LB - Low Power Butterfly
  • LR - Low Power Reverse Butterfly
  • AB - Actuator Butterfly
  • AR - Actuator Reverse Butterfly

For example: seekpattern=S

 

seekpoint=[i(nner)|m(iddle)|o(uter)|number [TB|GB|MB|KB|B|tb|gb|mb|kb|b]

Specifies the seek-point for the I/O. This could be specified either in terms of the range - inner, middle and outer. Or in terms of absolute seek location.

The absolute location is specied by a number followed by any of the following units [TB|GB|MB|KB|B|tb|gb|mb|kb|b].

For example:

  • seekpoint=I, starts the I/O from block 1.
  • seekpoint=M, starts the I/O from middle offset of the partition.

runtime=[number M]

Specifies the test run time in minutes.

errcnt=number

Specifies the maximum error count.

wrbuftest=[Enable|Disable]

Enables or disables the Write/Read Buffer test.


The following example shows how to run disktest on a partition "0" (which is mounted under "/") for the disk device c0t0d0. The media subtest is enabled in ReadOnly mode using the SyncIO method. The coverage specified is 30% with 512 KB transfer size. The File System subtest is disabled.


# /opt/SUNWvts/bin/disktest -f -o partition=0"(/)", rawsub=Enable, rawrw=ReadOnly, method=SyncIO, rawcover=30, rawiosize=512KB, fssub=Disable, dev=c0t0d0