How do you set a shorter timeout value for read/write I/O errors on MacOSX?

We tend to get a few semicrashed disks and want to rsync the contents to a secure location, but when the file subsystem hits a block with an error it tends to freeze up all the processes pertaining to that file system. We use MacSO X so that we can read HFS+.

I recon this is something you have to change on kernel level or even firmware (so asking at Ask Different is wasted).

The alternative is to have an rsync exclude file and each time I hit a bad block I add the filename of the failed file to the excludes, pull the plug (literally) on the broken disk to provoke a flush and reconnect, but that is more than likely to destroy the disk even further.

  • You could try using ddrescue instead of rsync. Kernel (or MIB) variables can be changed with sysctl. – Lri Jun 6 '13 at 13:22
  • ddrescue is actually a very good suggestion if you pop the disk onto something Linuxy, as they have a somewhat saner approach to IO error timeouts (than MacOSX). I'll keep that in mind, thanks! – Klaus Wik Jun 6 '13 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.