0

Can someone explain to me the ramifications of this? CentOS 6.3 with httpd 2.15, with one mod perl site and one php site. Someone pulled the power cord right out. I heard from one person that the journal will take care of everything when it comes back up. Is it that simple? Can someone explain in details the ramifications of this event, given the system I described?

Luckily the DB is on a different box!

2 Answers2

2

The journal should make sure the file system is in a consistent state. That does not "take care of everything", it just means that you don't have half written files on your disk. When you boot back up anything the journal can't confirm as written to disk will be removed.

Beyond that it's about how the apps are written, EXT4 journal works for file system operations.

TheFiddlerWins
  • 2,999
  • 1
  • 15
  • 22
  • + It depends on `dirty` memory pages at at that moment and how disk cache is filled if it's in write-back mode. – GioMac Sep 13 '13 at 15:38
1

It should be fine. EXT4 will keep the filesystem in a consistent state. If any of your files were in the process of being modified, they could be corrupted, but otherwise everything should be fine. In particular, other files on the filesystem that weren't being modified should be fine, due to EXT4's i/o barriers. See https://serverfault.com/a/391327/81387 for example.

Brian Minton
  • 266
  • 7
  • 15
  • 1
    This is not 100% accurate. If the web app is in the middle of transaction that is on another system you could still be in an inconsistent state - i.e. if you are pushing data to SQL when the system goes down. EXT4 only saves stuff that uses the file system, not stuff that's memory resident or being accessed over the network. – TheFiddlerWins Sep 16 '13 at 15:51