50

Managing Disk Journaling

Checking to See if Journaling is Enabled

You can use the mount command to see if journaling is enable on a volume.

To see if journaling is enabled:

$ mount

Look for journaled in the attributes in parentheses following a volume. For example:

/dev/disk0s9 on / (local, journaled)

Turning on Journaling for an Existing Volume

You can use the diskutil command to enable journaling on a volume without affecting existing files on the volume.

Important: Always check the volume for disk errors using the fsck_hfs command before you turn on journaling.

To enable journaling:

$ diskutil enableJournal volume

ParameterDescription

volume

The volume name or device name of the volume.

Example

$ mount

/dev/disk0s9 on / (local, journaled) /dev/disk0s10 on /Volumes/OS 9.2.2 (local) $ sudo fsck_hfs /dev/disk0s10/

**/dev/rdisk0s10

**Checking HFS plus volume.

**Checking extents overflow file.

**Checking Catalog file.

**Checking Catalog hierarchy.

**Checking volume bitmap.

**Checking volume information.

**The volume OS 9.2.2 appears to be OK. $ diskutil enableJournal /dev/disk0s10 Allocated 8192K for journal file.

Journaling has been enabled on /dev/disk0s10 $ mount

/dev/disk0s9 on / (local, journaled)

/dev/disk0s10 on /Volumes/OS 9.2.2 (local, journaled)

Chapter 6 Working With Disks and Volumes

Page 50
Image 50
Apple oxs Managing Disk Journaling, Checking to See if Journaling is Enabled, Turning on Journaling for an Existing Volume