Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to safely enable journaling on OS X client System
Here's an easy way to add journaling to your filesystems graphically. To set Journaling, all you do is run the script, put in your admin password and wait for Disk Utility to launch. In Disk Utility, select a Volume or Partition (not the actual Hard Drive) and you'll see that in the Info tab, at the bottom, is a button saying "Make Journaled". Click on it to enable or disable Journaling. After that, quit the Script and it will ask you for your admin password, it is important that you provide it again.

The script posted does the following: first it creates a file called ServerVersion.plist, when this file is present Disk Utility (and a few other apps) will 'think' that they are running on a Mac OS X Server machine instead of an Mac OS X Client and will allow you to enable journaling with one button.

When you quit the script, it will remove said file so Bad ThingsĀ® don't happen to your machine. Basically one thing that could happen if you leave that file there is that Software Update will think you are running Mac OS X Server and will send you the wrong update, potentially hosing your machine.

[Editor's note: There's a good discussion about journaling and the "OS X Server" related issues in this hint -- make sure you're comfortable with what you're doing before you proceed.]

The script will prompt you for your admin password twice, once to create the file, and once to delete it. I included some error checking in case something goes wrong. Here's the script:
with timeout of 600 seconds
do shell script ¬
"touch /System/Library/CoreServices/ServerVersion.plist" with administrator privileges
end timeout
on error
display dialog "You didn't provide your admin password,
script will now exit. No changes made."
end try

tell application "Disk Utility"
end tell

on quit
do shell script ¬
"rm /System/Library/CoreServices/ServerVersion.plist" with administrator privileges
continue quit
on error
display dialog "Couldn't remove the file ServerVersion.plist
because you either did not provide an admin password
or other error. Please check the /System/Library/CoreServices
directory and remove this file if it exists. If you don't
evil things can happen to your machine"
end try
end quit
Note: It is important you compile the script as an Application, and that you set it to "stay open". A compiled script can be downloaded with this link.

The reason you need to compile it as an app is so the "on quit" statement gets called and it deletes the file properly; the reason you need to make it "stay open" is because if this option is not set, as soon as the script finishes, it'll try to delete the file. If you delete the file while Disk Utility is open, it'll take away the "Make Journaled" button immediately.
  • Currently 4.00 / 5
  You rated: 5 / 5 (3 votes cast)

A script to safely enable journaling on OS X client | 7 comments | Create New Account
Click here to return to the 'A script to safely enable journaling on OS X client' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bad Link
Authored by: vertigo on Dec 10, '02 09:59:44AM

The link to the compiled script is goofed. Script can be located at:

[ Reply to This | # ]
Journaling Scripts
Authored by: Squeak on Dec 10, '02 10:40:12AM

This is fine and dandy, but C'mon folks, Do you really
need a gui (especially one that goes away) when one
line in the terminal will do the trick? As a Mac Systems
guru, I firmly advocate that all my OSX users
get, at least, an initial introduction to using terminal.
It's not a big deal.I'm not dissing scripts like this,
it just seems like there's so many "automated" scripts
out there, for gosh sakes...these could be more dangerous than
they appear.

[ Reply to This | # ]
Journaling Scripts
Authored by: mervTormel on Dec 10, '02 01:02:18PM

yep. i think Squeak's right. that's an awful lot of code to debug for achieving the same effect in the shell...

% sudo diskutil enableJournal /volumeRef

[ Reply to This | # ]
Journaling Scripts
Authored by: vonleigh on Dec 11, '02 12:45:45AM

Hey mt,

Reason I got around to doing this, is that I know a lot of people that really don't like the terminal, or are afraid of using it; especially in the ranks of the old macusers. To tell you the truth I think It's nice to be able to say "you don't need to use the terminal for anything".

That I actually enjoy this learning process (and I've come a long way, thanks in part to you and all the great people of the forums), and that I think it's a wonderful tool that everyone would benefit from; doesn't mean that I must impose it on others.

Oh, and one practical application of the script, if you have several partitions this may be a bit easier.


[ Reply to This | # ]
Journaling Scripts
Authored by: Squeak on Dec 11, '02 10:03:54AM

It's no biggie, but no-one should be afraid of CLI.
That being said, yes there are some folks who
shouldn't even have access to the trash.


[ Reply to This | # ]
fsck first
Authored by: jpm on Dec 12, '02 01:13:05AM

just to err on the cautious side, one should really fsck before enabling fs journaling...

% sudo fsck_hfs -f -n <device node>
% sudo /usr/sbin/diskutil enableJournal <mount point>

[ Reply to This | # ]
Next time, I'll download the script...
Authored by: dirkstoop on Dec 06, '03 01:58:53AM


after a really stupid error on my side I spent all night trying to get my OS X 10.3 machine back online (I just wanted to see some of my apps think I was running OS X Server, for the mere coolness of it..). I only just found out I didn't just delete ServerVersion.plist from my CoreServices but also SystemVersion.plist... (sometimes people do type faster than is good for their sanity)

besides the hours of work I had figuring this out, it was really *cool* (ahem..) to see Software Update suggesting I downloaded MacOS X Server 10.3.1 update for a little while... ;-)

anyway, thanks for the hint, I learn't a great deal about the inner workings of the OS and about how important it is to learn to look at ones monitor and type at the same time :-)
see ya,

[ Reply to This | # ]