Creating a file system log on a dedicated disk for a user-defined volume group

A JFS or JFS2 file system log is a formatted list of file system transaction records. The log ensures file system integrity (but not necessarily data integrity) in case the system goes down before the transactions are completed.

A dedicated disk is created on hd8 for rootvg when the system is installed. The following procedure helps you create a JFS log on a separate disk for other volume groups. When you create a JFS2 log, the procedure requires the following changes:
  • The log device type is jfs2log.
  • The logform command requires the -V jfs2 option to specify a JFS2 log device.
  • The crfs commands must specify jfs2 instead of jfs.
Note: There is no requirement for a JFS2 log to be on a separate disk as the file system. The only requirement is that the log devices must be on the same volume group as the file system. In this procedure, the JFS2 log must be on a separate disk for performance improvement.

Creating a file system log file for user-defined volume groups can improve the performance under certain conditions, such as, if you have an NFS server and you want the transactions for this server to be processed without competition from other processes.

You can use the following procedure, which creates a volume group (fsvg1) with two physical volumes (hdisk1 and hdisk2). The file system is on hdisk2 (a 256 MB file system that is mounted at /u/myfs) and the log is on hdisk1. By default, a JFS log size is 4 MB. You can place little-used programs, for example, /blv, on the same physical volume as the log without affecting performance.

To create a JFS log for a user-defined volume group by using the SMIT and the command-line interface, follow these steps:

  1. Add the new volume group (in this example, fsvg1) by using the SMIT fast path:
    smit mkvg
  2. Add a new logical volume to this volume group by using the SMIT fast path:
    smit mklv
  3. On the Add a Logical Volume screen, add your data to the following fields. For example:
    Logical Volumes NAME                     fsvg1log
    
    Number of LOGICAL PARTITIONS             1
    
    PHYSICAL VOLUME names                    hdisk1
    
    Logical volume TYPE                      jfslog
    
    POSITION on Physical Volume              center
  4. After you set the fields, press Enter to accept your changes and exit SMIT.
  5. Type the following command on a command line:
    /usr/sbin/logform /dev/fsvg1log
  6. When you receive the following prompt, type y and press Enter:
    Destroy /dev/fsvg1log

    Despite the wording in this prompt, nothing is destroyed. When you respond y to this prompt, the system formats the logical volume for the JFS log so that it can record file system transactions.

  7. Add another logical volume by using the following SMIT fast path:
    smit mklv
  8. Type the name of the same volume group as you used in step 2 (fsvg1 in this example). In the Logical Volumes screen, add your data to the following fields. Remember to designate a different physical volume for this logical volume than you did in step 3. For example:
    Logical Volumes NAME                     fslv1
    
    Number of LOGICAL PARTITIONS             64
    
    PHYSICAL VOLUME names                    hdisk2
    
    Logical volume TYPE                      jfs

    After you set the fields, press Enter to accept your changes and exit SMIT.

  9. Add a file system to the new logical volume, designate the log, and mount the new file system, by using the following sequence of commands:
    crfs -v jfs -d LogVolName -m FileSysName -a logname=FSLogPath
    
    mount FileSysName
    Where LogVolName is the name of the logical volume you created in step 2; FileSysName is the name of the file system you want to mount on this logical volume; and FSLogPath is the name of the logical volume you created in step 2. For example:
    crfs -v jfs -d fslv1 -m /u/myfs -a logname=/dev/fsvg1log
    mount /u/myfs
  10. To verify that you set up the file system and log correctly, type the following command (substituting your volume group name) :
    lsvg -l fsvg1
    The output shows both logical volumes that you created, with their file system types, as in the following example:
    LV NAME             TYPE    ...
    /dev/fsvg1log       jfslog  ...
    fslv1               jfs     ...
You created a volume group that contains at least two logical volumes on separate physical volumes, and one of those logical volumes contains the file system log.
Note: To provide redundancy, you can provide mirroring on the logical volume level for the JFS2 log device. However, providing mirroring is not a common practice and is not necessary.