News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

HD random seek

Started by Donald_SBC, March 18, 2009, 03:14:59 PM

Previous topic - Next topic

Donald_SBC

I had a HD that was making noise after it warmed up and I wanted to beat on it.  I asked a friend to write a program to do random seeks limited to a specified block range, a specified interval between seeks and for a specified duration.  He wrote it in VB and all seems to be fine except that the heads don't move.  I know this because I tested the program on a WD Raptor drive that has a clear cover.  The heads stayed at the outer edge of the platters.

Consensus in VB forums is that Assembler is needed to do this.

What I envision is an Assembler DLL that accepts 1 parameter, a LBA and seeks to it. A return code of good/bad would be nice. Don't actually need to read the block.

Anyone know of something like this?

dedndave

you might try forcing the VB code to flush the buffers
the whole thing hinges on disk-caching
nothing actually happens until the buffers are forced to actually write to the disk
it is a bit tricky to directly access the drive in win32
i am trying to learn more about this subject, myself

Tedd

You'd need direct access to the disk I/O ports - which are protected by the operating system for security reasons.
No snowflake in an avalanche feels responsible.

PBrennick

I am not sure I like this topic. That ability can be used in a malicious way. Using the normal APIs this job can easily be done by continually reading the same file over and over again. Do it that way.

I will not help you learn how to seek areas of the HD that should not be accessed.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Mark Jones

There are tools out there already that will "beat any available data from a disk." Check out SpinRite, that will tell you if any part of the disk is failing (and probably recover any data in the process.)
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

dedndave

i wanted to add one other thing.....
if the hard drive is marginal, get as much desired data from it as soon as possible
it won't be long before ot dies completely
i have had a little experience with bad drives
it seems that heat gets to them because
inside most CPU cases, the airflow in that area is very limited

Mark Jones

Dave, in my experience, heat is a major cause of failure in hard drives. Keep them well-ventilated, and perhaps surprisingly, do not power off the machine. Every time it is powered off and on, the drive must cool down and warm up again. Same with "sleep" mode, where the drive spins down. All of these cause thermal stress, which (over the years) seems to be a big factor in premature failure. Solid-state drives (SSD's) are becoming more popular recently, and of course those do not apply.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

dedndave

ty Mark
Oh - I am well aware of it - lol
I find this especially true of 7200+ rpm drives
the motor tends to heat up the circuit board
when circuits change temperature, they act differently, depending on the type of circuit
analog circuits are affcted most, usually
this may change circuit parameters like head write-current, etc, which, in turn, can cause problems
heat can affect ssd's also, but they do not get as hot because there is no motor
i am considering mounting a fan in the case near the drives to help
one of my drives is a maxtor 7Y250M0 250 gb drive - my second one, and my nephew has the same drive
these drives tend to get very hot and have problems
my newer drive is a maxtor STM3500320AS 500 gb
it runs much cooler - i suspect maxtor improved the efficiency of the motors
- Dave
p.s. I have been an electronics engineer for over 30 years
      I have put a considerable amount of time into thermal problems,
      testing, and solutions on a wide variety of circuit types

MichaelW

I agree that not powering off the machine will make most of the components last longer, but one thing to consider here is that capacitors with the bad electrolyte formulation have a limited power-on (or at least limited ripple-current) life. I think the bad electrolyte problem was corrected long ago, but capacitors with this problem ended up in an immense number of components.
eschew obfuscation

askm

What ?

...is the thermal stress on a hd starting up from household room temperature or cooling from operating

...then is needed to maintain those hd at a single median operating temperature (ie some where between)


dedndave

quite simply, cooler is almost always better
in fact, a last-ditch effort to recover data from a bad drive is to freeze it,
then connect it while still frozen and see if you can recover some data - lol
nearly all circuits work better when cold, at least above -25C
analog and RF circuits usually act differently at one temperature than another
many such circuits are tempurature compensated to overcome this
in the case of hard drives, the analog circuitry that communicates
with the heads is the most likely place for trouble
most of the heat comes from the motor
power-on/power-off is not as important as simple on-time
the longer a computer has been on, the hotter it will be, and the more likely a problem becomes
this is especially true for drives that have inefficient motors that get hotter than normal
digital circuits (i.e. most of the computer) work pretty much the same from
some lower tempurature limit to some upper tempurature limit
with all circuits, the longer they have operated without a failure, the less likely a failure is
if a circuit is going to fail, it is likely to fail early in the life of the system
probably the most common failure of hard drives is the heads, themselves
these are very sensitive to over-current/over-tempurature stress

Mark Jones

Plus, the physical expansion and contraction of materials due to (relatively) large temperature fluctuations. A HDD is a precision instrument. In general, my experience has been that disks that remain constantly operating and are offered some form of free-air cooling, last a LOT longer than those that are powered on/off daily and are buried deep in the case. 10k RPM disks, forget putting them in a case, mount 'em external and attach a fan for "free" winter heating. :bg
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Donald_SBC

Paul: not trying to seek outside of where the OS will let me.  Just wanted to make the heads move.

Others: my programmer found the problem. He was failing to include the sector length in the calculation.

VB only program is now working fine.

We don't need no steenkin MASM.   :bg

dedndave

Once you go ASM, you can never go back

BlackVortex

Quote from: Donald_SBC on April 08, 2009, 03:05:07 PM
my programmer found the problem. He was failing
Typical VB programmer.


:green2