Why I suddenly dislike ext4

wishblade

Senior Member
Joined
Jan 14, 2009
Messages
635
Reaction score
1
Location
not quite sure yet...
Well, i always seem to have the worst case scenario occur - I tend to think Murphy is out to get me... :D

Anyway, here's the situation - electricity went out at work, laptop battery, being the frail thing it is, didn't last that long, and suddenly switch off after a short period of time. So, as accustomed to this type of situation, I at least saved my open docs (which by the way I've been working on the whole week) just after the power went out... So what's the problem?

Hmmm... powers back up, I boot up, and try to open up the documents... but what's that - the document shows 0 bytes. WTF??? And that's when I realize that ext4 just screwed me over with its 'delayed allocation feature'... or some stupid feature like that. So now I'm left attempting to recover the files, with tears in my sad eyes at the thought of having to work over the weekend to re-type all the data...

Here's an article that I found that describes my situation (note that the resolution doesn't really help much)...
http://www.symantec.com/connect/blo...ow-recovery-lost-files-ext4-file-system-linux

Anyway, no point in the above article... had to express some sort of anger/frustation at the stupidity of the ext4 filesystem...
 
I think there is a way to eliminate the delayed write feature. Came across it a few days ago but forgot got where.
 
I understand all the paranoia about EXT4 but I've had no more problems with it than what I've had with EXT2 or EXT3.

But then again, everything that is important to me lives in remote hosted Subversion repos, online email or DropBox. Had a PC or three die on me to learn the hard way.
 
Hmmm... lately the worst case happens to me at the worst possible moment - would've thought I'd have learnt by now :D Perhaps all current activities should be backed up now on a daily basis instead of weekly. Might have some bearing on future recovery.

Speaking of recovery though, I've managed to recover my files - full intact copies of them. So if anyone wants a recommendation, R-Linux is my current favorite recovery software :)

Anyway, I'm not too paranoid about ext4 - haven't had problems with it before today... although then again I was blissfully unaware of the delayed write 'feature'... Looks like a quick guide is in order to turn it off... now I hope I just don't break something else while fixing that... :)
 
This has been a registered bug with Ubuntu for some time now. The ext4 developers have also been critical of the Canonical implementation of file system. The effects of the bug can go deeper than just losing the data in one file, and can result in file system corruption. I saw a recent example of this on an Ubuntu 9.10 system, where a number of files were affected. These could be opened using the OS under which the file system resided and could also be written to a backup device. They could not however be accessed by another OS. Only some of the files were affected in this way. It would be a good idea to check if Windows or OSX can open all your critical backup files.

Ultimately Ubuntu is an experimental system and should not be used for applications where your data is important to you. Something like one of the RedHat re-spins would be more appropriate in this case.
 
Ubuntu strikes again. I commented a while back on not trusting ext4 after reading about people on ubuntu forums suffering data loss. I thought this was indicative of ext4 as a whole and not just ubuntu. I recently switched to ext4 though but don't use ubuntu so will wait and see.
 
I've been using ext4 since ubuntu 10.04 and so far no problems at all.

Not sure if I agree with the comment about ubuntu being an experimental system though.
 
I've been using ext4 since ubuntu 10.04 and so far no problems at all.

Not sure if I agree with the comment about ubuntu being an experimental system though.

+1

I've been using it since 9.10 and I haven't had a problem yet?
 
I wonder if this has anything to do with my missing 50GBs of data :D
 
I'm under the impression that delayed allocation issues have been resolved in the latest build, I'm using Ubuntu 10.04, and I've hard-resetted the system a couple times, everything seems fine...

I know a 'patch' was written, although there a long story about it and how this behaviour relates to ext3. Anyway, no need to get into boring details... :)
I've also performed a hard reset a couple of times and haven't lost anything, which was why my frail heart dropped when i actually did. And I was working on Ubuntu 10.04, which was a clean install (no upgrades), and is fully updated.

See, I can give the exact steps that I performed when i lost my docs, but it doesn't matter anymore.no need to :D Besides, apart from this little issue, I've not experienced anything else generally wrong with ext4, so I'm just notching it up as experience...
 
Anyone see any benefits of ext4 over the other file systems on their systems?
 
Eish that's scary, another reason why I dislike Linux as a serious office desktop environment. I've had system crashes and flat batteries, each time I've been able to recover the document with Office's built in recovery tool.
 
Yep. Ran into the same issue. Thankfully just lost a few config files. I just don't get why they don't fix it (The bandaid fix doesn't count). I know it would mean giving up a lot of the ext4 advantages over ext3, but jeeze a fast unreliable FS is useless to me.
 
I don't think the idea of sudden power cuts due to unstable supply was at the foremost of thoughts when creating the write delay function. And it does actually have a good purpose, wrt performance. :D Doesn't help when the power suddenly disappears though :D
 
A lot has been written on this bug by Ted Ts’o, one of the Linux kernel developers. The following links have some interesting reading:

- Comment 45 for bug 317781 <https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/45>
- Ext4 data loss bug report <https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781>
- Delayed allocation and the zero-length file problem <http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/>

A patch has been put in kernel 2.6.30 to reduce the problem when an existing file is replaced with an updated version. This does not however solve the problem with new files that are being written. Ts’o states that the problem here is on the side of the applications, where developers were wrote for ext3 and need to rewrite their software for ext4. This will normally involve the proper use of fsync() and fdatasync().

He seems to enjoy bashing Ubuntu, which he says is noticeable for this bug due to the unreliability of the proprietary drivers used. Then he adds: “I use bleeding edge kernels, and I don’t see the kind of unreliability that apparently at least some Ubuntu users are seeing, which came as quite a surprise to me.” – There should be some interesting comments on that one.

One potential solution that is mentioned is to use the nodelalloc mount option, as suggested earlier by WildPikachu. There is some more discussion on this option at <http://ubuntuforums.org/showthread.php?t=1115098&page=3> . This option apparently comes with a performance hit.
 
Top
Sign up to the MyBroadband newsletter
X