You are not logged in.

#1 2010-05-18 19:07:40

suilenroc
Member
Registered: 2008-08-18
Posts: 23

Protecting my system from sudden power outages. How?

So here's my problem - I've recently installed Arch on an old laptop, and the battery no longer works. So, I'm stuck with using the AC power cord if I ever want to use it. That wouldn't be a problem, except that the power cord is very loose, and, unless I'm careful, is prone to falling out at the slightest provocation. Is there any way that I can harden my system so that it is less susceptible to data loss from such a situation? It's happened twice so far, and each time my filesystems have been able to recover, but I'd rather not take the chance.

Thanks in advance!

Offline

#2 2010-05-18 19:33:31

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Protecting my system from sudden power outages. How?

I'm in the same boat with my laptop due to poor engineering on Dell's part.
afaik, the reiserFS is more stable in crashes, but any journaled filesystem will be beneficial in this case.  just make sure you keep pounding that save button and making regular backups.  and on a more hackworthy note, try taping the power cord to your laptop to prevent it from disconnecting.


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#3 2010-05-18 19:51:56

suilenroc
Member
Registered: 2008-08-18
Posts: 23

Re: Protecting my system from sudden power outages. How?

I'm currently using Ext2 on my root filesystem. For some reason, Ext4 would refuse to complete the installation. How much of a performance difference is there between the EXT3/4 filesystems and reiserFS?

Offline

#4 2010-05-18 20:31:53

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

Re: Protecting my system from sudden power outages. How?

I doubt you would notice a performance decrease using ext3 instead of ext2 and you will definitely notice that running fsck goes much quicker.  Also, you don't need to reinstall, all you have to do is run "tune2fs -j" on your ext2 partitions and you convert them into ext3 (which is really just ext2 w/ a journal) partitions.

Offline

#5 2010-05-18 20:43:21

suilenroc
Member
Registered: 2008-08-18
Posts: 23

Re: Protecting my system from sudden power outages. How?

Thanks very much! I'm trying a Gentoo installation right now, just for shits-n-giggles, but if it doesn't work out, I'll return to Arch and use these recommendations.

Offline

#6 2010-05-18 21:20:36

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Protecting my system from sudden power outages. How?

Can't you just buy a new battery? If i wanted to have a very stable filesystem I'd choose ext3.


no place like /home
github

Offline

#7 2010-05-18 21:34:36

suilenroc
Member
Registered: 2008-08-18
Posts: 23

Re: Protecting my system from sudden power outages. How?

I'd buy a new battery, but this is just something to do for fun. It was my grandmother's laptop. Her XP install was corrupted somehow, so she got a new computer and left this one with me.

Offline

#8 2010-05-18 22:55:57

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Protecting my system from sudden power outages. How?

If it's an old laptop, buying a new battery usually isn't worth it at all. Rigging some getho hw fix for the lose power connector would imo be better.

A piece of wood or plastic, some velcro and some glue can probably fix it smile

I did something like that on an old laptop at work, worked wounderfull.

I took a piece of wood, carved out a slot for the plug, and glued the plug in it. Then glued some velcro on the laptop and on the wood, so that when the plug was inserted, the velcro held it all in place.

Last edited by Mr.Elendig (2010-05-18 22:59:35)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2010-05-18 23:01:36

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Protecting my system from sudden power outages. How?

The glue gun: solution to all your wobbly woes smile

I'd also recommend not using Gnome, documented problems with config files zero-ing out on hard power loss.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#10 2010-05-18 23:21:58

suilenroc
Member
Registered: 2008-08-18
Posts: 23

Re: Protecting my system from sudden power outages. How?

Oh really? I was unaware of the problems with Gnome. I may install XFCE instead, it's a damn slow machine. (256 MB RAM, 1.6Ghz Sempron processor, 64MB V-RAM). I'm not even sure what I'm going to do with it, so I'm building a blank canvas to build upon later when I get a good idea.

Offline

#11 2010-05-19 05:18:10

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Protecting my system from sudden power outages. How?

As I understand it, the problem with Gnome is that it assumes that it can keep small files open without flushing, and that flushing would be done by the filesystem. Which is done in ext2/3, but not in ext4.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#12 2010-05-19 14:51:31

whitethorn
Member
Registered: 2010-05-02
Posts: 153

Re: Protecting my system from sudden power outages. How?

I'm not sure but I think I remember reading somewhere about some options (kernel flags) you can add to your /boot/grub/menu.lst which will force data to be written to the HD rather than cached for a while.  That should also help against sudden power outs.

Offline

#13 2010-05-20 15:04:11

while
Member
Registered: 2010-05-14
Posts: 35

Re: Protecting my system from sudden power outages. How?

suilenroc wrote:

I'm currently using Ext2 on my root filesystem. For some reason, Ext4 would refuse to complete the installation. How much of a performance difference is there between the EXT3/4 filesystems and reiserFS?

ext2 isn't a good option really since it's not journaled. Convert it to ext3 as recommended by pseudonomous.

Regarding performance ext4 is a bit faster than ext3, can handle larger disks and deeper folder structure. You can convert ext2 directly to ext4 if you want

tune2fs –O dir_index,uninit_bg,has_journal /dev/<partition>
e2fsck –pf /dev/<partition>

should do the trick.

ReiserFS is not faster all round but if you handle a lot of small files the performace is awesome. I don't think it's as failsafe though so ext4 would probably be a better choice.

Offline

Board footer

Powered by FluxBB