Languages

Archived - Mac OS X Server 10.2: How To Journal a Volume or Repair a Journaled Volume

Mac OS X Server 10.2.2 introduces a file system feature known as journaling. This feature helps protect the file system against unforeseen failures in server components or power outages, reducing the need for repairs. You may journal a volume or disable journaling using either Disk Utility or command-line tools.
This article has been archived and is no longer updated by Apple.
Note: If you need a general description of what journaling is, see technical document 107249, "Mac OS X: About File System Journaling".

Using Disk Utility

Using Disk Utility, you may journal a volume with or without erasing it.

To journal a volume without erasing it:
    1. Log in as an Admin user to the server whose volume you want to set up for journaling.
    2. Make sure that no one is using the server.
    3. Open Disk Utility (/Applications/Utilities/).
    4. Select the disk you want to work with in the column on the left.
    5. Click the First Aid tab.
    6. Click Verify Disk to make sure it is free from errors before conducting step 6.
    7. Click the Information tab.
    8. Click Make Journaled.

To journal a volume while erasing it:

Important: Make sure that you back up all important data on the volume before erasing the it. All data not backed up will be lost after this procedure.
    1. Log in as an Admin user to the server whose volume you want to set up for journaling.
    2. Make sure that no one is using the server.
    3. Open Disk Utility (/Applications/Utilities/).
    4. Select the disk you want to work with in the column on the left.
    5. Click the Erase tab.
    6. Choose "Mac OS Extended (Journaled)" from the pop-up menu.
    7. Type a name for the disk in the Name field.
    8. Click Erase.

To disable journaling:

You can use the Disk Utility application to disable journaling.
    1. Log in as an Admin user to the server whose volume you want to set up for journaling.
    2. Make sure that no one is using the server.
    3. Open Disk Utility (/Applications/Utilities/).
    4. Select the disk you want to work with in the column on the left.
    5. Click the Information tab.
    6. Click Remove Journaling.

Repairing the journaled volume:

You may use Disk Utility to verify or repair a journaled volume as with any other compatible volume.

Using command-line tools

At the command line, you journal a volume with or without erasing it, as noted in Step 5. This choice decides whether you use the diskutil or new_hfs command.
    1. Log in as an Admin user to the server whose volume you want to set up for journaling.

    2. Make sure that no one is using the server.

    3. Open Terminal (/Applications/Utilities/).

    4. Type: mount

    5. Press Return. A list of volumes that are available to the file system appears. Look for the volume that is at the root level "/". This is the server's startup volume, for example: "/dev/disk0s11".

    6. Run fsck_hfs with the -f and -n flags to make sure the disk is free from errors. For example, to verify /dev/disk0s11, you would execute:

    sudo fsck_hfs -f -n /dev/disk0s11

    7. If you want to convert a disk to a journaled volume without erasing it, continue to Step 8. If you want to erase the volume and then format it with journaling, skip to Step 9.

    8. Run diskutil using the enableJournal option, and identify the volume you want to convert. To enable journaling for the root volume, for example, you would execute:

    sudo /usr/sbin/diskutil enableJournal /

    To enable journaling for a volume called MyDisk, you would execute:

    sudo /usr/sbin/diskutil enableJournal /Volumes/MyDisk

    Stop here. Do not continue to Step 9.

    9. Make sure that you back up all important data on the volume before erasing the disk. All data not backed up will be lost in this step. Use the -J flag with newfs_hfs. For example, to make a journaled volume named "Foo" on device /dev/disk0s11, you would execute:

    newfs_hfs -J -v Foo /dev/disk0s11


Disabling journaling via diskutil

You can disable journaling from the Terminal application by using diskutil. Follow these steps:
    1. Log in as an Admin user to the server whose disk you want to set up for journaling.
    2. Make sure that no one is using the server.
    3. Open Terminal (/Applications/Utilities/).
    4. Execute the diskutil command, using the disableJournal option and identifying the volume for which you want journaling disabled. To disable journaling for the root volume, for example, you would execute:

    sudo /usr/sbin/diskutil disableJournal /

    To disable journaling for a volume called MyDisk, you would execute:

    sudo /usr/sbin/diskutil disableJournal /Volumes/MyDisk

Repairing a journaled volume

You can check and repair a journaled volume using fsck_hfs from the command line. To repair a journaled disk:
    1. Log in as an Admin user to the server whose disk you want to set up for journaling.
    2. Make sure that no one is using the server.
    3. Open Terminal (/Applications/Utilities/).
    4. Execute the fsck_hfs command using the -f flag. For example, to force checking a journaled volume on device /dev/disk0s11, execute:

    fsck_hfs -f /dev/disk0s11
Last Modified: Feb 17, 2012
  • Last Modified: Feb 17, 2012
  • Article: TA21053
  • Views:

    6677

Additional Product Support Information