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.
- 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 ofjfs
.
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:
- Add the new volume group (in this example, fsvg1) by using the
SMIT fast path:
smit mkvg
- Add a new logical volume to this volume group
by using the SMIT fast path:
smit mklv
- 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
- After you set the fields, press Enter to accept your changes and exit SMIT.
- Type the following command on a command line:
/usr/sbin/logform /dev/fsvg1log
- 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.
- Add another logical volume by using the following
SMIT fast path:
smit mklv
- 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.
- 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:
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 LogVolName -m FileSysName -a logname=FSLogPath mount FileSysName
crfs -v jfs -d fslv1 -m /u/myfs -a logname=/dev/fsvg1log mount /u/myfs
- 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 ...