IBM Support

Increasing the Size of a JFS/JFS2 Log Device

Question & Answer


Question

Increasing the Size of a JFS/JFS2 Log Device

Answer

This document details the supported procedure for increasing the size of a JFS/JFS2 log device of type jfslog or jfs2log. This document applies to all versions of AIX.

Why or when to increase the size of a JFS/JFS2 log device
Procedure
Related documentation

Why or when to increase the size of a JFS/JFS2 log device

Why or when to increase the size of a JFS/JFS2 log device

In general, IBM recommends that JFS/JFS2 log devices be set to either 2 MB for every 1 GB of data or to 1 partition for every 512 partitions of filesystem space used. In some cases, filesystem activity is too heavy or too frequent for the log device. When this occurs, the system will log the following errors:

 LABEL: JFS_LOG_WAIT IDENTIFIER: CF71B5B3
 LABEL: JFS_LOG_WRAP IDENTIFIER: 061675CF

OR

 LABEL: J2_LOG_WAIT IDENTIFIER: CF71B5B3
 LABEL: J2_LOG_WRAP IDENTIFIER: 061675CF

Procedure

Procedure

Use the following procedure as a guide to increase the size of a JFS/JFS2 log device.

  1. Determine which log device to increase. This can be determined by its Device Major/Minor Number in the error log, enter:
     errpt -a
    
    An example output follows:
     Device Major/Minor Number
     000A   0003
    

    The preceding numbers are hexadecimal numbers and must be converted to decimal values. In this example, hexadecimal 000A 0003 equals decimal numbers 10 and 3.

  2. Determine which device corresponds with these Device Major/Minor Numbers, enter:
      ls -al /dev | grep "10, 3"
    

    If the output from the preceding command reveals that the log device that needs to be enlarged is /dev/hd8, (the default log device for rootvg), continue with step 3; otherwise, proceed to the Increasing the size of a user created JFS/JFS2 log device section.

    NOTE: AIX creates the default log device for rootvg on /dev/hd8 at 1 physical partition (PP). IBM recommends that JFS/JFS2 log devices be set to 2 MB for every 1 GB of data to be protected.

  3. Increase the size of /dev/hd8 using the extendlv command as follows:
     extendlv hd8 1
    
  4. Boot the machine into Service Mode (also known as Maintenance Mode).

    1. Select 3: Start Maintenance Mode for System Recovery
    2. Select 1: Access a Root Volume Group
    3. Select 0: Continue
    4. Select the desired rootvg.
    5. Select 2: Access this Volume Group and start a shell before mounting filesystems

    NOTE: For a detailed description on booting in Service Mode, see the technical document "Booting in Service Mode," available at Technical support knowledge base for AIX (http://techsupport.services.ibm.com/server/aix.srchBroker).

  5. Format /dev/hd8 to use all of the space in the logical volume and answer y, to destroy the log, after entering the following command:
      logform /dev/hd8
    

  6. To exit from the shell, enter:
      exit
    
    The primary filesystems will automatically mount.

  7. Shutdown and reboot with the system key in Normal Mode, enter:
     sync; sync; sync; reboot
    

Increasing the size of a user created JFS/JFS2 log device

Increasing the size of a user created JFS/JFS2 log device

  1. Extend the logical volume where the JFS/JFS2 log device resides on with 1 physical partition, enter:
      extendlv <loglvxx> 1
    
    loglvxx is the name of the JFS/JFS2 log device.

  2. Determine which of the mounted filesystems use this log device, enter:
      mount
    

    The log device is indicated in the last column under options.

  3. Unmount these filesystems that use the JFS/JFS2 log device specified in step 2, enter:
      unmount /dev/<lvname>
    

  4. Format the JFS/JFS2 log device to use all of the space in the logical volume and answer y, to destroy the log, after entering the following command:
     logform /dev/<loglvxx>
    

    loglvxx is the name of the JFS/JFS2 log device.

  5. Mount all filesystems you unmounted in step 3, enter:
      mount <lvname>
    

Creating a new JFS/JFS2 log device

Creating a new JFS/JFS2 log logical volume

  1. Create the logical volume to be used as the JFS/JFS2 log device with the jfslog or the jfs2log type, the desirable logname, volume group and number of physical partitions:
      mklv -t jfslog -y <loglvxx> vgname 1
    
    loglvxx is the name of the JFS/JFS2 log device.

    NOTE: Substitute jfs2log instead of jfslog if you are creating a jfslog for a JFS2 file system.

  2. Format the new logical volume as a log device using following command (answer yes to destroy):
      logform /dev/<loglvxx>
    

    loglvxx is the name of the JFS/JFS2 log device.

  3. Unmount any filesystems wanting to use the new JFS/JFS2 log device:
      unmount /dev/<lvname>
    

  4. Update /etc/filesystems and the logical volume control block (lvcb) of the filesystems needing to use the new JFS/JFS2 log device by using the following command:
     chfs -a log=/dev/<loglvxx> /mountpoint
    

    loglvxx is the name of the JFS/JFS2 log device.

  5. Mount filesystems using new JFS/JFS2 log device by using the following:
     mount /dev/<lvname>
    

Related documentation

Related documentation

For more information on jfs2log enhancements, see the "AIX 5L Differences Guide Version 5.2 Edition" (page 239).

For more information on jfslog errors, see the technical document, "About Filesystem Serviceability Enhancements in AIX V4 and V5," available at Technical support knowledge base for AIX (http://techsupport.services.ibm.com/server/aix.srchBroker).

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"File management","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Historical Number

isg1pTechnote0701

Document Information

Modified date:
17 June 2018

UID

isg3T1000398