sudden power loss question

Started by babyoh, February 08, 2008, 08:13:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

babyoh

if anyone happens to know...
how serious is it, if i'm on a notebook (running XP) using ac power (XP) -- and the power to the computer gets cut off?
* it used to be REAL serious, because the read-write head would plop down, and pulverize whatever data it hit.
- is it still the same situation...?

(boring further info, you can skip this part)
** my laptops get very heavy use, and no matter how careful i am, eventually a cord goes bad (or a socket, if i use it a lot.)
if the damaged cord is the ac adaptor, my 1st indication of the problem is  *Sudden Power Loss.*

- all i can think of to do to remedy this, is change my ac adaptor cords 2x a year, or so, as a preventative.

:gwave:


Aaron Hulett

The following views and opinions are my own, and do not reflect the views and opinions of Microsoft.  Microsoft is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.

It's also 1 AM, so if something is misspelled or doesn't make sense, call it out and I'll address once I'm fully awake.

What can happen?  Well, it kind of depends on luck, and what you're doing at the time.  Any open files are subject to corruption, especailly if you're in the middle of writing them.  Or, nothing might happen; you'll boot it back up and go as if nothing happened (of course, Windows might say something like "I didn't close properly last time, how do you want me to start, normal or safe mode?").  You mention Windows XP, but this impacts any OS running on any computer, notebook, desktop, server, and mainframe.

My primary computer is a laptop and I use the heck out of it.  It's why I'm not surprised the hard drive failed in it, I've been through a motherboard, a keyboard, and the thing is zapping me now where the paint has come off due to heat over the years (I just don't grab it there, unless I forget and then I quickly remember).  It turns four years old in March/April, somewhere around there.  Anyway, I'm still using the same power cord I've had the whole time, and while it's just now starting to look like it's going to go bad, I haven't run out for a new one as I plan on a new laptop in the next month or so.

If you're running a laptop with a battery in it, and assuming the battery is charged and not defective or worn out or anything, if the power cord comes out the battery should just keep powering the laptop, and there will be nothing to worry about (I have seen models where this isn't true, but not in the last 10 years - your mileage may vary).  If you don't have a battery in it, then when the power cord detaches or otherwise stops powering the laptop, the laptop will turn off.

The drive heads don't exactly just plummet into the disk media wherever it is.  When the drive turns off, the heads automatically move (by spring, or electricity generated by the spinning media as it slows down) to a landing zone - this area doesn't have any data on it, and is specifically for the heads to land on.  Years ago, and I mean like 20, drives didn't do this automatically, and you had to run a utility to do this before turning the machine off.  If you forgot, it usually wasn't the end of the world as you probably would be ok, but eventually it'd bite you if you forgot enough times as the heads would rest where data was and the potential for data loss existed.

For today's drives, it's not resting on the platter that causes data loss so much as from when the heads contact the platter while the drive is spinning that do it (imagine taking a tiny object and dropping it against a surface spinning at around 100 times a second - bad things will happen).  This is normally caused by dropping the drive (usually with the laptop surrounding it at the time) or something like that.

As usual, whether it be power failure or hard drive failure or any failure, your best insurance is to have a backup of your important data, preferably a drive image so you can restore everything back very easily.  When the hard drive I mentioned earlier died in my laptop back in December, I ran to the store and bought another one, and using the backup I had, I restored everything back.  My laptop was down for about 8 hours, and I lost nothing except my time.  See my blog post for background and more information:  http://www.aaronhulett.com/?p=107

So going back to what I said at first, what normally gets ya if there's sudden power loss is incomplete file writes.  Your hard drive is in the middle of writing something, or file writes are in the cache and didn't make it to the physical disk yet, and suddenly poof! the power is cut.  What happens next is dependent on exactly what was going on at the time the power loss happened.  If the file already existed and was in the middle of a file write, chances are the file will be corrupt and unopenable now.  If a program allocated some disk space, but the whole file didn't make it to disk, then you wind up with pieces of a file sitting around, but nothing actually constructive.  The term "Lost Clusters" applies here - there's clusters that are marked in use but they don't actually belong to any file.

Side note:  usually when people hear Lost Clusters, they think of it in terms of losing something, such as you lost a book.  But actually the cluster and its data exist, but there's no information on where it belongs, similar to having have some random pages but no clue what books they belong to - or such as you're on your way to 123 Fake Street and you have no idea where you are, you're lost.  So are the clusters, they're sitting there with no information regarding what file(s) they belong to.

If you don't have a backup, make one, and then you won't need to worry about these what-if scenarios, as you'll already be prepared.  It's the number one thing that one can do to protect data, and it's the one people do last (they'll invest in battery backup units for desktops, install antivirus and antispyware programs to keep things from becoming a mess, but they never back anything up).  When disaster does hit, you'll have two possible outcomes:  the first is when the user says, "Glad I have my backup," and the second response is, "What about my files, can you save them?  I need them!"  Make a backup, make a backup, make a backup!

I am curious how you're going through power cords like this.  Maybe this will help?  When I buy a notebook, I purchase two power adapters - the one that comes with it (the higher power one) and the travel one (usually less power, but who cares, I want it for travel).  The main one stays at home plugged in at one place - I never unplug it, ever (probably bad - vampire appliance as it'll just sit there and pull power).  The travel one is the one that takes all the beating, and at the moment is falling apart.  If this sounds like your usage pattern, it might not hurt to try this out.  But, if you're moving your laptop everywhere and never have a common place where you always use it, then I'm not sure what to think off the top of my head.

Let me know your usage patterns or anything else relevant - I'll brainstorm on it.

Aaron

Ripley

Quote from: AaronSo going back to what I said at first, what normally gets ya if there's sudden power loss is incomplete file writes.  Your hard drive is in the middle of writing something, or file writes are in the cache and didn't make it to the physical disk yet, and suddenly poof! the power is cut.  What happens next is dependent on exactly what was going on at the time the power loss happened.  If the file already existed and was in the middle of a file write, chances are the file will be corrupt and unopenable now.  If a program allocated some disk space, but the whole file didn't make it to disk, then you wind up with pieces of a file sitting around, but nothing actually constructive.  The term "Lost Clusters" applies here - there's clusters that are marked in use but they don't actually belong to any file.

Side note:  usually when people hear Lost Clusters, they think of it in terms of losing something, such as you lost a book.  But actually the cluster and its data exist, but there's no information on where it belongs, similar to having have some random pages but no clue what books they belong to - or such as you're on your way to 123 Fake Street and you have no idea where you are, you're lost.  So are the clusters, they're sitting there with no information regarding what file(s) they belong to.

Living & learning.  Thanks for that.

Corrine

Aaron, if you ever get tired of the business you're in, you would be a wonderful teacher. 


Take a walk through the "Security Garden" -- Where Everything is Coming up Roses!

Remember - A day without laughter is a day wasted.
May the wind sing to you and the sun rise in your heart.

babyoh

aaron,

thanks mucho mucho for the explanation.

:thud:
(that's the closest i could find to a BOWING smiley- pretend he's bowing, and not Falling.)

* why i go thru so many cords:
i'm almost exclusively on laptops. (i got in the habit, when i was traveling a lot, then discovered i had virtually no repetitive stress on the joints, with a notebook in my lap.)
- i mainly use the lighter of my laptops, and when i say it gets heavy use, you probably wouldn't believe me if i told you. sometimes i go over 20 hours, sleep a bit at my desk, wake up -- and start computering again.

* anyway, with this kind of use, after a year or 2 SOMETHING wears out.

part of the problem is the design. no matter how careful i am, the simple act of moving the notebook from the desk to my lap puts stress on the cords -- it's slight, but enough to kill something over time.

* the ac jack is on the left towards the back: i'm also connected to an external flatscreen, ethernet, and use my audio jack (which is in the worst spot of all, a little left of dead center in the front: the cord's ALWAYS at an hard angle, since the cord can't run directly through my stomach; i'll actually bang into the plug, if i get too close to the computer when i'm working).

i have other devices (printer, ext drive, etc), that i connect as needed.

* i'm very careful not to exert pressure on the cords, but it happens anyway.

i try to snake the cables so they stay untangled, and can hang without tension, or being at a sharp angle. (hard to explain; i'd have to post photos to really show you)

* anyway, it's not completely possible to do this with those many cords. i do my best, but one's always looping under another, on the trip from my lap to my desk, and vice-versa.

like i said, it's not much tension, but repeated 100's and 100's of times, eventually something goes bad.

the ac cord gets a little more wear and tear i think, due to its' position and shape. (the ethernet cable and monitor cable are thicker, and easier to manuver out of the way, while the ac cord's like spaghetti, and more likely to get "tugged on" when i'm moving around.)

* anyway, i think you get the idea.