You are not logged in.

#1 2009-03-11 19:09:24

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Is a hard power off really that bad? Discussion

Well, I have had to hard poweroff my machine (laptop) a few times, it sometimes freezes at login and sometimes a combination of applications make it crash on shutdown. This results in the next boot ext4 recovering journal and saying all is clean. Now, I haven't read much about the effects of hard power off, so I want to discuss with you guys, do I need not to worry if a hard poweroff is made while the system is hard powered off while it is shutting down or at login prompt, when no files are being transmitted?

Is just that my mind thinks that this is such a bad thing, I would like to debunk some myths in my head and learn about the what happens if.

I hope I made myself clear.

Last edited by kensai (2009-03-11 19:09:41)


Follow me in: Identi.ca, Twitter, Google+

Offline

#2 2009-03-11 19:12:30

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Is a hard power off really that bad? Discussion

I can tell you that ext4 was a small disaster having to hard reset. During many X crashes (intel) on a machine that I was working on, configuration files were being lost all over the place resulting in the system getting screwed up. I read in an Ubuntu bug report that it was fixed upstream in the 2.6.28.7 kernel though.

Offline

#3 2009-03-11 19:20:22

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,001
Website

Re: Is a hard power off really that bad? Discussion

I'm assumeing you mean this bug:
https://bugs.edge.launchpad.net/ubuntu/ … bug/317781

This comment explains what is going on:
https://bugs.edge.launchpad.net/ubuntu/ … omments/54

Not sure that the patches talked about in the bug have been applied anywhere on official kernel releases though...

Offline

#4 2009-03-11 19:28:23

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Is a hard power off really that bad? Discussion

well, I have only had permissions being messed up sometimes, I just backup everyhting and reinstall whenever that happens, just because that is easier for me than to hunt down files and change permissions accordingly. But well, if no file is screaming it lost a file then all is good I guess.


Follow me in: Identi.ca, Twitter, Google+

Offline

#5 2009-03-11 19:29:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Is a hard power off really that bad? Discussion

Thanks Allan, the second link explains a lot. And yes, it looks like I misread about the patches. It's Ubuntu that patched and not the kernel.

So, what do all of you LXDE and XFCE people do? Their applications were by far the worse off in the situation that I was in.

Offline

#6 2009-03-11 19:33:32

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Is a hard power off really that bad? Discussion

I've got an ext4 / and a hard poweroff hasn't hurt me yet!?

Yet to read Allan's links but heard of dreadful things happening on kubuntuforums.net


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#7 2009-03-11 19:35:49

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Is a hard power off really that bad? Discussion

I think ext4 is pretty resistant, but I would like to hear more insight on this.


Follow me in: Identi.ca, Twitter, Google+

Offline

#8 2009-03-11 19:39:12

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Is a hard power off really that bad? Discussion

I lost configuration files almost every single crash that I had on the system that I was working on. It was crashing about 2/3 of the time, and the only way that I knew of to shut it down was by force power off.

Offline

#9 2009-03-11 19:39:40

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Is a hard power off really that bad? Discussion

A hard power-off using...
- ...Ext4 does not end well for me.
- ...JFS usually recovers, but when something bad happens, I always end up having to re-install.
- ...Ext3 has, yet, never has damaged anything.

Offline

#10 2009-03-11 19:48:44

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Is a hard power off really that bad? Discussion

I too, have never had any problems with hard-powering off an ext3 disk.. but hearing about these problems with ext4 i won't update to that in a good while...


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#11 2009-03-11 19:56:25

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Is a hard power off really that bad? Discussion

I don't want to have nothing but horror stories here about ext4. My workstation has been using it for everything except boot for months and everything performs great. It's completely rock solid.

Offline

#12 2009-03-11 20:59:27

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Is a hard power off really that bad? Discussion

yeah, well, in fact all my hard poweroffs have been on ext4 and only a few of them have resulted in permissions problems. And that could have been something else. So please, lets not start talking bad about ext4, which is a fine filesystem.


Follow me in: Identi.ca, Twitter, Google+

Offline

#13 2009-03-11 21:24:09

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,001
Website

Re: Is a hard power off really that bad? Discussion

And slashdot is now covering the ext4 issue: http://linux.slashdot.org/article.pl?si … 11/2031231

Offline

#14 2009-03-11 21:25:17

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Is a hard power off really that bad? Discussion

So far so good here with ext3 and XFS a few times.

Offline

#15 2009-03-11 22:05:31

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Is a hard power off really that bad? Discussion

Allan wrote:

I'm assumeing you mean this bug:
https://bugs.edge.launchpad.net/ubuntu/ … bug/317781

This comment explains what is going on:
https://bugs.edge.launchpad.net/ubuntu/ … omments/54

Not sure that the patches talked about in the bug have been applied anywhere on official kernel releases though...

That second link was an interesting reading, thanks smile

and if that impacts their performance too much, to use a single berkdb or other binary database file, and not do something stupid with hundreds of tiny text files that only hold a few bytes of data in each text file.

/me hides


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#16 2009-03-11 22:08:16

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: Is a hard power off really that bad? Discussion

Good info here (most covered in links above, but not all):

http://www.h-online.com/open/Possible-d … ews/112821


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#17 2009-03-11 22:20:05

Allan
Member
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,001
Website

Re: Is a hard power off really that bad? Discussion

shining wrote:

and if that impacts their performance too much, to use a single berkdb or other binary database file, and not do something stupid with hundreds of tiny text files that only hold a few bytes of data in each text file.

/me hides

Hmmm... I did not even think about that when reading... Quick, code the tar db backend!

Offline

#18 2009-03-11 22:31:32

essence-of-foo
Member
Registered: 2008-07-12
Posts: 70

Re: Is a hard power off really that bad? Discussion

I'd like to mention http://en.wikipedia.org/wiki/Reisub. This can be used to reboot the machine without pulling the cable.

I haven't used ext4 yet. And I've got no trouble with ext3 so far (a couple of poweroffs because I didn't notice that my laptop's battery was getting empty).

Offline

#19 2009-03-11 22:57:25

Skripka
Member
From: 2X1280X1024
Registered: 2009-02-19
Posts: 555

Re: Is a hard power off really that bad? Discussion

skottish wrote:

I don't want to have nothing but horror stories here about ext4. My workstation has been using it for everything except boot for months and everything performs great. It's completely rock solid.

I can confirm similar behavior here.

Ext4 is speedy...but in the event of improper shutdowns...it is somewhat likely that DE config files will get damaged.  I've seen it every now and again on KDEmod, as well as E17-which seems extra fussy to such things.

Offline

#20 2009-03-11 23:05:53

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Is a hard power off really that bad? Discussion

Now that I can confirm, config files in desktop, for kde4, are getting damaged.


Follow me in: Identi.ca, Twitter, Google+

Offline

#21 2009-03-11 23:28:15

droog
Member
Registered: 2004-11-18
Posts: 877

Re: Is a hard power off really that bad? Discussion

I did a new ext4 install last week and after a few hard shutdowns lost tons of config files, remodeling and wrong breaker got turned off a couple times.
i could still boot with tons of errors but was unusable and not worth trying to fix.
reinstalled with ext3 and all is well again.

I'll wait awhile to use ext4 again.

Offline

#22 2009-03-12 00:17:41

kr0n05931
Member
From: U.S.A.
Registered: 2008-10-17
Posts: 7
Website

Re: Is a hard power off really that bad? Discussion

I myself had to do a hard poweroff a few weeks ago. I had lost the GTK and Fluxbox theme settings, but that was about it.


http://img19.imageshack.us/img19/5572/disclaimert.png

By sending me private messages and e-mails, then you automatically agree to the terms and conditions laid out in the image linked to in my signature.

Offline

#23 2009-03-12 01:16:09

fukawi2
Administrator
From: .vic.au
Registered: 2007-09-28
Posts: 6,113
Website

Re: Is a hard power off really that bad? Discussion

I have never had to reinstall or suffered significant data loss from a hard power off (either forced through lockup, or through power failure).

I've use ext3, JFS and XFS. The worst that's happened is I've lost some recent changes to files on a JFS partition since JFS only journal's meta data, but the files have always been consistent after fsck on boot. Once I've had to boot to single-user to run fsck over a JFS partition, but after that it was fine.

AFAIK, it mainly depends on how long it's been since sync() was last called. Which in theory can be forced using SysReq + S.

However, I've never had RIESUB work for me -- and it probably won't for a lot of people since the default in Arch is to disable it:

$ grep sysrq /etc/sysctl.conf 
# Disable the magic-sysrq key
kernel.sysrq = 0

Offline

#24 2009-03-12 02:33:58

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,028

Re: Is a hard power off really that bad? Discussion

ive lost everything in my / partition due to a hard poweroff while some app was working on the hdd intensively......

now i just sysrq  + REISUB to be on the safe side whenever i need to... if this doesnt work, then doing a hardreset is mandatory....

mind you, this isnt usually the case, in fact, ive got it written on the laptop's case to remember it when needed (frozen system doesnt let you google)

Offline

#25 2009-03-12 03:14:51

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: Is a hard power off really that bad? Discussion

hey, I didn't knew Arch disabled magic sysrq, I just enabled now just in case. big_smile


Follow me in: Identi.ca, Twitter, Google+

Offline

Board footer

Powered by FluxBB