This is something I've noticed before and I figured it was time I understood what was going on.
If I try to access bad sectors on a failing disk my entire PC will often lock up at any point requiring disk access, even off good disks. Why is this?
Eg: I am using ddrescue to recover data from a failing disk (so that disk isn't mounted and isn't in use in any way other than for data recovery). When it tries to read a bad sector, ddrescue will understandably get stuck for several seconds [1].
However, in another terminal window (or other application), whilst the bad sector is being attempted, anything which requires disk access (eg trivial operations like "ls" or command completion using tab) will hang until the timeout on the bad disk read.
Why is this? I assume it's some kind of locking taking place but I don't understand why reading (eg) /dev/sdb should lock any operations on /dev/sda etc.
And ref: [1]: What determines the time that it takes for an attempt to read a bad sector to time out?
This is on an Ubuntu 14.04.1 desktop, although I've seen it elsewhere.
Mark
This is something I've noticed before and I figured it was time I understood what was going on.
If I try to access bad sectors on a failing disk my entire PC will often lock up at any point requiring disk access, even off good disks. Why is this?
Eg: I am using ddrescue to recover data from a failing disk (so that disk isn't mounted and isn't in use in any way other than for data recovery). When it tries to read a bad sector, ddrescue will understandably get stuck for several seconds [1].
However, in another terminal window (or other application), whilst the bad sector is being attempted, anything which requires disk access (eg trivial operations like "ls" or command completion using tab) will hang until the timeout on the bad disk read.
Why is this? I assume it's some kind of locking taking place but I don't understand why reading (eg) /dev/sdb should lock any operations on /dev/sda etc.
And ref: [1]: What determines the time that it takes for an attempt to read a bad sector to time out?
This is on an Ubuntu 14.04.1 desktop, although I've seen it elsewhere.
Mark
When this has happened to me (I too have tried to recover too many broken disks for people!), it's usually because the disks share a hardware channel (e.g. same disk controller / SATA driver), and the error recovery mechanism in the kernel is to reset hardware in the chain, so this also affects any device that share the hardware, typically by being locked out until the reset is done.
Phil.
On 30 September 2015 at 19:27, Phil Ashby phil.alug@ashbysoft.com wrote:
When this has happened to me (I too have tried to recover too many broken disks for people!), it's usually because the disks share a hardware channel (e.g. same disk controller / SATA driver), and the error recovery mechanism in the kernel is to reset hardware in the chain, so this also affects any device that share the hardware, typically by being locked out until the reset is done.
OK, that sounds plausible.
It also (sort of) explains why in some cases I've started to see apparent errors reported on my main drive while trying to deal with issues on a faulty one.
Conclusion: a decent USB3 SATA interface maybe?