Journal File System gone bad….

They are damn cool, but if your journal gets corrupted, your fsck’d (haha…*nix geek joke…haha).

The Mac OS uses journals for HFS+, which really can come in handy. But recently, I had do some work on a machine that kernal panic’d every time it tried to boot. Putting the machine in FWTDM and connecting it to my machine didnt work either. My machine would see the device, and even the partitions and layout, but not mount the drive. When looking at my ‘/var/log/system.log’, I found the following…

Jan 30 16:00:50 mymacbookpro kernel[0]: disk1s9: I/O error.
Jan 30 16:00:50 mymacbookpro diskarbitrationd[43]: unable to mount /dev/disk1s9 (status code 0x00000001).
Jan 30 16:00:50 mymacbookpro kernel[0]: jnl: do_jnl_io: strategy err 0x5
Jan 30 16:00:50 mymacbookpro kernel[0]: jnl: open: could not read 512 bytes for the journal header.
Jan 30 16:00:50 mymacbookpro kernel[0]: hfs: late jnl init: failed to open/create the journal (retval 0).
Jan 30 16:00:50 mymacbookpro kernel[0]: disk1s9: I/O error.
Jan 30 16:01:08 mymacbookpro kernel[0]: jnl: open: journal magic is bad (0x0 != 0x4a4e4c78)
Jan 30 16:01:08 mymacbookpro diskarbitrationd[43]: unable to mount /dev/disk1s9 (status code 0x00000001).
Jan 30 16:01:08 mymacbookpro kernel[0]: hfs: late jnl init: failed to open/create the journal (retval 0).
Jan 30 16:01:08 mymacbookpro diskarbitrationd[43]: disk1s9 hfs XXXXXXYYY-1111-12134-A585-123456789034 BootDrive [not mounted]
Jan 30 16:01:08 mymacbookpro kernel[0]: hfs(3): Journal replay fail. Writing lastMountVersion as FSK!

Uh Oh.

Running Disk Utility.app said it would repair the disk, but this never worked. I would try to mount it afterwards and still get the error that my journal was bad. Well, why dont we just tell the OS not to use the journal? Well, that wont work either…you have to be able to MOUNT the drive to get it to work.

Dont waste any more time. Get Disk Warrior. Run it on the volume. It just works. Done.

Listening To: ‘Echoes’ by Pink Floyd

Advertisements

6 thoughts on “Journal File System gone bad….

  1. Hi there

    I found a page with a hack that will disable the journal even when the filesystem isn’t mounted. I know it’s not a problem for you any more, but I think other people finding this page may like to know about it.

    Oskar

  2. I saw this somewhere else – and almost did it….but DiskWarrior worked just as fast. It is a good trick! Id def. do it myself – but i think most others would rather play it safe and have the software do it for you! Thanks for the post though!

  3. Hi —

    I’m the author of that hack — it was used in a circumstance where even DiskWarrior wouldn’t work. Quite extraordinary. Even though we had backups, they were located offsite about 1300 miles away. It was going to take at least a day to make a copy of the backup (don’t want to send our only copy via UPS!) and another day to get up here. So, while in that waiting period, I started hacking around with trying to get the filesystem up and running. From all of the log files, and even the output of DiskWarrior, I could tell that the only problem was the journal. So, that’s what led me to implement my hack.

    Yes, normally, I would say use the normal tools — but, when that fails, you sometimes have to try other measures.

    dennis

  4. Thanks for posting! I was actually going to use that if this didnt work in that instance. I was just happy I didnt have to just then. It is great to know that!

  5. Pingback: Technical Ramblings » Blog Archive » DiskWarrior: Fix for "journal magic is bad"

  6. Pingback: What not to do with your external drive « Jon's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s