Method and system for compression of files for storage and operation on compressed files
AssigneeInternational Business Machines Corporation
InventorsJonathan Amit, Noah Amit, Nadav Kedem
Life of this patent
Estimating the term…
Abstract
Methods and systems for creating, reading, and writing compressed data for use with a block mode access storage. The compressed data are packed into a plurality of compressed units and stored in a storage logical unit (LU). One or more corresponding compressed units may be read and/or updated with no need of restoring the entire storage logical unit while maintaining a de-fragmented structure of the LU.
Claims36
For use with a block mode access storage protocol, a method of creating compressed data for storage in at least one storage logical unit, said method comprising:
- a) creating in respect to at least one storage logical unit a corresponding virtual logical unit accessible by said block mode access protocol and configured to virtually accommodate raw data, wherein a size of the virtual logical unit corresponds to an estimated size of raw data which, being compressed, would substantially amount to a size of the storage logical unit;
- b) segmenting the virtual logical unit into one or more virtual storage portions constituting clusters;
- c) compressing the raw data accommodated in a cluster and thereby generating compressed data to be stored in a respective compressed section within the storage logical unit, wherein the compressed section is divided into at least one fixed-size compression logical units (CLU) and the storage logical unit comprises a section table with at least one record describing a compressed section, said at least one record holding at least information on CLUs corresponding to the compressed section and storage location pointers pertaining to said CLUs;
- d) facilitating mapping between the compressed data stored in the compressed section and the virtual accommodation at the virtual logical unit;
- e) determining a serial number of a first compressed section comprising data to be updated thereby constituting an original compressed section (No);
- f) determining the CLUs corresponding to said original compressed section and storage location thereof by referring to the section table;
- g) facilitating restoring the data from said original compressed section;
- h) calculating an offset of the updating data within corresponding cluster and facilitating the update at given data range;
- i) compressing the updated cluster into an updated compressed section (Nu);
- j) facilitating overwriting said original compressed section with updated compressed section;
- k) updating the section table;
- l) handling a list of free CLUs released during writing data, said list is handled until the storage logical unit is disconnected;
- m) comparing the number of CLUs required to said original No and said updated Nu compressed sections;
- and
- n) facilitating one of the following:
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section if No=Nu,
- overwriting first Nu CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section and updating the list of free CLUs about released CLUs if No>Nu,
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section and writing the rest of CLUs corresponding to the updated compressed section to the CLUs contained in the list of free CLUs, if No<Nu<No+Nf, where Nf is a number of CLUs in said list, and
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section, writing the CLUs corresponding to the updated compressed section to the CLUs contained in the list of free CLUs and continuous writing the rest of CLUs corresponding to the updated compressed section to next free storage location if No+Nf<Nu.
For use with a block mode access storage protocol, a method of writing data at a given range to data stored as compressed data in at least one storage logical unit, Wherein said compressed data are packed into one or more compressed sections corresponding to fixed-size portions of raw data constituting clusters virtually accommodated in a virtual logical unit, the method comprising:
- a) determining a first cluster to be updated thereby constituting an original cluster (No);
- b) determining a serial number of corresponding compressed section;
- c) facilitating restoring the data corresponding to said original cluster;
- d) calculating an offset of the updating data within said cluster and facilitating the update at the given data range;
- e) compressing the updated cluster into an updated compressed section (No);
- f) facilitating overwriting said original compressed section with updated compressed section, said updated compressed sections divided into fixed-size compression logical units (CLU), said storage logical unit comprises a section table holding information on CLUs corresponding to said undated compressed sections and storage location thereof the storing location of the data to be read is defined by referring to the section table and said section table is updated after step f);
- g) handling a list of free CLUs released during writing data, said list is handled until the storage logical unit is disconnected;
- h) comparing the number of CLUs required to said original No and updated Nu compressed section;
- and
- i) facilitating one of the following:
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section if No=Nu,
- overwriting first Nu CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section and updating the list of free CLUs about released CLUs if No>Nu,
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section and writing the rest of CLUs corresponding to the updated compressed section to the CLUs contained in the list of free CLUs, if No<Nu<No,+Nf where Nf a number of CLUs in said list, and
- overwriting all CLUs corresponding to the original compressed section with CLUs corresponding to the updated compressed section, writing the CLUs corresponding updated compressed section to the CLUs contained in the list of free CLUs and continuous writing the rest of CLUs corresponding to the updated compressed section to next free storage location if No+Nf<Nu.
For use with a block mode access storage protocol, a method of creating compressed data for storage in at least one storage logical unit, said method comprising:
- a) creating in respect to at least one storage logical unit a corresponding virtual logical unit accessible by said block mode access protocol and configured to virtually accommodate raw data, wherein a size of the virtual logical unit corresponds to an estimated size of raw data which, being compressed, would substantially amount to a size of the storage logical unit;
- b) segmenting the virtual logical unit into one or more virtual storage portions constituting clusters;
- c) compressing the raw data accommodated in a cluster and thereby generating compressed data to be stored in a respective compressed section within the storage logical unit, wherein the compressed section is divided into at least one fixed-size compression logical units (CLU) and the storage logical unit comprises a section table with at least one record describing a compressed section, said record holding at least information on CLUs corresponding to the compressed section and storage location pointers pertaining to said CLUs;
- d) facilitating mapping between the compressed data stored in the compressed section and the virtual accommodation at the virtual logical unit;
- e) determining a serial number of first compressed section comprising data to be updated thereby constituting an original compressed section (No);
- f) determining the CLUs corresponding to said original compressed section and storage location thereof by referring to the section table;
- g) facilitating restoring the data from said original compressed section;
- h) calculating an offset of the updating data within corresponding cluster and facilitating the update at the given data range;
- i) compressing the updated cluster into an updated compressed section (Nu);
- j) facilitating overwriting said original compressed section with updated compressed section;
- k) handling a list of free CLUs released during writing data, said list is handled until the storage logical unit is disconnected;
- l) checking the list of free CLUs before disconnecting the storage logical unit;
- m) if said list is not empty defining a CLU with the highest storage location pointer among CLUs comprised in the compressed sections (first CLU);
- n) facilitating moving the compressed data from said first CLU to a free CLU with lower storage location pointer (second CLU);
- o) assigning said second CLU to pertaining compressed section and said first CLU to the list of free CLUs;
- p) repeating the stages b)-d) until the storage location pointers of all CLUs comprised in compressed sections are lower than a pointer of any of CLU comprising in the list of free CLUs;
- and
- q) updating the section table.
For use with a block mode access storage protocol, a method of writing data at a given range to data stored as compressed data in at least one storage logical unit, Wherein said compressed data are packed into one or more compressed sections corresponding to fixed-size portions of raw data constituting clusters virtually accommodated in a virtual logical unit, the method comprising:
- a) determining a first cluster to be updated thereby constituting an original cluster (No);
- b) determining a serial number of corresponding compressed section;
- c) facilitating restoring the data corresponding to said original cluster;
- d) calculating an offset of the updating data within said cluster and facilitating the update at the given data range;
- e) compressing the updated cluster into an updated compressed section (NO;
- f) facilitating overwriting said original compressed section with updated compressed section, said updated compressed sections divided into fixed-size compression logical units (CLU), said storage logical unit comprises a section table holding information on CLUs corresponding to said updated compressed sections and storage location thereof;
- the storing location of the data to be read is defined by referring to the section table and said section table is updated after step f);
- g) handling a list of free CLUs released during writing data, said list is handled until the storage logical unit is disconnected;
- h) checking the list of free CLUs before disconnecting the storage logical unit;
- i) if said list is not empty, defining a CLU with the highest storage location pointer among CLUs comprised in the compressed sections (first CLU);
- j) facilitating moving the compressed data from said first CLU to a free CLU with lower storage location pointer (second CLU);
- k) assigning said second CLU to pertaining compressed section and said first CLU to the list of free CLUs;
- l) repeating the stages b)-d) until the storage location pointers of all CLUs comprised in compressed sections are lower than a pointer of any of CLU comprising in the list of free CLUs;
- and
- m) updating the section table.
Dependencies are inferred from the claim text.