You are not logged in.

#26 2009-03-12 03:42:48

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

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

Offline

#27 2009-03-12 03:57:46

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

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

Certainly isn't bad with Live systems like FaunOS.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#28 2009-03-12 09:51:30

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

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

fukawi2 wrote:

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

Argh, this is silly. Why would anyone want to disable this? This is as crazy as disabling the ctrl+alt+backspace shortcut.
If you don't need it, you just don't press the keys, it's not like you are ever going to press these keys by mistake.
I really cannot see one single advantage, even tiny, by doing this.

Well, I did a quick google just in case : http://en.wikipedia.org/wiki/Magic_SysRq_key
It mentions that the security aspect is debatable.

It also mentions that the commands are in qwerty. If you are not using qwerty or azerty, could this be why riesub never worked for you?

Finally, this setting in arch has apparently been there since sysctl.conf was introduced, 3,5 years ago :
http://repos.archlinux.org/viewvc.cgi/c … e&view=log


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

Offline

#29 2009-03-12 10:39:06

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

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

I've had to hard power off my laptop a few times, and I haven't noticed anything damaged yet. Running ext4 here.

When I was little and started with Linux, my dad told me that it was more dangerous to hard power off a Linux system than Windows. He never explained why, but it's been in my subconsciousness mind since then. Pretty funny, since my dad doesn't know much about Linux, and I haven't bothered to check whether it's true or not (after all, I haven't had to press that reset button very much since I switched to Linux. Well, before hotplugging in Xorg was introduced...).

Offline

#30 2009-03-12 13:36:55

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

kensai wrote:

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

Yeah, it's enabled in the stock kernel config, but then disabled in /etc/sysctl.conf, which is probably a pretty good default setup since it gives the user easy control over it.


Donate to Arch!

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

Offline

#31 2009-03-12 13:44:29

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

shining wrote:
fukawi2 wrote:

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

Argh, this is silly. Why would anyone want to disable this? This is as crazy as disabling the ctrl+alt+backspace shortcut.
If you don't need it, you just don't press the keys, it's not like you are ever going to press these keys by mistake.
I really cannot see one single advantage, even tiny, by doing this.

I guess the security aspect would apply mainly with a public machine or part of a network, as at a university or something.

And, as for someone "accidentally" hitting the Alt-SysRQ key combination, I can remember when I first learned about switching consoles in Linux I was trying all sort of bizzaro key combinations. I could easily have done an inadvertent power down. My experience with computers -- or, rather, with computer users, including myself -- has been that, just because something is unlikely to happen or has no good reason to happen doesn't at all mean it won't happen.

Last edited by dhave (2009-03-12 13:46:02)


Donate to Arch!

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

Offline

#32 2009-03-12 19:42:16

Sander Hoksbergen
Member
Registered: 2009-01-06
Posts: 32

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

Thank god I don't hard power every single day =\
I'll remember this next time I write a program with HD access.

Last edited by Sander Hoksbergen (2009-03-12 19:43:05)

Offline

#33 2009-03-12 19:45:21

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

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

I've hard powered off a few time, no damage what so ever!


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#34 2009-03-12 19:50:39

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

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

an interesting post about this issue: http://thunk.org/tytso/blog/2009/03/12/ … e-problem/


Give what you have. To someone, it may be better than you dare to think.

Offline

#35 2009-03-13 05:14:49

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

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

wonder wrote:

an interesting post about this issue: http://thunk.org/tytso/blog/2009/03/12/ … e-problem/

This is a brilliant find. It explains everything in one page.

Offline

#36 2009-03-13 08:36:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

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

I've lost count of how many times my laptop's run out of battery and powered off. It's a lot though. More common these days as the battery life is <20 minutes and I try to get things done quickly before it goes...

I've never had any loss or issues, I primarily use ext3.

Offline

#37 2009-03-13 13:49:24

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

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

I'm going to make a new Arch install this weekend, I guess I'll go with ext3 then...

I've got some questions ,though:
1. In the wiki page about laptops there is a tip about setting 'vm.dirty_writeback_centisecs=1500'. Is this related to how the delayed allocation works? How changing this value would decrease the risks of using ext4?

2. What if I mount the ext4 filesystems with 'nodelalloc' option? It probably would decrease the risks of losing a file, but it would decrease the FS performance. Is it still worth to use ext4 with nodelalloc (so I would have extents and maybe other pros over ext3) or is it better to just use ext3?


(lambda ())

Offline

#38 2009-03-13 15:06:36

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

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

andre.ramaciotti wrote:

2. What if I mount the ext4 filesystems with 'nodelalloc' option? It probably would decrease the risks of losing a file, but it would decrease the FS performance. Is it still worth to use ext4 with nodelalloc (so I would have extents and maybe other pros over ext3) or is it better to just use ext3?

From what the author said in that link above, it will decrease ext4 performance, but it should still be quicker than ext3. The computers that I have out in the wild will get this option enabled as soon as I get them back. My workstation won't for the simple reason that it's virtually crash free and has been for many, many months.

Offline

#39 2009-03-14 05:23:51

SyXbiT
Member
From: Seattle, WA
Registered: 2008-06-28
Posts: 177
Website

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

I had my machine hard crash, and destroy my ext4 partition. (grub wouldn't even load)
thanks theodore......j/k
i fixed it by booting into the liveCD and running 'fsck.ext4 -y /dev/sda2'
thank goodness

also, I didin't know Arch had disabled sysrq
good to know

Offline

#40 2009-03-14 12:21:33

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

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

Just for the record, I installed Arch in an ext4 partition with 'nodelalloc' in fstab and I had no problems, even after 3 hard crashes.

I won't say anything about performance because this PC is way faster than my older one.


(lambda ())

Offline

#41 2009-03-15 21:45:23

scottuss
Member
From: England
Registered: 2009-02-20
Posts: 77

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

I'm using ext4 and have had no issues with hard power down yet.. I don't think. My /etc/rc.sysinit has a line that I've changed in it and after a hard powerdown that was gone. BUT I had also done a pacman -Syu and there were lots of updates, perhaps that could be the reason? Either way it's nothing major.

Offline

#42 2009-03-18 13:31:14

sokuban
Member
Registered: 2006-11-11
Posts: 412

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

I found an interesting piece of information:

Ranguvar wrote:

All info on performance tricks, etc. can be found in the ext4.txt file in the Documentation folder in the kernel sources.

http://git.kernel.org/?p=linux/kernel/g … xt;hb=HEAD

ext4 is a stable, solid FS that has been in the kernel for two years or so now, even though it's only recently been marked stable.

As for the data loss, it's not a bug. Here's the lowdown. See, *most* filesystems behave in such a way that data is comitted to disk, practically guaranteed, in a very short amount of time. XFS, ext4, and Btrfs all perform delayed allocation in order to be faster. Apps that have been written according to the POSIX standard will be fine with ext4 and those other filesystems. Some apps, however, are written in such a way that if there is a sudden power loss (if the ext4 filesystem suddenly dies), data might be truncated, usually to 0. This is a bug in the _apps_ - the standard makes no guarantee that the filesystem works like ext2/3, ReiserFS, JFS, etc. But since there's a good number of buggy apps, Tso is working on some ugly hacks to make this scenario less likely. What you can do right now is add the 'nodealloc' mount option to your fstab. This will disable delayed allocation. Boom, no more 'bug'. Lower speeds, but still faster than ext3. Kernel 2.6.30 will likely have more efficient hacks that can let you have partial delayed allocation.

Durr. Just read that you have a UPS. So, you're good, most likely big_smile

Although, I would only really recommend ext4 if you have particular need of its features - fast fsck, fair performance increase (you likely will not notice it outright), barriers (makes data even less likely to go *poof*, but there can be big performance losses, and cannot be used with device-mapper (LVM, LUKS)), file # limit, etc., OR if you are planning on setting up a new /home anyways and want to spare trouble later. If you're already on another FS and would otherwise not need to do any switching or anything, I'd stick with ext3 for maybe a year.

http://bbs.archlinux.org/viewtopic.php?id=67786

I have a laptop, and I'm debating whether to put 'nodealloc' in my fstab or not. I usually use it on AC power, but when I do use it on battery power I don't have any program to inform me/auto shut down. I have only had one unclean shutdown since I installed ext4. (When I tested X and then my mouse/keyboard were locked because of hal I powered off.) After that I enabled sysreq and always used reisub. There was no noticable damage.

I think that putting nodealloc is a good idea, since it is a laptop, and I may run out of batteries without noticing. But my biggest worry is that I'll forget about it by the time 2.6.30 comes and it'll be in my fstab forever possibly degrading performance. (I don't like applying hacks and workarounds in general because I always forget I did it and it causes problems later.)

EDIT: More interesting information:

http://www.h-online.com/open/Ext4-data- … ews/112892

Last edited by sokuban (2009-03-19 22:34:42)

Offline

#43 2009-03-22 03:28:34

dr/owned
Member
Registered: 2009-01-09
Posts: 136

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

Well, when the e-stop button was hit on our server room with hundreds of whirling hdd's around 1-2% of them never worked right again.  That's my little "in general" bit.

Offline

#44 2009-03-22 10:05:34

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

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

In all my life a hard power off never cost me a single byte of data... I've had quite a few so far and I'm talking windows,linux fat,ntfs,ext3...am I the luckiest son of a b**** in the world ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#45 2009-03-22 13:01:59

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

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

There is also a post by certain Mr Garrett: http://mjg59.livejournal.com/108257.html

Offline

#46 2009-03-22 14:17:25

sokuban
Member
Registered: 2006-11-11
Posts: 412

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

moljac024 wrote:

In all my life a hard power off never cost me a single byte of data... I've had quite a few so far and I'm talking windows,linux fat,ntfs,ext3...am I the luckiest son of a b**** in the world ?

Same here. Well kinda; the only time I broke something was when it wasn't my computer. Once at my friend's house I hard powered off when a game froze it, and then windows booted up and wanted to do a hard disk check. I skipped the hard disk check (I always do it on my computer, nothing ever happened, I swear '_') and then his computer just stopped working. He got so mad at me and never tried that game again.

Offline

Board footer

Powered by FluxBB