摘要 |
Reclamation of storage space in presence of copy-on-write snapshot. In one embodiment, a reclamation command is generated. In response to generating the reclamation command, first data held within one storage device is copied to another storage device via a communication link. One or more first physical memory regions of the one storage device, which stores the first data, is allocated to a first region of a data volume. The other storage device is configured to store a copy-on-write snapshot of the data volume. In response to copying the first data, de-allocate the one or more first physical memory regions from the first data volume region. |
主权项 |
1. A method comprising:
generating a memory reclamation command; in response to generating the memory reclamation command,
accessing a first map, wherein
the first map indicates physical memory regions that are designated as unused, anddetermining, based on the first map, whether first data is designated as unused; in response to a determination that the first data is designated as unused, determining whether the first data is copied to another storage device, wherein
one or more first physical memory regions of one storage device, which stores the first data, is allocated to a first region of a data volume, andthe other storage device is configured to store an image that is data dependent on the data volume; in response to a determination that the first data is not yet copied to the other storage device, copying the first data held within the one storage device to the other storage device via a communication link; in response to copying the first data, de-allocating the one or more first physical memory regions from the first data volume region; and overwriting data of the one or more first physical memory regions with new data after the one or more first physical memory regions are de-allocated. |