This article has been archived and is no longer updated by Apple.

Xsan: How to adjust the journal size

Learn how to adjust an Xsan volume's journal size.

Prior to Xsan 2.2, new Xsan volumes were created with a default journal size of 16 megabytes. While appropriate for many Xsan volumes, this journal size may be insufficient for volumes with larger block sizes. Generally, the journal size should be at least 1024 times larger than the block size. When the journal is too small, performance of metadata operations can be decreased. In extreme cases, a journal that is too small can result in a volume that can start but cannot be mounted.

Changing the journal size can be done without reinitializing the volume. You should first back up your Xsan configuration on your metadata controllers, back up any data, and test the changes in a test environment before implementing them in a production environment.

How To Change the Journal Size

  1. Stop the Xsan volume after unmounting it on all Xsan clients and controllers.

  2. Use the cvfsck command to ensure the consistency of the volume and make any necessary repairs before proceeding.

  3. Locate the Xsan volume's configuration file on the metadata controllers. On metadata controllers running OS X Lion v10.7 and newer, it will be located at /Library/Preferences/Xsan/VolumeName.cfg. On Mac OS X v10.6 metadata controllers, it will be located at /Library/Filesystems/Xsan/config/VolumeName.cfg.

  4. Using these guidelines, edit the volume configuration file to adjust the JournalSize parameter. Select a new journal size based on the volume's filesystem block size (FsBlockSize):

    FsBlockSize

    JournalSize

    4K, 8K, or 16K

    16M

    32K

    32M

    64K

    64M

    128K

    128M

    256K

    256M

    512K

    512M

    For example, an Xsan volume with filesystem block size of 64K and a journal of 16M will have these two lines in the global section of its configuration file:

    FsBlockSize 64K

    JournalSize 16M

    To change the journal size to the recommended size of 64M, update the value on the JournalSize line as shown here:

    JournalSize 64M

  5. Repeat the volume configuration file changes on all other metadata controllers that control the volume. The volume configuration file must be the same on all controllers.

  6. Execute this Terminal command from the primary controller to update the journal size:

    sudo cvupdatefs VolumeName

    You should see output like this:

    The following changes have been detected in the configuration Please review these changes carefully. Stripe Group Name Stripe Status MetaData Journal ================= ============= ======== ======= MetadataAndJourna No Change No Change Resize Data No Change This will modify the file system "VolumeName". Are you sure you want to continue? [y/N] y Attempting to acquire arbitration block... successful. Flushing journal entries... done Freeing old journal space... Allocating new journal space... Flushing buffers... Updating ICB information... Updating SuperBlock information... *Warning*: File system 'VolumeName' was modified.

  7. Start and mount the volume.

Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance, or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Contact the vendor for additional information.

Published Date: