Does turning off the PC with the power button damage HDD's?

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
I remember how computers used to have an instant off power button in that if you pushed it the computer would turn off instantly like a TV, nowadays the button needs to be held down, does this gives the drives a chance to spin down or prepare to be shut off or anything? Or is it like that just to prevent pushing it by mistake?
 

alaricljs

Golden Member
May 11, 2005
1,221
1
76
It's actually programmable in the bios as to whether it's instant or 4 second delayed. The delay is in part so you don't accidentally shut off the system. When you enable the delay it also allows the OS to receive the "power-down" signal and do something about it. Without the delay it just kills the power.

HDD's handle power-down the same no matter what since there is no ATA command that says "you're going to be shut off in a moment." The OS should tell the drive(s) to flush their caches, but nothing other than that. The heads will auto-park when the power is cut.
 

Lead Butthead

Senior member
Oct 5, 2009
250
0
71
Head crash used to be common in the olden days and requires end users to park drive head before power down (think pre-1990 MFM, RLL, ESDI type of stuff) Since then modern drives can detect power loss and will flush write cache and park itself before total power loss. That feature has been there for decades. Power down without going through the OS would cause loss of data that is in the OS's write buffer, but drives are largely unaffected.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
I remember how computers used to have an instant off power button in that if you pushed it the computer would turn off instantly like a TV, nowadays the button needs to be held down, does this gives the drives a chance to spin down or prepare to be shut off or anything? Or is it like that just to prevent pushing it by mistake?

The power button on a modern PC has 2 functions:
1. When pushed briefly it sends a signal to the OS, telling the OS that the power button has been pressed. The OS then has the option to perform some sort of action - e.g. shutting down, hibernating or going into standby. Alternatively, the OS can ignore the button push.

2. When held for a period (usually for 4-10 seconds), the button triggers a circuit on the motherboard that tells the PSU to shut off. This allows the system to be powered off, if the OS does not support the power button signal, or the OS has crashed and is unable to respond.

In situation 1, a requirement to hold the button is often configurable in the BIOS. E.g. you may be able to configure that the motherboard ignores presses of less than 4 seconds - and only after holding for 4 seconds does it send the OS the 'power button pressed' message. This is useful for servers, where you don't want people to accidentally shutdown a server by brushing the button.

In situation 2, the power control circuit on the motherboard does nothing to prepare for the power going out. Shutting off the power in this way has exactly the same effect on the system as pulling the cord from the wall, or turning off the PSU with an external switch.

Modern hard drives should not be damaged by this. Old hard drives, would need to have a 'park' command sent to them, so that the heads could be retracted and locked into their storage position. Modern hard drives detect power failure, and when the power goes out, automatically retract the heads and lock them down (they use the momentum of the spinning platters, and switch the spindle motor to generator mode, to form a kind of crude UPS).

While a modern hard drive won't be damaged - the data might be. Writing data to a hard drive platter is relatively slow, and requires precise spindle speeds, and there isn't time for the drive to do anything except finish writing the sector it was working on, and retract the heads. Any data left in the disk cache will be lost. Modern file-systems like NTFS, ext4, HFS+, ZFS, etc. are very careful to ensure that losing the data in the disk cache shouldn't damage anything except the file that was being saved. (Assuming that the drive responds to advanced cache control commands correctly). However, older FSs like FAT and older OSs like Win95 were much less careful, and turning off the PC while the hard drive was active and write caching was enabled, could corrupt hundreds of files or directories.
 
Last edited:

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
Thanks guys, excellent info very detailed. I had to power off my server (no RAID or anything that gets screwey with power offs) that way so just wanted peace of mind in case i had to do it again. Server 2008 froze with the "adding snap in to console" bit when i tried to shut it down with remote desktop, guess i should give it more time to bring up the server manager before hammering the shut down button in future.
 

llee

Golden Member
Oct 27, 2009
1,152
0
76
sorry to hijack your thread, but how would that affect SSDs then?
 

C1

Platinum Member
Feb 21, 2008
2,385
113
106
Shutting off the power in this way has exactly the same effect on the system as pulling the cord from the wall, or turning off the PSU with an external switch

You cant assume this. Doing this (eg, using a wall toggle switch) can damage a PSU/computer if there is sufficient line inductance (eg, a transformer or motorized device on the line). You could easily generate a 1000v spike. Been there done that & demonstrated the effect in my electronics 101 course (spark jumps gap when circuit with L collapses).
 
Last edited:

sxr7171

Diamond Member
Jun 21, 2002
5,079
40
91
Gosh when ever will MS products stop freezing? Sorry, it's a pet peeve of mine. They should be ashamed to call it a "server" OS.
 

GundamF91

Golden Member
May 14, 2001
1,827
0
0
sorry to hijack your thread, but how would that affect SSDs then?

SSDs don't have moving parts, so spindle momentum cannot be used to generate power to save the cache content. But at the same time, SSD needs less power to write, and current generation of SSDs have large capacitors that hold enough charge to flush the cache and save data on the cells.

That said, sudden powerless is never a good thing. I'd suggest a battery backup/UPS system for every computer you have.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,204
126
HDD's handle power-down the same no matter what since there is no ATA command that says "you're going to be shut off in a moment." The OS should tell the drive(s) to flush their caches, but nothing other than that. The heads will auto-park when the power is cut.

Not true. Windows spins down the drives, before it shuts off power using ATX soft-off.

Edit: You can check this with an XP install. Set windows (using group policy) to not power-off at shutdown. It will still spin down the drives.
 
Last edited:

Ross Ridge

Senior member
Dec 21, 2009
830
0
0
You cant assume this. Doing this (eg, using a wall toggle switch) can damage a PSU/computer if there is sufficient line inductance (eg, a transformer or motorized device on the line). You could easily generate a 1000v spike. Been there done that & demonstrated the effect in my electronics 101 course (spark jumps gap when circuit with L collapses).

Uh, no, if this was an easy as you suggest people would be blowing out every light blub and electronic device in their houses all the time. Remember also, it's turning off the inductive load that causes the spike, not turning off a PC or something else in the house. Having your PC turned off by the power switch on the back (or a wall switch) is only going to make it less likely from being damaged by a motor being turned off.
 

tweakboy

Diamond Member
Jan 3, 2010
9,517
2
81
www.hammiestudios.com
Well either always ON or off once per day, Has no effect on its life span or wear the tear.

Reason I know this I had a 54,000 thousand hours of work on a old 120GB WDC during that time I shut off pc many times or sometimes leave it on for days.. Its now at 54k , it was 49k when I took this shot. Also screw on drive very tigthly so theres no vibration. Thanks


wdc.jpg