US-12619581-B1 - Resource optimization in a multi-site replication environment
Abstract
Managing multi-site replication is provided. An input/output operation on a file of a local filesystem is captured to form a captured input/output file operation. The captured input/output file operation is enqueued on a single replication queue located in memory. Replication of the captured input/output file operation is performed to each of a plurality of target remote sites based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem.
Inventors
- Karrthik KG
- Venkateswara Rao Puvvada
- Ashish Pandey
- Saket Kumar
Assignees
- INTERNATIONAL BUSINESS MACHINES CORPORATION
Dates
- Publication Date
- 20260505
- Application Date
- 20241209
Claims (20)
- 1 . A method comprising: performing by an application running on a host node an input/output operation on a file of a local filesystem; receiving by a gateway node via a remote procedure call an indication that the application running on the host node is performing the input/output operation on the file of the local filesystem; capturing the input/output operation on the file of the local filesystem to form a captured input/output file operation in response to the gateway node receiving the indication that the application running on the host node is performing the input/output operation on the file of the local filesystem via the remote procedure call; enqueuing the captured input/output file operation on a single replication queue located in memory that corresponds to a plurality of target remote sites; and performing replication of the captured input/output file operation to each of the plurality of target remote sites concurrently based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem, the plurality of replication status inode bits includes a create status inode bit, a dirty status inode bit, an append status inode bit, a set attribute status inode bit, a state status inode bit, a cached status inode bit, and a local status inode bit.
- 2 . The method of claim 1 , further comprising: tracking a status of the replication of the captured input/output file operation to each of the plurality of target remote sites using values of the plurality of replication status inode bits included in the inode of the local filesystem; and determining whether the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits.
- 3 . The method of claim 2 , further comprising: responsive to determining that the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits, determining whether the replication of the captured input/output file operation has been completed to each of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits; and responsive to determining that the replication of the captured input/output file operation has not been completed to each of the plurality of target remote sites, identifying a first set of target remote sites of the plurality of target remote sites that have completed the replication of the captured input/output file operation using the values of a first set of replication status inode bits of the plurality of replication status inode bits that corresponds to the first set of target remote sites that have completed the replication.
- 4 . The method of claim 3 , further comprising: adjusting the values of the first set of replication status inode bits corresponding to the first set of target remote sites to indicate that the replication is completed to the first set of target remote sites.
- 5 . The method of claim 3 , further comprising: identifying a second set of target remote sites of the plurality of target remote sites that have not completed the replication of the captured input/output file operation using the values of a second set of replication status inode bits of the plurality of replication status inode bits that corresponds to the second set of target remote sites that have not completed the replication; and continuing the replication of the captured input/output file operation only to the second set of target remote sites of the plurality of target remote sites that have not completed the replication until the replication has been completed to each of the second set of target remote sites based on the values of the second set of replication status inode bits corresponding to the second set of target remote sites.
- 6 . The method of claim 1 , further comprising: removing the captured input/output file operation from the single replication queue corresponding to the plurality of target remote sites in response to the replication having been completed to each of the plurality of target remote sites.
- 7 . The method of claim 1 , further comprising: provisioning the plurality of target remote sites for multi-site replication from a single production site to the plurality of target remote sites, the single production site includes the gateway node and a plurality of host nodes, the gateway node performs the replication of the captured input/output file operation to the plurality of target remote sites concurrently using the single replication queue, the plurality of target remote sites is located in a multi-cloud environment.
- 8 . The method of claim 1 , further comprising: receiving the indication that the application running on the host node of a single production site is performing the input/output operation on the file of the local filesystem corresponding to the single production site by the gateway node via the remote procedure call, the local filesystem includes the inode having the plurality of replication status inode bits for tracking the replication of input/output operations to the plurality of target remote sites, a number of the plurality of replication status inode bits is based on a number of the plurality of target remote sites.
- 9 . A computer system comprising: a processor set; one or more computer-readable storage media; and program instructions stored on the one or more computer-readable storage media to cause the processor set to perform operations comprising: performing by an application running on a host node an input/output operation on a file of a local filesystem; receiving by a gateway node via a remote procedure call an indication that the application running on the host node is performing the input/output operation on the file of the local filesystem; capturing the input/output operation on the file of the local filesystem to form a captured input/output file operation in response to the gateway node receiving the indication that the application running on the host node is performing the input/output operation on the file of the local filesystem via the remote procedure call; enqueuing the captured input/output file operation on a single replication queue located in memory that corresponds to a plurality of target remote sites; and performing replication of the captured input/output file operation to each of the plurality of target remote sites concurrently based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem, the plurality of replication status inode bits includes a create status inode bit, a dirty status inode bit, an append status inode bit, a set attribute status inode bit, a state status inode bit, a cached status inode bit, and a local status inode bit.
- 10 . The computer system of claim 9 , wherein the operations further comprise: tracking a status of the replication of the captured input/output file operation to each of the plurality of target remote sites using values of the plurality of replication status inode bits included in the inode of the local filesystem; and determining whether the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits.
- 11 . The computer system of claim 10 , wherein the operations further comprise: responsive to determining that the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits, determining whether the replication of the captured input/output file operation has been completed to each of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits; and responsive to determining that the replication of the captured input/output file operation has not been completed to each of the plurality of target remote sites, identifying a first set of target remote sites of the plurality of target remote sites that have completed the replication of the captured input/output file operation using the values of a first set of replication status inode bits of the plurality of replication status inode bits that corresponds to the first set of target remote sites that have completed the replication.
- 12 . The computer system of claim 11 , wherein the operations further comprise: adjusting the values of the first set of replication status inode bits corresponding to the first set of target remote sites to indicate that the replication is completed to the first set of target remote sites.
- 13 . The computer system of claim 11 , wherein the operations further comprise: identifying a second set of target remote sites of the plurality of target remote sites that have not completed the replication of the captured input/output file operation using the values of a second set of replication status inode bits of the plurality of replication status inode bits that corresponds to the second set of target remote sites that have not completed the replication; and continuing the replication of the captured input/output file operation only to the second set of target remote sites of the plurality of target remote sites that have not completed the replication until the replication has been completed to each of the second set of target remote sites based on the values of the second set of replication status inode bits corresponding to the second set of target remote sites.
- 14 . A computer program product comprising: one or more computer-readable storage media; and program instructions stored on the one or more computer-readable storage media to perform operations comprising: performing by an application running on a host node an input/output operation on a file of a local filesystem; receiving by a gateway node via a remote procedure call an indication that the application running on the host node is performing the input/output operation on the file of the local filesystem; capturing the input/output operation on the file of the local filesystem to form a captured input/output file operation in response to the gateway node receiving the indication that the application running on the host node is performing the input/output operation on the file of the local filesystem via the remote procedure call; enqueuing the captured input/output file operation on a single replication queue located in memory that corresponds to a plurality of target remote sites; and performing replication of the captured input/output file operation to each of the plurality of target remote sites concurrently based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem, the plurality of replication status inode bits includes a create status inode bit, a dirty status inode bit, an append status inode bit, a set attribute status inode bit, a state status inode bit, a cached status inode bit, and a local status inode bit.
- 15 . The computer program product of claim 14 , wherein the operations further comprise: tracking a status of the replication of the captured input/output file operation to each of the plurality of target remote sites using values of the plurality of replication status inode bits included in the inode of the local filesystem; and determining whether the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits.
- 16 . The computer program product of claim 15 , wherein the operations further comprise: responsive to determining that the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits, determining whether the replication of the captured input/output file operation has been completed to each of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits; and responsive to determining that the replication of the captured input/output file operation has not been completed to each of the plurality of target remote sites, identifying a first set of target remote sites of the plurality of target remote sites that have completed the replication of the captured input/output file operation using the values of a first set of replication status inode bits of the plurality of replication status inode bits that corresponds to the first set of target remote sites that have completed the replication.
- 17 . The computer program product of claim 16 , wherein the operations further comprise: adjusting the values of the first set of replication status inode bits corresponding to the first set of target remote sites to indicate that the replication is completed to the first set of target remote sites.
- 18 . The computer program product of claim 16 , wherein the operations further comprise: identifying a second set of target remote sites of the plurality of target remote sites that have not completed the replication of the captured input/output file operation using the values of a second set of replication status inode bits of the plurality of replication status inode bits that corresponds to the second set of target remote sites that have not completed the replication; and continuing the replication of the captured input/output file operation only to the second set of target remote sites of the plurality of target remote sites that have not completed the replication until the replication has been completed to each of the second set of target remote sites based on the values of the second set of replication status inode bits corresponding to the second set of target remote sites.
- 19 . The computer program product of claim 14 , wherein the operations further comprise: removing the captured input/output file operation from the single replication queue corresponding to the plurality of target remote sites in response to the replication having been completed to each of the plurality of target remote sites.
- 20 . The computer program product of claim 14 , wherein the operations further comprise: provisioning the plurality of target remote sites for multi-site replication from a single production site to the plurality of target remote sites, the single production site includes the gateway node and a plurality of host nodes, the gateway node performs the replication of the captured input/output file operation to the plurality of target remote sites concurrently using the single replication queue, the plurality of target remote sites is located in a multi-cloud environment.
Description
BACKGROUND The disclosure relates generally to file operation replication and more specifically to multi-site file operation replication. Replication involves sharing information to ensure consistency between multiple redundant resources to improve, for example, reliability, fault-tolerance, accessibility, and the like. File-based replication conducts data replication at the logical level (e.g., individual data files). Often, it is desirable to save multiple copies of files to protect the files from inadvertent deletion, hardware failure, power failure, natural disaster, and the like which may render the files temporarily or permanently unavailable. The copies of the files may be stored geographically remote from each other (e.g., replicating files to backup sites located in different geographic regions) with the files transferred via one or more networks. Replication may be performed on a continuous basis in real time as changes occur, on a predefined periodic basis (e.g., hourly, daily, weekly, or the like), or on demand. SUMMARY According to one illustrative embodiment, a method is provided. The method captures an input/output operation on a file of a local filesystem to form a captured input/output file operation. The method enqueues the captured input/output file operation on a single replication queue located in memory. The method performs replication of the captured input/output file operation to each of a plurality of target remote sites based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem. According to other illustrative embodiments, a computer system and computer program product are provided. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a pictorial representation of a computing environment in which illustrative embodiments may be implemented; FIG. 2 is a diagram illustrating an example of a multi-site replication management system in accordance with an illustrative embodiment; FIG. 3 is a diagram illustrating an example of a multi-site replication management process in accordance with an illustrative embodiment; and FIGS. 4A-4C are a flowchart illustrating a process for managing multi-site replication in accordance with an illustrative embodiment. DETAILED DESCRIPTION A method captures an input/output operation on a file of a local filesystem to form a captured input/output file operation. The method enqueues the captured input/output file operation on a single replication queue located in memory. The method performs replication of the captured input/output file operation to each of a plurality of target remote sites based on the single replication queue and a plurality of replication status inode bits included in an inode of the local filesystem. As a result, illustrative embodiments provide a technical effect of decreasing resource utilization and increasing system performance by using only one replication queue to replicate input/output file operations to each of a plurality of target remote sites. Also, the method tracks a status of the replication of the captured input/output file operation to each of the plurality of target remote sites using values of the plurality of replication status inode bits included in the inode of the local filesystem. The method determines whether the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits. As a result, illustrative embodiments provide a technical effect of using values of replication status inode bits to track replication status of input/output file operations to each of a plurality of target remote sites and determine whether the replication has been completed or not to each respective target remote site. In addition, in response to determining that the replication of the captured input/output file operation has been completed to one or more of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits, the method further determines whether the replication of the captured input/output file operation has been completed to each of the plurality of target remote sites based on tracking the status of the replication to each of the plurality of target remote sites using the values of the plurality of replication status inode bits. In response to determining that the replication of the captured input/output file operation has not been completed to each of the plurality of target remote sites, the method identifies a first set of target remote sites of the plurality of target remote sites that have completed the replication of the captured input/output file operation using the values of a first set of repl