主权项 |
1. A method for defragmenting volumes in a mirrored system, the method comprising:
suspending, by one or more processors, a mirroring of updates from a first set of tracks on a first server to a second set of tracks on a second server; performing, by one or more processors, a defragmentation process on the second server; during the performing of the defragmentation process, tracking and storing, by one or more processors, one or more updates to the first set of tracks on the first server; storing, by one or more processors, 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; upon completing the defragmentation process, serializing, by one or more processors, 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; upon serializing, applying, by one or more processors, 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; 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, performing a first hyperswap, by one or more processors, 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; relocating, by one or more processors, 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; during the relocating, tracking and storing, by one or more processors, one or more updates to the second set of tracks on the second server; upon relocating, applying, by one or more processors, 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 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, performing a second hyperswap, by one or more processors, 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. |