C H A P T E R  7

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 programs. Only select this mode when the system is offline (not used by any other users or programs).



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.


disktest Subtests

The following table describes the disktest subtests:

TABLE 7-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 device 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 device.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 device.



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

Enables Read-Only or Compare after Read or Read after Write.

Media Test Method

Enables or disables 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

Media Transfer Size

Displays the transfer size of the media subtest.

Test File System

Enables or disables 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--[2KB]

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

  • Media Transfer Size--[2KB]]

  • Test File System--[Disable~] (fixed to Disable)

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]

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



disktest Command-Line Syntax

/opt/SUNWvts/bin/disktest standard_arguments -o partition=<0-7> "(mount_point)",rawsub=E|D,rawrw=Readonly|CompareRead|WriteRead, rawiosize=n,rawcover=n,method=AsyncIO+SyncIO,fssub=E|D,fssize=n, fsiosize=n,fspattern=data_pattern,dev=device_name,rawpattern=<P|0x<8 number pattern>{0|1|2|3|4|5|6|8|9|10|11|12|13|14|15}

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

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

rawcover=n

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

rawiosize=n

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

For example: rawiosize=9

rawpattern=<P|0x<8 number pattern>{0|1|2|3|4|5|6|8|9|10|11|12|13|14|15}

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

fssub=E(nable)|D(isable)

Enables or disables the File System subtest.

fspattern=data_pattern

Specifies the file system data pattern as sequential or random. {seq(uential)|0x0(0000000)|0xf(fffffff)|0xa (5a5a5a5)| 0x5(a5a5a5a)|ran(dom)|0xd(b6db6db)}

For example: fspattern=data_pattern

fssize=n

Indicates the file system subtest size in kilobytes or megabytes:

  • K|k|KB|kb - kilobytes

  • M|m|MB|mb - megabytes

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

fsiosize=n

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, such as 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 512KB 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).