Take the 2-minute tour ×

The sysadmins at my company say that Linux is prone to getting nuked by a power outage. They say Windows machines always survive power outages but Linux boxes often become unrecoverable (ie you can no longer boot the machines). This came up because they told me the power company is shutting off power to our offices for a long period of time so the admins wanted me to shut down all the Linux boxes to which I alone have access before the outage.

What is the story here, I thought Linux was supposed to be robust? Is there some process I should be running to avoid my Linux boxes from getting nuked by a power outage?

share|improve this question
Well, disregarding different OS problems, power outages affects any machine, simply because every process that is running stops to. It is always preferable to let the machine shut itself off, because then all processes are allowed to stop normally. –  Doktoro Reichard Aug 22 '13 at 22:09
Doh, I know this. The question is whether Linux is more brittle than Windows for some reason, and if so, is there something I can do to increase its robustness (like forcing it to flush its disk cache more frequently somehow, for example). –  Tyler Durden Aug 22 '13 at 22:22
My answer mas meant to be general and encompassing: no matter what you do, there is always a risk of something somewhere failing. If Linux is more brittle I leave it for those who can specifically answer. My personal experience (with Windows and with OSX) shown me that unless I was doing something I cared for the output (simulations, for instance), they bounced back easily. Maybe something you should add is how the machines are used. –  Doktoro Reichard Aug 22 '13 at 22:26
"Is there some process I should be running to avoid my Linux boxes from getting nuked by a power outage?" The problem is at a hardware level, the only command you can run here that would help is "shutdown computer" If you are concerned about this, I recommend a UPS (though this gets expensive fast if you have a large number of computers) –  David Aug 22 '13 at 22:32
Always is a big word, its also false. Windows can become corrupt during a power outage. Why don't you have battery backups and configure your system to shutdown? I can safely say that anyone who says "always" will be wrong 99.99999% of the time. –  Ramhound Aug 22 '13 at 23:07

3 Answers 3

up vote 4 down vote accepted

Is linux more brittle than windows?
The answer is : It Depends.

When someone says "unable to boot" in this situation I translate it to "File system corruption" and the answer Yes or No to the original question all depends on which file system you are using.

Windows does not let you have the full range of choices for filesystems that a Linux box will allow. You almost never see a non NTFS windows system. NTFS has things built in to it to help if there is a power loss, like journaling and file transactions that can roll back in the event of a failure.

A Linux box could have this, and could not. It all depends on how the server was set up. If the server used ext21 you could be very susceptible to file corruption in the event of a power failure. Compare that to a system that used something like Btrfs which has more data integrity features than NTFS does.

So if the sysadmin you where talking to only has ever worked with ext2 systems he very well could be right, but if you used another filesystem he could be wrong.

1: Ext2 was the default for both Debian and Red Hat Linux for a very long time. It has now been replaced mostly with Ext3 which is more on par with NTFS for features for data integrity.

share|improve this answer
What about the filesystems with journaling and file transactions that are not NTFS? I don't dispute the lack of complete and total power in Windows can lead to better stability if something is interrupted though. –  Ramhound Aug 22 '13 at 23:10
I mention that in my note on the bottom, Ext3 is the same level as NTFS. I believe that the sysadmin may have only experenced Ext2 filesystems, and from his point of view he would be right. It is like if you where only exposed to Fat32 filesytems and had never seen NTFS you would feel similarly about windows (versions of Windows on Fat32 had a horrible history of file corruption on power loss) –  Scott Chamberlain Aug 22 '13 at 23:13
I entirely missed the footnote :-( –  Ramhound Aug 22 '13 at 23:15
+1 for referring to the different file systems in use and journaling. –  Doktoro Reichard Aug 22 '13 at 23:32

No, Linux is not inherently less robust then Windows when it comes to sudden power outages. What could happen - in the case of either OS - is that stuff is being written to the filesystem on the harddrive at the precise moment power is lost, and (historically) this could corrupt the filesystem.

The solution to this problem is to use a journaling filesystem which is immune to this problem based on the way it writes information. Most new filesystems - including Ext3 and ExT4 (the most common filesystems for Linux), as, I believe, NTFS is as well. So as long as you are using a journaling filesystem you won't experience this problem.

Later on down the boot process, if you have a database (I'm looking at MYSQL, Postgres does not suffer from this), you may have analogous issues with the MYSQL database - MYSQL is often not particularly robust (Google ACID compliance MYSQL for this topic). You can get around this problem by forcing a check of the indexes on reboot if your MySQL setup is not ACID compliant.

Another (somewhat Jaded and possibly unfair to Windows) view might be this - Linux boxes are more reliable then Windows boxes (as measured by Uptime and the need to do reboots) - thus it is possible that when Linux boxes fail on reboot it is a hardware problem due to old age rather then a software problem - whereas a failing Windows box may be detected sooner because of more frequent reboots)

share|improve this answer

Dependent on the distro and what file system you have, it could be more or less vulnerable. If you know about a scheduled power cut, you should definitely manually shut down (and use the time for maintenance like vacuuming the systems or maybe rewiring... For those unscheduled power outages, get UPS systems with Linux shutdown software so you don't need to worry. You should be running this anyway. There is a APCUPSD file available for most Linux distributions, if not that, then check with your distro to see what is already inside of it or available for it. Make sure it will shut down your systems cleanly prior to relying on it.

share|improve this answer

Your Answer


