4.3.2 Managing file systems
HA Monitor switches file systems on a shared disk by mounting and unmounting them. The following table describes how to control switching of file systems and HA Monitor processing.
Control method |
HA Monitor processing |
---|---|
Mounting |
After connecting a shared disk, HA Monitor connects a file system by performing the following processing:
File systems are mounted in the order specified in the fs_name operand in the server environment definition. |
Unmounting |
Before disconnecting a shared disk, HA Monitor disconnects the file systems by performing the processing described below. If the active server is terminated, HA Monitor always unmounts the file systems regardless of the cause of termination.
File systems are unmounted in the reverse order of the specification of the fs_name operand in the server environment definition. |
File systems are mounted in the order in which they are specified for the fs_name operand in the server environment definition. The file systems are unmounted in reverse order.
- Organization of this subsection
(1) Connecting
When the active server starts, HA Monitor unmounts the file system from the standby server and then mounts it from the active system so that the active server can use the file system. If there are processes that are using the file system when it is unmounted, HA Monitor uses the fuser OS command to forcibly terminate those processes. When the file system is mounted, its consistency is checked by using the fsck command of the OS (or the xfs_repair command if the file system of the shared disk is XFS in RHEL7 or a later version).
The following figure shows the processing flow for connecting a file system.
|
(2) Switching
HA Monitor switches file systems by unmounting the file system from the host resulting in a failure and mounting the file system from the host that inherits job processing. If there are processes that are using the file system when it is unmounted, HA Monitor uses the fuser OS command to forcibly terminate those processes. The processing flow for file system switching in the event of a server failure differs from that for host failures.
The following figure shows the processing flow for file system switching in the event of a server failure.
|
The following figure shows the processing flow for file system switching in the event of a host failure.
|
(3) Log files
When HA Monitor switches file systems, it outputs the execution results to a file named /opt/hitachi/HAmon/spool/server-alias-name.fslog for each server. In the event of an error such as a switching error, you can determine the cause of the error by referencing this log file.
You can specify a maximum size for a log file in the fs_log_size operand in the HA Monitor environment settings. If a log file's size exceeds this value during log collection, HA Monitor backs up the file under the name server-alias-name.fslog_old, clears the file, and then collects log data again.