Patent ID: 9733851
Date: 2017-08-15
CPC Classifications: G06F

Claim:
1. A computer program product for defragmenting volumes in a mirrored system, the computer program product comprising: one or more computer readable storage media and program instructions stored on the one or more computer readable storage media, wherein the one or more computer readable storage media are not transitory signals per se, the program instructions comprising: program instructions to suspend a mirroring of updates from a first set of tracks on a first server to a second set of tracks on a second server; program instructions to perform a defragmentation process on the second server; program instructions to, during the performing of the defragmentation process, track and store one or more updates to the first set of tracks on the first server; program instructions to store a before and after mapping of the second set of tracks, wherein the before and after mapping includes information identifying at least one track of the second set of tracks and a corresponding first location of the respective track before the performing of the defragmentation process and a second location of the respective track after the performing of the defragmentation process; program instructions to, upon completing the defragmentation process, serialize the first server with the second server, wherein a volume table of contents (VTOC) on the first server is updated according to the stored before and after mapping of the second set of tracks on the second server; program instructions to, upon serializing, apply the one or more stored updates to the first set of tracks on the first server to the second set of tracks on the second server; program instructions to, upon applying the one or more stored updates to the first set of tracks on the first server to the second set of tracks on the second server, perform a first hyperswap, wherein the first hyperswap reverses a mirroring direction of the first server and the second server such that, upon performing the first hyperswap, the second server mirrors updates to the first server; program instructions to relocate at least one track of the first set of tracks on the first server from a first location on the first server to a second location on the first server according to the stored before and after mapping of the corresponding second set of tracks on the second server; program instructions to, during the relocating, track and store one or more updates to the second set of tracks on the second server; program instructions to, upon relocating, apply the one or more updates to the second set of tracks on the second server to the first set of tracks on the first server; and program instructions to, upon applying the one or more updates to the second set of tracks on the second server to the first set of tracks on the first server, perform a second hyperswap, wherein the second hyperswap reverses the mirroring direction of the first server and the second server such that, upon performing the second hyperswap, the first server mirrors updates to the second server.