Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers
4

For SSDs the answer is "None, at least not with any kind of magnetic field you would want to be around." -- The storage element in a solid state hard drive is flash RAM, which is not a magnetic encoding medium (See this HowStuffWorks article for more).

For conventional (magnetic) hard drives the answer is "it depends on what you mean by contact".
A static magnetic field applied to a hard drive that isn't moving probably won't harm it, and the magnetic encoding on hard drives is surprisingly resistant to being trashed by the average magnet you'll encounter (PCWorld talked a little bit about this waaaaay back in 2004).
That being said, I would not go around putting refrigerator magnets (or worse, rare-earth magnets) on a hard drive (spinning or stopped): It's a case of "better safe than sorry", particularly if you value the data.
Also it should go without saying that you keep degaussing equipment (essentially "dynamic" magnetic fields) away from magnetic media of any kind unless you want to erase it.

I posted this question sort of as a joke, but now I realize it's actually a very serious topic! Thank you very much; I actually read and took your response seriously and will be sure to keep magnets away from my computer systems at all costs, even if they contain SSDs.
–
zzgJan 20 '12 at 21:18

Magnets have little effect on the outside case of the drive unless the magnet is very, very strong. With spinning magnetic media, errant magnets inside the case can change the data on the disk, making some of it unreadable.

Magnets have no effect on SSDs except to the extent that a change in magnetic flux induces a current in wires. Though that probably won't make cause noticeable effect.

Presumably you're asking whether you can erase a disk by waving a magnet over it. The answer is probably not, though it's not a good idea to try on drives you want to keep.

HDDs typically have a specified tolerance in the magnitude of 1 mT for the magnetic field intensity at the drive's perimeter when operating. Having a magnet placed within close proximity to the drive would mean a field intensity in the magnitude of 10-100 mT, thus you would be operating the drive outside of specifications, which obviously is to be avoided.

As for the "what happens" question: there have been reports of people losing their hard drive's contents or even getting the servo markers deleted (thus rendering the drive unusable) as they have placed their notebooks with spinning disks on strong magnets which in the late 90's were integrated into the folding tables of some train models in Germany.

I know from personal experimentation that a rare earth magnet that's 1cm thick and about 1.5cm x 3cm is capable of making a hard drive unreadable. I don't know for sure, but I assumed at the time it was the wiping of the server track that did the damage. (This was the voice coil magnet from a DEC 1GB drive ~1994 - 5.25", about 8 platters.)
–
WardJan 21 '12 at 6:42