hdparm + HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory hdparm + HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl
# 1  
Old 03-05-2009
hdparm + HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl

Hi All,
Am finding performance of my SD card using hdparm.

Code:
hdparm -tT /dev/BlockDev0

/dev/BlockDev0:
 Timing cached reads:   1118 MB in  2.00 seconds = 558.61 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device
 Timing buffered disk reads:   14 MB in  3.13 seconds =   4.47 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device

Am not aware of "HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device". What actually makes it to occur?? What does this problem mean? How to resolve it??

Thanks in advance.
Amio
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wait for one processes to complete in a shell script

Let's say I start process A.sh, then start process B.sh. I call both of them in my C.sh How can I make sure that B starts its execution only after A.sh finishes. I have to do this in loop.Execution time of A.sh may vary everytime. It is a parameterized script. (17 Replies)
Discussion started by: rafa_fed2
17 Replies

2. Shell Programming and Scripting

Inappropriate ioctl for device

Sample program tty, this will be get called from my script test_script. #include <stdio.h> #include <unistd.h> #define TTY_NAME_MAX 32 #define STDIN_FILENO 0 /* Standard input. */ int main(void) { int ret = 0; char local_device_file; printf("\npid =... (7 Replies)
Discussion started by: Gajendra_PH
7 Replies

3. UNIX for Dummies Questions & Answers

How do you wait for command substitution processes to complete?

When running a command using the >(cmd) syntax in bash how do you wait for the command to complete before moving on in your script? Here is a simple example: zcat largefile.gz | tee >(wc && echo “HELLO”) > /dev/null # I tried wait, here but it doesn't wait for the process in the subshell.... (8 Replies)
Discussion started by: mrvwman
8 Replies

4. Shell Programming and Scripting

hdparm + Inappropriate ioctl for device

Hi All, Am finding performance of my SD card using hdparm. Code: hdparm -tT /dev/BlockDev0 /dev/BlockDev0: Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device Timing buffered disk... (1 Reply)
Discussion started by: amio
1 Replies

5. Shell Programming and Scripting

Inappropriate ioctl for device

Dear all, Problem goes like this: I have a shell script which when run manually runs perfectly. When same script is executed through a job schdeduler I get an error as Inappropriate ioctl for device and the script fails. This problems seems quite guiling to me. Any clues are heartly... (11 Replies)
Discussion started by: RishiPahuja
11 Replies

6. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

Hello, I have a cron entry: 59 23 * * * . $HOME/.profile;mydate=`date '+%Y%m%d'`;mv filename filename_$mydate Which works fine interactively, but gives me the following error when it runs in cron: Your "cron" job on servername . $HOME/.profile;mydate=`date '+ produced the... (4 Replies)
Discussion started by: steelrose
4 Replies

7. UNIX for Dummies Questions & Answers

Inappropriate ioctl for device

When I try to format a slice in Solaris 10 I get the follow error :confused: : -bash-3.00# mkfs /dev/dsk/c1d0s5 18877824 Can not determine partition size: Inappropriate ioctl for device Some format command output:.... AVAILABLE DISK SELECTIONS: 0. c1d0 <DEFAULT cyl 38735 alt 2... (0 Replies)
Discussion started by: spoonman
0 Replies

8. Filesystems, Disks and Memory

Inappropriate ioctl for device

Hi, We are running a perl script to upload some data using SQL* Loader. We pipe the data in a http request to SQL*Loader which loads the data to the database. We encounter the error "Inappropirate ioctl for device" when we try to upload huge data. Any solution would be greatly appreciated.... (4 Replies)
Discussion started by: tojaiganesh
4 Replies

9. Shell Programming and Scripting

Wait for Background Process to complete

I am attempting within a for-loop, to have my shell script (Solaris v8 ksh) wait until a copy file command to complete before continueing. The specific code is: for files in $(<inputfile.lst) do mv directory/$files directory/$files ksh -m -i bg %% wait $! done I am shaky on the... (3 Replies)
Discussion started by: gozer13
3 Replies

10. Shell Programming and Scripting

PERL: wait for process to complete

I'm using PERL on windows NT to try to run an extract of data. I have multiple zip files in multiple locations. I am extracting "*.t" from zip files and subsequently adding that file to one zip file so when the script is complete I should have one zip file with a whole bunch of ".t" files in it. ... (2 Replies)
Discussion started by: dangral
2 Replies
Login or Register to Ask a Question
SG_VPD(8)							     SG3_UTILS								 SG_VPD(8)

NAME
sg_vpd - fetch Vital Product Data (VPD) pages via a SCSI INQUIRY command SYNOPSIS
sg_vpd [--enumerate] [--help] [--hex] [--ident] [--long] [--maxlen=LEN] [--page=PG] [--quiet] [--raw] [--verbose] [--version] DEVICE DESCRIPTION
This utility fetches a Vital Product Data page and decodes it or outputs it in ASCII hexadecimal or binary. VPD pages are fetched with a SCSI INQUIRY command. Probably the most important page is the Device Identification VPD page (page number: 0x83). Since SPC-3, support for this page has been flagged as mandatory. This page can be fetched by using the --ident option. The reference document used for interpreting VPD pages (and the INQUIRY standard response) is T10/1713-D Revision 36e (SPC-4, 24 August 2012) found at http://www.t10.org . Obsolete and reserved items in the standard INQUIRY response output are displayed in square brackets. When no options are given, other than a DEVICE, then the "Supported VPD pages" (0x0) VPD page is fetched and decoded. OPTIONS
Arguments to long options are mandatory for short options as well. The options are arranged in alphabetical order based on the long option name. -e, --enumerate list the names of the known VPD pages, first the standard pages, then the vendor specific pages. Each group is sorted in abbrevia- tion order. The DEVICE and other options are ignored and this utility exits after listing the VPD page names. -h, --help outputs the usage message summarizing command line options then exits. Ignores DEVICE if given. -H, --hex outputs the requested VPD page in ASCII hexadecimal. Can be used multiple times, see section on the ATA information vpd page. -i, --ident decode the device identification (0x83) VPD page. When used once this option has the same effect as '--page=di'. When use twice then the short form of the device identification VPD page's logical unit designator is decoded. In the latter case this option has the same effect as '--quiet --page=di_lu'. -l, --long when decoding some VPD pages, give a little more output. For example the ATA Information VPD page only shows the signature (in hex) and the IDENTIFY (PACKET) DEVICE (in hex) when this option is given. -m, --maxlen=LEN where LEN is the (maximum) response length in bytes. It is placed in the cdb's "allocation length" field. If not given (or LEN is zero) then 252 is used (apart from the ATA Information VPD page which defaults to 572) and, if the response indicates this value is insufficient, another INQUIRY command is sent with a larger value in the cdb's "allocation length" field. If this option is given and LEN is greater than 0 then only one INQUIRY command is sent. Since many simple devices implement the INQUIRY command badly (and do not support VPD pages) then the safest value to use for LEN is 36. See the sg_inq man page for the more information. -p, --page=PG where PG is the VPD page to be decoded or output. The PG argument can either be an abbreviation, a number or a pair or numbers sepa- rated by a comma. The VPD page abbreviations can be seen by using the --enumerate option. If a number is given it is assumed to be decimal unless it has a hexadecimal indicator which is either a leading '0x' or a trailing 'h'. If one number is given then it is assumed to be a VPD page number. If two numbers are given the second number indicates which vendor specific VPD page to decode when several pages share the same VPD page number. If this option is not given (nor '-i', '-l' nor '-V') then the "Supported VPD pages" (0x0) VPD page is fetched and decoded. If PG is '-1' or 'sinq' then the standard INQUIRY response is output. -q, --quiet suppress the amount of decoding output. -r, --raw output requested VPD page in binary. The output should be piped to a file or another utility when this option is used. The binary is sent to stdout, and errors are sent to stderr. -v, --verbose increases the level or verbosity. -V, --version print out version string then exit. ATA INFORMATION VPD PAGE
This VPD page (0x89 or 'ai') is defined by the SCSI to ATA Translation standard. It contains information about the SAT layer, the "signa- ture" of the ATA device and the response to the ATA IDENTIFY (PACKET) DEVICE command. The latter part has 512 bytes of identity, capability and settings data which the hdparm utility is capable of decoding (so this utility doesn't decode it). To unclutter the output for this page, the signature and the IDENTIFY (PACKET) DEVICE response are not output unless the --long option (or --hex or --raw) are given. When the --long option is given the IDENTIFY (PACKET) DEVICE response is output as 256 (16 bit) words as is the fashion for ATA devices. To see that response as a string of bytes use the '-HH' option. To format the output suitable for hdparm to decode use either the '-HHH' or '-rr' option. For example if 'dev/sdb' is a SATA disk behind a SAT layer then this command: 'sg_vpd -p ai -HHH /dev/sdb | hdparm --Istdin' should decode the ATA IDENTIFY (PACKET) DEVICE response. NOTES
Since some VPD pages (e.g. the Extended INQUIRY page) depend on settings in the standard INQUIRY response, then the standard INQUIRY response is output as a pseudo VPD page when PG is set to '-1' or 'sinq'. Also the decoding of some fields (e.g. the Extended INQUIRY page's SPT field) is expanded when the '--long' option is given using the standard INQUIRY response information (e.g. the PDT and the PRO- TECT fields). In the 2.4 series of Linux kernels the DEVICE must be a SCSI generic (sg) device. In the 2.6 series block devices (e.g. disks and ATAPI DVDs) can also be specified. For example "sg_inq /dev/sda" will work in the 2.6 series kernels. From lk 2.6.6 other SCSI "char" device names may be used as well (e.g. "/dev/st0m"). EXIT STATUS
The exit status of sg_vpd is 0 when it is successful. Otherwise see the sg3_utils(8) man page. EXAMPLES
The examples in this page use Linux device names. For suitable device names in other supported Operating Systems see the sg3_utils(8) man page. To see the VPD pages that a device supports, use with no options. The command line invocation is shown first followed by a typical response: # sg_vpd /dev/sdb Supported VPD pages VPD page: Supported VPD pages [sv] Unit serial number [sn] Device identification [di] Extended inquiry data [ei] Block limits (SBC) [bl] To see the VPD page numbers associated with each supported page then add the '--long' option to the above command line. To view a VPD page either its number or abbreviation can be given to the '--page=' option. The page name abbreviations are shown within square brackets above. In the next example the Extended inquiry data VPD page is listed: # sg_vpd --page=ei /dev/sdb extended INQUIRY data VPD page: ACTIVATE_MICROCODE=0 SPT=0 GRD_CHK=0 APP_CHK=0 REF_CHK=0 UASK_SUP=0 GROUP_SUP=0 PRIOR_SUP=0 HEADSUP=1 ORDSUP=1 SIMPSUP=1 WU_SUP=0 CRD_SUP=0 NV_SUP=0 V_SUP=0 P_I_I_SUP=0 LUICLR=0 R_SUP=0 CBCS=0 Multi I_T nexus microcode download=0 Extended self-test completion minutes=0 POA_SUP=0 HRA_SUP=0 VSA_SUP=0 To check if any protection types are supported by a disk use the '--long' option on the Extended inquiry data VPD page: # sg_vpd --page=ei --long /dev/sdb extended INQUIRY data VPD page: ACTIVATE_MICROCODE=0 SPT=1 [protection types 1 and 2 supported] GRD_CHK=1 .... Further examples can be found on the http://sg.danny.cz/sg/sg3_utils.html web page. AUTHOR
Written by Douglas Gilbert REPORTING BUGS
Report bugs to <dgilbert at interlog dot com>. COPYRIGHT
Copyright (C) 2006-2012 Douglas Gilbert This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. SEE ALSO
sg_inq(sg3_utils), sg3_utils(sg3_utils), sdparm(sdparm), hdparm(hdparm) sg3_utils-1.35 November 2012 SG_VPD(8)