Skip to contentSkip to conversation

hdparm almost burned my SATA disk

DISCUSSION J.A. Magallon 3 participants 5 messages Oct 15, 2005 – Oct 17, 2005

lore
Share & tools
lore
#0 lore raw

Hi all...

I have seen a very strange thing.
I was trying hdparm -tT on a SATA disk, it did the buffered part OK, and hanged my box in the non-buffered measure. After waiting some minutes, I did a SysRQ-s-u-b, and the the disk began to give many read errors on sectors and could not boot because journal was not present and many other errors.

After some warm and cold boots, finally the box came up correctly. I suspect that something that hdparm did left my disk dumb. But what ? I will keep away from hdparm for some time...

Any idea ?

TIA

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.13-jam8 (gcc 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0))

#1 lore raw
Quoted 9 lines · J.A. Magallon

Hi all...

I have seen a very strange thing.
I was trying hdparm -tT on a SATA disk, it did the buffered part OK, and hanged my box in the non-buffered measure. After waiting some minutes, I did a SysRQ-s-u-b, and the the disk began to give many read errors on sectors and could not boot because journal was not present and many other errors.

Quoted 6 lines

After some warm and cold boots, finally the box came up correctly. I suspect that something that hdparm did left my disk dumb. But what ? I will keep away from hdparm for some time...

Any idea ?

Oops I forgot.
Kernel is 2.6.14-rc2-mm2.
hdparm is v6.1
Filesystem is ext3 on a

werewolf:~/soft/kernel/patches/2.6.13-jam8# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media

        Model Number:       Maxtor 6L160M0                          
        Serial Number:      L40MRV4G            
        Firmware Revision:  BANC1G10

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.13-jam8 (gcc 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0))

#2 lore raw

Hi,

Quoted 23 lines · J.A. Magallon
Quoted 9 lines · J.A. Magallon

Hi all...

I have seen a very strange thing.
I was trying hdparm -tT on a SATA disk, it did the buffered part OK, and hanged my box in the non-buffered measure. After waiting some minutes, I did a SysRQ-s-u-b, and the the disk began to give many read errors on sectors and could not boot because journal was not present and many other errors.

Quoted 6 lines

After some warm and cold boots, finally the box came up correctly. I suspect that something that hdparm did left my disk dumb. But what ? I will keep away from hdparm for some time...

Any idea ?

Oops I forgot.
Kernel is 2.6.14-rc2-mm2.
hdparm is v6.1
Filesystem is ext3 on a

Quoted 8 lines
werewolf:~/soft/kernel/patches/2.6.13-jam8# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media

        Model Number:       Maxtor 6L160M0
        Serial Number:      L40MRV4G
        Firmware Revision:  BANC1G10
debian:/home/michal# hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 3652 MB in 2.00 seconds = 1823.54 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
Timing buffered disk reads: 174 MB in 3.01 seconds = 57.72 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

debian:/home/michal# hdparm -V
hdparm v6.1
debian:/home/michal# hdparm -I /dev/sda

/dev/sda:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

debian:/home/michal# uname -r
2.6.14-rc4-g7a3ca7d2

CONFIG_SCSI_SATA=y
# CONFIG_SCSI_SATA_AHCI is not set
# CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y

I have noticed the same behavior on 2.6.12.

Regards,
Michal Piotrowski

#4 lore raw
In reply to J.A. Magallon
Quoted 9 lines · J.A. Magallon

I was trying hdparm -tT on a SATA disk, it did the buffered part OK, and hanged my box in the non-buffered measure. After waiting some minutes, I did a SysRQ-s-u-b, and the the disk began to give many read errors on sectors and could not boot because journal was not present and many other errors.

After some warm and cold boots, finally the box came up correctly. I suspect that something that hdparm did left my disk dumb. But what ?

Nope. hdparm simply does a bunch of read() system calls to fetch data from the drive, same as any other code might do it.

I think you should use the smartmontools to check the drive error logs and find out what REALLY happened there.

-ml

#3 lore raw
In reply to Michal Piotrowski
Quoted 10 lines · Michal Piotrowski
debian:/home/michal# hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 3652 MB in 2.00 seconds = 1823.54 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
Timing buffered disk reads: 174 MB in 3.01 seconds = 57.72 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device

Quoted 7 lines
debian:/home/michal# hdparm -V
hdparm v6.1
debian:/home/michal# hdparm -I /dev/sda

/dev/sda:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

Harmless. 100% harmless.

The "Inappropriate ioctl for device" messages are due to the incomplete implementation of HDIO_DRIVE_CMD in libata. No big deal. Once the passthru patches finally get released for real, I'll update hdparm to not use the missing ioctl.

Cheers