Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm from Austria and we and the Germans have a bad science-show which runs every day. What I call it would roughly translate to "half-knowledge". The show is called "Galileo".

They made a computer myth busters video and asked: "Does unplugging the computer damage your data?"

Then they started up some machine with Vista on it, started copying some files and randomly unplugged the PC cable, the whole thing around 50 times.

After their computer continued to start up normally, they just said "nothing can happen, your data or computer can't be damaged".

They of course excluded unsaved data in running programs like text editors from this.

  • I asked myself: What the hell are their "computer experts" saying? You can't tell by unplugging the cable 50 times if that can damage your computer.

  • Can unplugging the cable during runtime cause data loss (as said by the moderator of the show)?

I have destroyed my windows registry once during a reset, so I'm curious to know.

share|improve this question
Oh come can't take those guys serious (Welt der Wunder, Galileo and the like of it)...a while back they suggested to backup your data on floppy disks and that you have to wipe from the inside out if you clean a CD, or else you'd move the data around... – Bobby Apr 23 '10 at 10:24

If you unplug your computer, that's the same as when you turn it off or simply reset it. On modern file systems, like NTFS, it shouldn't cause problems. NTFS is called journaling file system, which means that when improperly unmounting the drive (for example, if you turn off the computer or the OS unexpectedly crashes), it will restore to a stable place when starting the OS again. The file you were copying may not be complete, but no data apart from that should be lost.

On older, non-journaling filesystems, like FAT, the OS can't repair the filesystem automatically. That's why you had to run Scandisk when Win98 crashed. The usual problem here is that some data is written to the disk, but that data doesn't belong to any file, but still allocate space on the disk.

share|improve this answer
Isn't it something different if you unplug the computer compared to resetting? – Kan Apr 23 '10 at 8:29

Already fully saved data is fine after a power cycle, partially saved data may not be.

The theory is that with modern Journaling File Systems the data is written is such a way that any changes to the filesystem can either be rolled back (if you crashed while writing a large file that cannot be completed within the simplistic bounds of the journal) or continue to roll forward (i.e. file rename or deletion) so that the system is either in the state that it was before the operation or is as close to the intended state as possible. This system is not infallable.

In practice this randomly removing power may not cause problems with the filesystem (due to journaling) but a random power spike or act of dog during some critical operation such as partition resizing or formatting could put the system into a very bad state.

Presumably these "experts" were using the tried and trusted method of starting the machine, waiting for the hard drive light to stop flashing (i.e. the system is not actually using the drive) and then removing the power at the time when least damage is likely to occur. If I were doing the testing I would do the following:

  1. Remove as much memory as possible so that the pagefile is being used hard
  2. Start some massive video or data processing task to keep that hard drive working hard
  3. Start some random batch of programs and set them going (for luck)
  4. Save as much data from programs as possible
  5. THEN remove the power at random points in this list and on restart see what survived. Chances are Windows will be fine but some data may be inconsistant. YMMV

For best effect try resizing your Windows partition and then remove the power, see if your machine is fine after that.

share|improve this answer

I don't care what the "experts" say, this is still a stupid idea.

Can unplugging the cable during runtime cause data loss 

Sure. If you're doing any non-atomic file copying operation, a disk convert, modifying the partition table, downloading a file, ...

Still, this isn't the worst case of bad science I've come across. There's a show in the UK that warned about putting Diamonds in an oven, as "because they're made of carbon, they'll turn to CO2 and float away!"

share|improve this answer
Actually diamonds will burn to CO2. However, your oven would have to get to about 850 C – gorilla Apr 23 '10 at 12:26
Yeah I don't know about you but my oven doesn't go up to Gas Mark 30 :) – RJFalconer Apr 23 '10 at 13:47

Forget filesystems, what about magnetic plates tearings caused by badly parking flying head?

share|improve this answer
Not an issue, when the power goes out, the drive parks it heads. It has enough power reserves for that. – Sven Apr 23 '10 at 11:36
I've seen disks with bad sectors caused by such powerdowns. – Ivan Petrushev Apr 23 '10 at 12:23
@Ivan: Yes, if the disk was writing a stream of blocks when it loses power it may not be able to finish and it leaves a block with a bad ECC code (ie, a bad block). A new write to that block will fix it. – Zan Lynx Dec 7 '11 at 0:33

Possible hardware damage aside, how safe your data is really depends on the file system you use and unlike the popular myth journalling file systems aren't a cure for data loss, they can be quite the opposite. The reason for this is journalling itself just means that the integrity of your filesystem is protected, it does not mean that the integrity of your data is protected. With XFS on Linux for example you have a very large window between when your application writes the data and when the data actually hits the disk, if something happens in between the data is gone. That by itself wouldn't be all that bad, but combined with a few quirks of what POSIX allow in terms of filesystem semantics you get into situations where when an application replace an old config file with a new one you have no guarantee that in the case of a crash either of the files survives. Instead you may end up with a 0 bytes file. And this isn't a one in a million accident, it basically happens on every second crash on your average desktop system to some random config file (the .gconf database is an easy victim).

Other filesystems, like ext3, don't suffer from the issue, as either their semantics are a little different or they have a much smaller cache window. Early versions of Ext4 and reiserfs suffered this to, but have been fixed in the meantime.

Long story short: data that is already on your disk and doesn't get touched will survive, data that however is modified can easily get wiped when you use the wrong filesystem, while its pretty safe with others.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .