C H A P T E R  12

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 while the Media subtest is running in WriteRead mode, disk data may be destroyed.





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.

describes the disktest subtests.

TABLE 12-1 disktest Subtests

Subtest

Description

Media subtest

Verifies disk media by writing data to and reading data from the disk. The Media subtest treats a disk as one large chunk of contiguous data.

This is a scalable test that can run multiple copies in read/write mode on the same disk partition. To avoid data corruption, all simultaneous instances of disktest communicate through a shared memory service. This ensures that different copies of the media subtest do not overlay the same disk block at the same time.

The Media subtest runs in two different modes as described below:

SyncIO: The SyncIO media test creates a random offset for a partition from which the media testing starts. Starting from this offset, the read (Readonly mode) or the write/read (WriteRead mode) begins in a sequential fashion. The test continues until the specified percentage of media is covered.

AsyncIO: The AsyncIO media test always starts from the first block of the partition under test and covers the area specified by the Media Coverage percentage.

AsyncIO uses the read/write feature of the Solaris disk driver to exercise the disk. In Readonly mode, the test sends a maximum of four asynchronous read packets, each with a random size and a random offset into the selected partition. The test then waits for all outstanding I/O activity to complete before issuing another round of packets. This process continues until the whole area is tested. In WriteRead mode, one write packet is issued in every four read packets as a spot check of the write operation. Before data is written to a particular location, data is backed up, write-verified, and restored to its original state.

File System subtest

Verifies the disk system's integrity. The File System subtest exercises the partition being tested to determine if it is mounted. If the partition is not already mounted or pre-mounted, then the test is blocked. The test opens two temporary files (of the size specified on File System File Size ) and performs a Read/Write test.



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 12-1 disktest Test Parameter Options Dialog Box

describes the disktest option menu for different test modes.

TABLE 12-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, with or without backup.

Media Test Method

Enables or disables the Media Test Methods (SyncIO and AsyncIO).

Media Coverage (%)

Enables users to test all or part of a partition (in percentages).

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

Creates a file system file size twice the size of what is specified.

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(%)--[10]

  • 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(%)--[30]

  • 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(%)--[30]

  • 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 12-3 disktest Test Modes

Test Mode

Supported?

Description

Connection

Yes

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.

Functional

(Offline)

Yes

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 offline Functional test mode.



disktest Command-Line Syntax

/opt/SUNWvts/bin/disktest standard_arguments -o dev= device_name ,partition= <0-7> "( mount_point )" ,rawsub= E|D ,
rawrw=
Readonly|CompareRead|WriteRead , method= AsyncIO+SyncIO ,rawcover= n ,
rawiosize=n
,fssub= E|D ,fssize= n ,fsiosize= n ,fspattern= data_pattern

TABLE 12-4 disktest Command-Line Syntax

Argument

Description

dev = device_name

Specifies the name of the disk to be tested, such as c0t3d0.

partition= n "( 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.

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

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.

rawcover= n

Specifies media coverage from 0-100 (percentage) of the partition.

rawiosize= n

Specifies the media size to transfer. The number you specify is in kilobytes:

2KB | 16KB | 32KB | 64KB | 128KB | 256KB | 512KB

fssub= E(nable)|D(isable)

Enables or disables the File System subtest.

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

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




Note Note - 64-bit tests are located in the sparcv9 subdirectory: /opt/SUNWvts/bin/sparcv9/testname. 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 32-Bit and 64-Bit Tests.