Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2007 21:06:19 -0500
From:      Peter Matulis <pmatulis@sympatico.ca>
To:        freebsd-questions@freebsd.org
Subject:   trouble using raidtest on gstripe array
Message-ID:  <200701272106.19135.pmatulis@sympatico.ca>

Next in thread | Raw E-Mail | Index | Archive | Help
On 6.2 STABLE GENERIC, I have set up RAID0 using gstripe on two SATA 
drives and installed benchmarks/raidtest for testing.

The array is known as /dev/stripe/data.

These were my steps:

# export mediasize=`diskinfo /dev/stripe/data | awk '{print $3}'`
# export sectorsize=`diskinfo /dev/stripe/data | awk '{print $2}'`
# raidtest genfile -s $mediasize -S $sectorsize -n 50000
# ls
-rw-r--r--  1 root  super   781K Jan 27 08:42 raidtest.data
# raidtest test -d /dev/stripe/data -n 10 raidtest.data

raidtest: Cannot open 'raidtest.data' device: Operation not permitted

# ktrace raidtest test -d /dev/stripe/data -n 10 raidtest.data
# kdump

  1222 raidtest CALL  open(0xbfbfed3f,0,0x8049e6c)
  1222 raidtest NAMI  "raidtest.data"
  1222 raidtest RET   open 3
  1222 raidtest CALL  fstat(0x3,0xbfbfeb30)
  1222 raidtest RET   fstat 0
  1222 raidtest CALL  open(0xbfbfed28,0x10002,0x8049e6c)
  1222 raidtest NAMI  "/dev/stripe/data"
  1222 raidtest RET   open -1 errno 1 Operation not permitted
  1222 raidtest CALL  write(0x2,0xbfbde3d0,0xa)
  1222 raidtest GIO   fd 2 wrote 10 bytes
       "raidtest: "
  1222 raidtest RET   write 10/0xa
  1222 raidtest CALL  write(0x2,0xbfbde3f0,0x22)
  1222 raidtest GIO   fd 2 wrote 34 bytes
       "Cannot open 'raidtest.data' device"
  1222 raidtest RET   write 34/0x22
  1222 raidtest CALL  write(0x2,0x2813ed98,0x2)
  1222 raidtest GIO   fd 2 wrote 2 bytes
       ": "
  1222 raidtest RET   write 2
  1222 raidtest CALL  write(0x2,0xbfbde3d0,0x18)
  1222 raidtest GIO   fd 2 wrote 24 bytes
       "Operation not permitted
       "
  1222 raidtest RET   write 24/0x18
  1222 raidtest CALL  exit(0x1)

---------------------------------------

Looks like the gstripe label (/dev/stripe/data) is not available 
somehow.  Is there any known workaround?

---------------------------------------

Port info:

This utility can be used to test performance of storage devices.
First, one need to generate file with I/O operations:

        # set mediasize=`diskinfo /dev/<device> | awk '{print $3}'`
        # set sectorsize=`diskinfo /dev/<device> | awk '{print $2}'`
        # raidtest genfile -s $mediasize -S $sectorsize -n 50000

It will generate test which contains 50000 I/O requests with random
size and random offset. Size is a multiple of sectorsize, but less than 
or
equal to 128kB (maxium size of I/O request). I/O request type (READ or 
WRITE)
is random as well.
All test data are stored in 'raidtest.data' file in current working 
directory.

To run test, one should type:

        # raidtest test -d /dev/<device> -n 10

This command will read test data from 'raidtest.data' file, run 10 
processes
which will be used to send requests to the given device in parallel.
When test is finished you will see statistics:

        Bytes per second: <x>
        Requests per second: <y>

If you compare performance of two storage devices, use the same data 
file!

usage: raidtest genfile [-frw] <-s mediasize> [-S sectorsize] <-n 
nrequests> [file]
       raidtest test [-Rrw] <-d device> [-n processes] [file]

where:
        -d device       path to tested device
        -f              if raidtest.data file or specified file already 
exists,
                        remove it and create new one
        -n nrequests    number of requests to generate
        -n processes    number of processes to run
        -r              generate/run only READ requests
        -R              generate random data for write requests
        -s              size of destination device
        -S              sector size of destination device
        -w              generate/run only WRITE requests
        file            path to the data file instead of 
default 'raidtest.data'



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200701272106.19135.pmatulis>