Initializes a logical volume for use as a Journaled File System (JFS) log. Initializes an Enhanced Journaled File System (JFS2) outline log. Reformats an inline log for an existing JFS2 file system using an inline log.
The logform command initializes a logical volume for use as a JFS or JFS2 log device. Running the logform command on any JFS log device or JFS2 outline or inline log device will destroy all log records on the log device. This may cause the file system to lose its recovery capability and therefore to lose the file system data.
When you run the logform command on an outline log for a JFS2 file system that is already using an outline log, the device type for the outline log must be jfs2log. Otherwise, the logform command will exit with an error.
To reuse an existing logical volume as an outline log device for a JFS2 file system, you must delete the logical volume and then recreate it as device type jfs2log.
For the outline log device of a JFS file system, the same rules are applied. That is, for a new logical volume, the type should be jfslog. For a reuse logical volume, you should delete the logical volume and recreate it as lv type jfslog. However, logform does not do type check for the log device of a JFS file system. The logform command does not report any error when input log device has a wrong lv type. The user should pay attention to the lv type.
When you run the logform command on a device with logical volume type jfs2, if the device has a file system with an inline log, then the inline log will be reformatted. If the device has a file system with an outline log, then an error will be reported.
When the logform command is used to format an inline log for an existing JFS2 file system, the file system data will not be affected; only the log records are destroyed. The logical volume type for an inline log is the same as for the file system. For a JFS2 file system, the inline log logical volume type is jfs2.
For a JFS2 file system, logform formats a maximum of 2047 MBytes of log. If the log size is greater than 2047 MBytes, only 2047 MBytes will be formatted and the rest will left untouched and will not be used.
Item | Description |
---|---|
-V vfstype [jfs | jfs2] | If specified, vfstype indicates what type of file system the log should be formatted for. If this option is not specified, then the type is obtained from the logical volume's type. Note that for jfs2 log device this flag is always ignored. The logform command is unable to change the lv type according to the value of the -V flag. Therefore the user should create an lv with the correct lv type ( jfslog or jfs2log) before calling the logform command. Use of this flag is strongly discouraged. |
Item | Description |
---|---|
LogName | The LogName parameter specifies the absolute path to the logical volume to be initialized (for example, /dev/jfslog1). When the logform command is run on an inline log, LogName is the device name of the file system. |
mklv -t jfslog -y jfslog1 newvg 1
This
command creates a jfslog logical volume named jfslog1 in
the volume group newvg. The size of the logical volume is
1 logical partition.logform /dev/jfslog1
The jfslog1 logical
volume is now ready to be used as a JFS log device.logform /dev/fslv00
This
formats the inline log for file system /j2, but does
not touch the data in the file system.Item | Description |
---|---|
/etc/filesystems | Lists the known file systems and defines their characteristics, including the log device. |