C H A P T E R  5

Disk and Floppy Drives Test (disktest)

disktest verifies the functionality of hard drives and diskette drives using three subtests (see ): Media, File System, and Asynchronous I/O. Most disk drives, such as SCSI disks, native or SCSI floppy disks, IPI, and so on, are supported. The type of drive being tested is displayed at the top of the Test Parameter Options dialog box.

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 (described below). 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 have SunVTS pre-mount all mountable partitions, set the environment variable BYPASS_FS_PROBE to 0 (zero) before starting SunVTS. Pre-mounting can be disabled by unsetting 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 it as superuser under the name /disktest_c0t3d0s0.



caution icon

Caution - If a power failure occurs OR if the disktest is terminated abruptly while the Media subtest is running in WriteRead mode, disk data may be corrupted.





caution icon

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



disktest tests the floppy drive regardless of 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 may 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_s0t0d0s0,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 5-1 disktest Subtests

Subtest

Description

Media subtest

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

In the 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 above three modes could run two different methods of disk testings. These are Synchronous I/O and Asynchronous I/O.

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

AsyncIO: Test reads and writes data using aio library calls such as aioread(), 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.

Self subtest

This test is run as part of the Media subtest. You can not enable or disable this subtest. It is performed in Functional test mode only. This subtest instructs the disk to run its internal diagnostics. A failure in the Self subtest indicates a hardware problem with the actual device under test.

Write/Read disk buffer subtest

This test is run as part of the Media subtest. You can not enable or disable this subtest. It is performed in Functional test mode only. This subtest verifies the Write/Read buffer for the disk.This subtest uses the pattern specified for the Media subtest or the default pattern to write a defined number of iterations to the Write/Read buffer. A failure in the Write/Read buffer subtest indicates a problem in the upstream component and not with the actual test disk.



disktest Test Options

To reach the dialog box below, 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 5-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 5-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

Enable or Disable 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)

Enables users to test all or part of a partition (in percentage or in any of TB, GB, MB, KB, B units)

Raw Test Pattern (P0 to P15)

Enables user to specify the write, read pattern.

P0 - Low Frequency PatternP1 - Low Transition Density PatternP2 - High Transition Density PatternP3 - Compliant Jitter PatternP4 - Compliant Jitter: RPATP5 - Compliant Jitter: CRPATP6 - Compliant Jitter: JTPATP7 - Compliant Jitter: CJTPATP8 - Compliant Jitter: SPATP9 - Compliant Jitter: CSPATP10 - 8 Bit Cable PatternP11 - 16 Bit Cable PatternP12 - 8 Bit Xtalk PatternP13 - 16 Bit Xtalk PatternP14 - MFM PatternP15 - Generic Test Patterns

Seek Pattern

Enables specifying 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)

Enables specifying the seek point offset for the I/O. You can specify the offset in percentage or any of TB, GB, MB, KB, B or and I, M, O; that is, 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 P15)

  • 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 P15)

  • 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 5-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 floppy test can be run in Functional test mode.

In Functional mode, disktest performs two additional subtests (Self subtest and Write/Read device buffer subtest) for enclosures.

These two additional subtests help in isolating the errors and are completed before disktest continues with the Media subtest or File System subtest.In Functional test mode, disktest also monitors enclosures by checking for errors in the Read link status counters and issues a warning if any errors are detected.

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> ["<(mount_point)>"], rawsub=E(nable)|D(isable), rawrw=Readonly|CompareRead|WriteRead, rawiosize=<number>{...|KB|kb...}|random, rawcover=<number>|<number>{TB|GB|MB|KB|B|tb|gb|mb|kb|b} rawpattern=P(<0-15>)|0x<8 digit data pattern>, seekpattern={S|SR|LS|R|LB|LR|AB|AR}, seekpoint={i|m|o|<number>}, 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=<data_pattern>, dev=<device_name>

TABLE 5-4 disktest Command-Line Syntax

Argument

Description

partition=<0-7> ["<(mount_point)>"]

Specifies the partition number as follows:

  • n--is the partition number (slice number), usually 0-7

  • mount_point--is 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,...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 units: TB, GB, MB, KB and B.

For example: rawcover=40 OR rawcover=4GB

rawpattern=P(<0-15>)|0x<8 digit data pattern>

rawpattern could be specified as a pre-defined pattern set, P(0-15), 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 PatternP1 - Low Transition Density PatternP2 - High Transition Density PatternP3 - Compliant Jitter PatternP4 - Compliant Jitter: RPATP5 - Compliant Jitter: CRPATP6 - Compliant Jitter: JTPATP7 - Compliant Jitter: CJTPATP8 - Compliant Jitter: SPATP9 - Compliant Jitter: CSPATP10 - 8 Bit Cable PatternP11 - 16 Bit Cable PatternP12 - 8 Bit Xtalk PatternP13 - 16 Bit Xtalk PatternP14 - MFM PatternP15 - Generic Test Patterns

For example: rawpattern=P1

seekpattern={S|SR|LS|R|LB|LR|AB|AR}

seekpattern could be specified to select the type of seek test to run on the disk drive.

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 exmaple: seekpattern=S

seekpoint={i|m|o|<number>}

Specify 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:

a) seekpoint=I, start the I/O from block 1.

b) seekpoint=M, start the I/O from middle offset of the partition.

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.

fspattern=<data_pattern>

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:

a) fspattern=0xa

a) fspattern=seq

fssize=<number>{K|KB|M|MB|k|kb|m|mb}

Indicates the file system subtest size in Megabytes or Kilobytes:

  • K|k|KB|kb - kilobytes

  • M|m|MB|mb - megabytes

512KB|2MB| 8MB| 20MB|100MB|200MB

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

dev=device_name

Specifies the name of the disk to be tested.

For example: c0t3d0.


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 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



Note - 64-bit tests are located in the sparcv9 subdirectory /opt/SUNWvts/bin/sparcv9/testname, or the relative path to which you installed SunVTS. If a test is not present in this directory, then it may only be available as a 32-bit test. For more information refer to the "32-Bit and 64-Bit Tests" section of the SunVTS 5.1 Test Reference Manual (816-5145-10).