Patent ID: 8768898

Claim:
A method, comprising: receiving at a storage server a repacking command in a network storage communication protocol, from a client device executing a host application, the repacking command having been generated at the client device by the client device having incorporated a plurality of ordered instructions into the repacking command, the repacking command identifying a source data set and a destination data set stored at the storage server, the source data set occupying a plurality of file system level segments, wherein each of the plurality of instructions includes instructions to manipulate the destination data set using at least one of the plurality of file system level segments of the source data set at the storage server, and each instruction includes information identifying at least one of the file system level segments in such a manner that no mapping function is needed to unambiguously ascertain each of said file system level segments of the source data set from the repacking command; wherein the destination data set is a copy of the source data set and the repacking command causes the storage server to reclaim unused storage space, such that the destination data set occupies a smaller number of segments than the source data set; accessing at the storage server the plurality of instructions in the repacking command; reordering the plurality of instructions in the storage server to improve a performance of the plurality of instructions; manipulating the destination data set using at least one of the file system level segments of the source data set at the storage server in response to receiving the repacking command, without transferring data of the destination data set or the source data set to the client device, by executing the plurality of instructions in the storage server, wherein the manipulating comprises: for each instruction: retrieving the at least one of the file system level segments of the source data set from a storage media of the storage server; inserting data of the at least one of the file system level segments of the source data set to the destination data set stored in the storage server; and in an event the repacking command includes an instruction to remove a file system level segment of destination data set, removing the file system level segment from the destination data set stored in the storage server; and sending a result of the repacking command from the storage server to the client device.