Open deamen opened 7 years ago
What drive is this?
Can you show the output of smartctl -a /dev/sdc
?
It looks like some diagnostics command didn't return from the drive.
No idea why it got hanged like that but I probably should set the timeout to a lower value in any case to avoid it hanging.
In addition to the requested information from above, can you please try the head of the master branch? I reduced the timeout for the stuck IO to 5 seconds but I have no way to test it locally.
Hi Baruch,
The HDD is a Seagate SATA HDD, ST3400620NS
.
The hanging issue only happens when the drive is connected to a LSI SAS HBA, when I connect the drive to an on-board SATA port diskscan works fine.
The LSI SAS HBA information:
02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
I will try your timeout change later today and report back to you.
The HDD information as below: hdd.txt Thanks
Hi Baruch, I confirm the timeout commit (cd596a1) works, I can cancel diskscan with ctrl + c now:
diskscan version 0.19
I: Validating path /dev/sdc
E: Failed to read SMART attributes from device
I: Opened disk /dev/sdc sector size 512 num bytes 5000981077504
I: Scanning disk /dev/sdc in 65536 byte steps
I: Scan started at: Thu Apr 13 09:01:22 2017
Disk scan | | ETA: 0h00m00s
E: Error when reading at offset 0 size 65536 read -1, errno=0: Success
E: Details: error=need_retry data=none 06/29/00
E: Error when reading at offset 40501248 size 65536 read -1, errno=0: Success
E: Details: error=need_retry data=none 06/29/00
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
E: Failed to read SMART attributes from device
I: Disk scan interrupted
can we have a setting to set our own time out as 2ms seems to be my max timeout at the moment still takes a long time to try and cancel
even pkill -9 did not do much to finish it
I can add a command line option to set the timeout but a too low timeout will mean that it will be impossible to scan bad disks. I'll also try to think about what else can be done in such cases.
When I try to run diskscan /dev/sdc, it hangs at "I: Validating path /dev/sdc"
The strace log as below: