Hitachi

For Linux(R) (x86) Systems HA Monitor Cluster Software


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.

Table 4‒7: 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:

  • A file system 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). Then, the file system is mounted.

  • If the connection operation fails, HA Monitor issues an error message and resumes 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.

  • The file system is unmounted.

  • If the unmount operation fails, HA Monitor uses the fuser OS command to forcibly terminate all processes that are accessing the file system. Then, HA Monitor retries an unmount attempt once a second before the retry count limit specified in the server environment definition is reached. If the retry count limit is reached, HA Monitor issues an error message and resumes processing.

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.

Figure 4‒20: Processing flow for connecting a file system

[Figure]

(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.

Figure 4‒21: Processing flow for file system switching in the event of a server failure

[Figure]

The following figure shows the processing flow for file system switching in the event of a host failure.

Figure 4‒22: Processing flow for file system switching in the event of a host failure

[Figure]

(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.