Author Topic: Bleeding edge Linux users beware (ext4 journal checksumming)  (Read 2333 times)

tyme

  • expat
  • friend
  • Senior Member
  • ***
  • Posts: 1,056
  • Did you know that dolphins are just gay sharks?
    • TFL Library
Bleeding edge Linux users beware (ext4 journal checksumming)
« on: November 03, 2009, 12:56:36 PM »
Ext4 Journal checksumming has been a feature for a while but it's been disabled by default, meaning hardly anyone uses it.  The developers made it default in 2.6.32-rc.  Unfortunately, it is broken, and people have been getting filesystem corruption after a crash or other unclean shutdown (whenever the filesystem journal has corruption).

If you don't understand any of that, this probably does not affect you.

Anyone using ext4 with journal checksumming, including:
 - people with stable kernels who have an ext4 fs mounted with the journal_checksum option
 - people using 2.6.32-rc*

need to IMMEDIATELY disable it.
 - if running 2.6.32-rc, do a controlled reboot into either a) 2.6.31.x or lower, or b) 2.6.32-rc5-git6 or later
 - make sure no ext4 filesystems are mounted with the journal_checksum mount option

And, if you've gone through an unclean reboot since booting 2.6.32-rc[1-5], you need to reboot and force a filesystem check by touching /forcefsck.

Long details:
http://bugzilla.kernel.org/show_bug.cgi?id=14354#c167

There is an additional patch in comment 123 that's not clearly related but still might be a good idea anyway.
« Last Edit: November 03, 2009, 07:24:52 PM by tyme »
Support Range Voting.
End Software Patents

"Four people are dead.  There isn't time to talk to the police."  --Sherlock (BBC)

roo_ster

  • Kakistocracy--It's What's For Dinner.
  • friend
  • Senior Member
  • ***
  • Posts: 21,225
  • Hoist the black flag, and begin slitting throats
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #1 on: November 03, 2009, 01:30:41 PM »
Well, I'll be dipped in apple butter.  Thanks for the heads-up.

Luckily all the linux boxes at work I built are ext3.

My netbook I went with ext2.

Newest distros I have installed are xubuntu 8.10 and CentOS5.1 (RHEL5.1).
Regards,

roo_ster

“Fallacies do not cease to be fallacies because they become fashions.”
----G.K. Chesterton

tyme

  • expat
  • friend
  • Senior Member
  • ***
  • Posts: 1,056
  • Did you know that dolphins are just gay sharks?
    • TFL Library
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #2 on: November 03, 2009, 01:54:27 PM »
Quote
My netbook I went with ext2.

Do you have an fsck fetish or something? :)
Support Range Voting.
End Software Patents

"Four people are dead.  There isn't time to talk to the police."  --Sherlock (BBC)

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,799
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #3 on: November 03, 2009, 02:10:37 PM »
So this is a different problem than the delayed allocation "bug"?
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

tyme

  • expat
  • friend
  • Senior Member
  • ***
  • Posts: 1,056
  • Did you know that dolphins are just gay sharks?
    • TFL Library
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #4 on: November 03, 2009, 03:57:14 PM »
Yes, completely different.  First of all, that one was not a bug.  :)

This one causes not just file corruption (which is expected if the computer crashes or gets the power yanked out without properly shutting down... that's what battery-backed disk controllers are for), but actual filesystem corruption, which can affect other files that weren't even being written to during the crash.
Support Range Voting.
End Software Patents

"Four people are dead.  There isn't time to talk to the police."  --Sherlock (BBC)

RevDisk

  • friend
  • Senior Member
  • ***
  • Posts: 12,633
    • RevDisk.net
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #5 on: November 03, 2009, 04:45:32 PM »
Ext4 Journal checksumming has been a feature for a while but it's been disabled by default, meaning hardly anyone uses it.  The developers made it default in 2.6.32-rc.  Unfortunately, it is broken, and people have been getting filesystem corruption after a crash or other unclean shutdown (whenever the filesystem journal has corruption).
[/quote
Quote
This one causes not just file corruption (which is expected if the computer crashes or gets the power yanked out without properly shutting down... that's what battery-backed disk controllers are for), but actual filesystem corruption, which can affect other files that weren't even being written to during the crash.

Ouch.  Thanks for the heads up.  I'm moreso a fan of ext3 on my sole linux box.  I don't mind living on the bleeding edge on most things.  Switches and file structures?  Not so much.
"Rev, your picture is in my King James Bible, where Paul talks about "inventors of evil."  Yes, I know you'll take that as a compliment."  - Fistful, possibly highest compliment I've ever received.

roo_ster

  • Kakistocracy--It's What's For Dinner.
  • friend
  • Senior Member
  • ***
  • Posts: 21,225
  • Hoist the black flag, and begin slitting throats
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #6 on: November 04, 2009, 10:40:22 AM »
Do you have an fsck fetish or something? :)

SSHD.  I want to minimize writes for performance and longevity's sake.
Regards,

roo_ster

“Fallacies do not cease to be fallacies because they become fashions.”
----G.K. Chesterton

Gewehr98

  • friend
  • Senior Member
  • ***
  • Posts: 11,010
  • Yee-haa!
    • Neural Misfires (Blog)
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #7 on: November 04, 2009, 11:15:39 AM »
Good call. 

I'm waiting for my experimental IDE Flash XP pagefile drive to throw in the towel, but it's still going strong.

Maybe they're getting better at SSD longevity?

I'm seriously tempted to use a SSD drive as primary when I do my Win 7 migration later... 
"Bother", said Pooh, as he chambered another round...

http://neuralmisfires.blogspot.com

"Never squat with your spurs on!"

Nightfall

  • friend
  • Senior Member
  • ***
  • Posts: 916
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #8 on: November 04, 2009, 12:14:40 PM »
Phew, thanks for the heads up tyme. Thankfully I'm already running 2.61.31.
It is difficult if not impossible to reason a person out of a position they did not reason themselves into. - 230RN

tyme

  • expat
  • friend
  • Senior Member
  • ***
  • Posts: 1,056
  • Did you know that dolphins are just gay sharks?
    • TFL Library
Re: Bleeding edge Linux users beware (ext4 journal checksumming)
« Reply #9 on: November 04, 2009, 07:03:56 PM »
SSHD.  I want to minimize writes for performance and longevity's sake.

My undestanding is all the recent SSD firmwares will notice repeated writes to the same areas and spread them out over unused parts of the disk.

In that case, the SSD strategy for wear-leveling is copy-on-write at the hardware level.  It doesn't matter how abusive your filesystem is.  The time required to make an SSD fail is roughly ( (free space) / (average I/O write bandwidth) ) * (rated # of write cycles).

I wonder which is worse, journals vs not using noatime.
Support Range Voting.
End Software Patents

"Four people are dead.  There isn't time to talk to the police."  --Sherlock (BBC)