Re: [PATCH] Format Unit can take many hours

Ricky Beam
2004-05-11T14:06:40Z

On Tue, 11 May 2004, Kurt Garloff wrote:
>the timeout for FORMAT_UNIT should be much longer; I've seen 8hrs
>already (75Gig). I've increased the timeout from 2hrs to 12hrs.

If you execute a FORMAT_UNIT properly, the timeout is irrelevant. Set the
IMMED bit so the command returns as soon as the drive begins processing it.
Send TEST_UNIT_READY to check the progress. I'll have to consult the
spec, but I think support for Immed is required.

That's how my (now 8 year old) tool for formating scsi devices (zip, jaz,
hard disks, tapes, etc.) has always worked. [No, it is not published code.
If the script kiddies want to low-level your hard drive, they're gonna have
to learn how to do it themselves.]

--Ricky

PS: That even works under Solaris where one does not have the source code
to change the command timeouts.