|
Journaling is a feature of Mac OS X that is intended to protect the integrity of the files stored on your hard disk drives. Using this feature can protect against some of the kinds of file corruption that frequently caused crashes, startup problems, etc., in Mac OS 9. To learn more about journaling, read the excellent article at: http://www.larryjordan.biz/articles/lj_journaling.html The scripts below will turn on (or off) journaling for all connected drives. While these scripts have been tested by me and appear to work fine on OS X 10.3.x and 10.4, I provide them here without warranty or support, just "as is". If they work for you and solve a problem for you, great! If they don't work, cause you to lose data, lose your hair, or anything else, you agree that you assumed all responsibility and liability when you decided to try the script out on your system. The scripts can be executed from the command line or a cron task.
The following script enables journaling on all writable drives. #!/bin/csh # # Enables journaling on all writable drives. # # Updated: October 5, 2004 # By: Mike Salsbury # # echo " " echo This script will enable journaling on all local writable drives. echo " " echo Enter the root/admin password when/if prompted. echo " " cd /Volumes foreach d (*) if (-w "/Volumes/$d/") then echo Enabling journaling on $d... sudo diskutil enableJournal "/Volumes/$d/" else echo "$d is not a writable volume. Journaling cannot be enabled." endif echo " " end echo "Finished. Journaling is now enabled on all local drives."
The following script disables journaling on all drives. While this is not a recommended course of action, you might have your reasons for wanting to do that someday: #!/bin/csh # # Disables journaling on all disk drives (not recommended). # # # Updated: October 5, 2004 # By: mes28 (Mike Salsbury) # # echo " " echo "This script will enable journaling on all drives." echo " " echo "Enter the root/admin password when/if prompted." echo " " cd /Volumes foreach d (*) echo "Disabling journaling on $d..." diskutil disableJournal "/Volumes/$d/" end echo "Finished."
Related Blogs:
Related Links:
|