Closed g2p closed 9 years ago
What platform are you on? Linux or a BSD? What is the symlink arch/arch.c pointing to? On Linux I diskscan issues scsi commands and should get the full sense buffer so it's strange that it got no info.
I'll also take a look at why it stopped on error, I agree it should continue to test and report on the entire disk.
Looks like you are on Linux but for some reason the SATA driver didn't translate the error to a SCSI sense and only returned it as a driver error. Can you provide the output of lspci? This will tell me what is the SATA controller so I'll know about it.
I currently default to make any unknown error a fatal one and this stops the scan since fatal errors mean there is no reason to continue the scan (disk fully dead). I'll think about this and see what I can do.
Made unknown errors non-fatal, can you please test it and let me know if it works out for you?
Testing, will report back in a few hours.
Relevant lspci bits:
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
Subsystem: ASUSTeK Computer Inc. P8 series motherboard
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 46
I/O ports at f070 [size=8]
I/O ports at f060 [size=4]
I/O ports at f050 [size=8]
I/O ports at f040 [size=4]
I/O ports at f020 [size=32]
Memory at f6306000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA v1.0
Capabilities: [b0] PCI Advanced Features
Kernel driver in use: ahci
The SATA controller is the same one I have, though on my own disk there were no uncorrectable errors for me to see this phenomenon. It would be non-trivial to be able to test this though, will need to delve into READ LONG and WRITE LONG and hope there is an equivalent in SATA for them.
With this change I was able to complete the scan. Thank you.
Great!
One of my diskscans (without --fix) stopped at the first error:
The kernel log has more info (uncorrectable sector), I don't know how much is passed to userland (not through "sense" apparently).
I would prefer if the scan kept running in this case; this is a large disk and scanning good sectors again takes time.
Also, it would be extra helpful if --fix mode could reuse the log to start with error events and high-latency ranges. This way the total runtime for scanning then fixing could be halved.