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
Stop the Xsan volume after unmounting it on all Xsan clients and controllers.
Use the cvfsck command to ensure the consistency of the volume and make any necessary repairs before proceeding.
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.
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:
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.
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.
Start and mount the volume.