LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-12-2007, 01:36 PM   #1
milescook
Member
 
Registered: Jun 2003
Posts: 54

Rep: Reputation: 15
General strategies to deal with hard disk corruption after PC crash in Linux


One thing that annoys me with linux, is if ever my computer crashes, I can never (in any distro) recover and always have to reinstall because of a corrupt journal. Am I using the wrong file system? (ext3).

Thanks
 
Old 02-12-2007, 05:40 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You aren't using the "wrong" file system exactly. EXT3 does have a journal. But perhaps you aren't using the best file system for the job, no.

I have always used ReiserFS on my machines, and have been able to recover at least partially from any sort of system failure I have had in the past. I have even managed to recover most of my documents from a HDD that got scrambled from a crazy IDE controller.

Since using ReiserFS I have never had problems with the file systems being corrupted just from being shut down improperly, which I can't say for EXT2 or EXT3.
 
Old 02-12-2007, 05:46 PM   #3
milescook
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks for your reply, I will try reiserfs then.

It's so damn annoying I love linux, but I haven't got enough know how to babysit corrupted harddrives because it just hates crashes. I also can't recommend it to clients yet either for the same reason! Do people recommend not using ext3, why is it default for installs? After a simple crash, with a new hard drive, it just hangs on boot. fsck says bad block or something, and presumably can't fix it withoug my help. (I've since formatted anyway).

It's crazy, unless I'm missing something obvious (other than use a more reliable fs).
 
Old 02-12-2007, 05:54 PM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
EXT3 is used as the default for many distributions simply because it is the "standard". It has been around for a long time, it is supported by almost anything, and it is simple. It is also very reliable, assuming nothing goes wrong, like the file system being unmounted properly, a bad HDD, etc.

More exotic file systems, like ReiserFS or XFS, are newer technologies and require specific configuration and management software. Even so, a number of distributions now offer ReiserFS as one of the choices on install, though I don't think any of them actually use it as the default yet.
 
Old 02-12-2007, 06:00 PM   #5
milescook
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by MS3FGX
EXT3....and it is simple. It is also very reliable, assuming nothing goes wrong, like the file system being unmounted properly, a bad HDD, etc.
And also a system crash?
 
Old 02-12-2007, 06:26 PM   #6
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
By "crash" I assume you are meaning the system has frozen to the point it has to be powered off without being properly shutdown.

In this case, the problem is that the file systems will not be unmounted properly, leading to possible corruption. The system will attempt to check and repair the file systems once it has restarted and realized what happened, but as you have seen, that does not always go well.
 
Old 02-12-2007, 07:33 PM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by MS3FGX
More exotic file systems, like ReiserFS or XFS, are newer technologies and require specific configuration and management software. Even so, a number of distributions now offer ReiserFS as one of the choices on install, though I don't think any of them actually use it as the default yet.
@milescook

Lots of people, myself included, think Reiserfs is a junk filesystem and ext3 is one of most reliable filesystems. If your computer crashes alot then something is wrong. Just switching filesystems is unlikely to help.
I'm not saying MS3FGX is wrong. Just wanted to let you know there are different opinions on this matter.
 
Old 02-13-2007, 04:14 AM   #8
milescook
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Greatfuly recieved. So lets look at a common scenario for me:

I have just made a fresh install of linux, it's in the desktop, and I have a power cut. When it reboots, it won't pass the file system check. So after hours pouring over manuals for fsck, I try the recommended commands, fsck tells me to go fish.

On my other box, I would press CTRL+ALT+SYSREQ+E and the task would terminate, alowwing me to go to a shell. If then I ask the pc to reboot it reboots fine! (???), albeit with some hard disk corruption, and more and more services failing to start the more it happens.

So why can't ext3 just fix itself like ntfs, and let me get on with life?

Please note I mean all this in good humour, as I admire linux (installing Mandriva 2007 free now) and want to get to grips with this last annoying trait!

Last edited by milescook; 02-13-2007 at 04:23 AM.
 
Old 02-13-2007, 06:05 AM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I have no experience with Mandriva. If computer is shut down partitions are umounted and this is written to the disk - it's called "dirty bit is unset". Now, if power is cut this bit is not unset signaling partition needs checking. Once this dirty bit is unset partition is not checked any more despite it may still have problems. All distros I have execute filesystem check/repair automatically when dirty bit is set. So normally "ext3 fixes itself". It's weird Mandriva seems not to do this. If you have often power cut you may try using the sync option in fstab, it should reduce risk of corruption.
 
Old 02-13-2007, 06:37 AM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Ext3 Tips

--
10 characters to satisfy 10 characters requirement.
 
Old 02-13-2007, 06:42 AM   #11
milescook
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Hmm those ext3 tips look good, though I haven't read them throuroughly yet. Why aren't these implemented by distro suppliers themselves?!?!

If Linux is supposed to seriously challenge Windows, come on!
 
Old 02-13-2007, 07:05 AM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by milescook
Hmm those ext3 tips look good, though I haven't read them throuroughly yet. Why aren't these implemented by distro suppliers themselves?!?!
Good question, I think some distros use some of those tweaks.
Quote:
If Linux is supposed to seriously challenge Windows, come on!
Is Linux supposed to do that? AFAIK this is not what Linux people are worried about, seems to be a concern for Windows folks though.
 
Old 02-13-2007, 07:11 AM   #13
milescook
Member
 
Registered: Jun 2003
Posts: 54

Original Poster
Rep: Reputation: 15
Yes, but personally I do want Linux to be as easy as Windows, because the mass population deserve a better OS. If Linux stays the play toy of the techies, that won't happen.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Linux from corruption after crash mhamro Linux - Software 7 12-18-2006 08:57 AM
Hard disk crash jacob_don Linux - Hardware 1 12-14-2006 02:22 PM
My hard disk is going to crash!! soheyl General 9 07-21-2005 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration