主权项 |
1. A method comprising:
receiving a request to perform a shrink operation on a first storage object, wherein the first storage object comprises a plurality of storage locations assigned to a virtual machine; in response to the request,
creating a file, wherein
the file comprises a first set of storage locations that are unused by the virtual machine, andthe first set of storage locations comprises multiple non-contiguous portions of the first storage object;generating information that identifies the first set of storage locations, wherein the first set of storage locations is a first subset of the plurality of storage locations, and
the generating comprises accessing a map, wherein
the map indicates which storage locations of the plurality of storage locations are included in the file, and which storage locations of the plurality of storage locations are not included in the file; andtransmitting the information to a host, wherein
the host is configured to perform the shrink operation, andthe shrink operation comprises
creating a second storage object,reading data from a second set of storage locations, wherein the second set of storage locations is a second subset of the plurality of storage locations, and the first set of storage locations and second set of storage locations are mutually exclusive, andcopying the data to the second storage object. |