Retention management and reordering the data based on retention times on tape
AssigneeInternational Business Machines Corporation
InventorsNils Haustein, Thorsten Krause, Daniel J. Winarski
Life of this patent
Estimating the term…
Abstract
Retention management for data stored in data blocks on a tape is provided. A block mapping table has entries each of which include an expiration date for data blocks stored on the tape. The entries of the block mapping table may be sorted in accordance with at least one sorting criterion. Data blocks on the tape are rearranged according to the block mapping table. The block mapping table is then stored, either on the tape or in a memory associated with the tape.
Claims19
A method for retention management for data stored on a tape, the method comprising:
- maintaining a block mapping table having entries, the entries including an expiration date for one or more data blocks stored on the tape, wherein the entries comprise at least one entry for a data block of the one or more data blocks that has expired based on the expiration date;
- sorting the entries of the block mapping table such that the entries are sorted according to date and time in a descending order;
- rearranging the data blocks on the tape according to the block mapping table, such that the data blocks are stored on the tape according to the data and the time in the descending order;
- storing the block mapping table;
- and
- generating the expiration date by performing operations including:
- receiving a retention period;
- receiving a write command for writing a data block to the tape;
- determining the expiration date for the data block to be written to the tape based on a current time stamp and the retention period;
- identifying a current block address of the tape where the data block is to be written based on expiration date;
- and
- verifying that data blocks with block addresses that have values greater than or equal to the current block address have expired relative to the current time stamp using the block mapping table;
- writing the data block to the tape if the verifying determines that all data blocks having values greater than or equal to the block address subsequent to the current block address of the tape have expired relative to the current time stamp;
- updating the block mapping table to include an entry for the data block, in response to writing the data block to the tape;
- and
- resorting, after the updating of the block mapping table, the entries of the block mapping table such that the entries are sorted according to the date and the time in the descending order.
An apparatus comprising:
- a retention management unit for managing data stored in data blocks on a tape, the retention management unit including:
- a block mopping table baying entries each of which comprise an expiration date for a respective data block stored on the tape, wherein the entries comprise at least one entry for a data block of the one or more data blocks that has expired based on the expiration date,
- a sorting unit configured to sort the entries of the block mapping table such that the entries are sorted according to date and time in a descending order,
- a rearranging unit configured to rearrange the data blocks on the tape according to the block mapping table, such that the data blocks are stored on the tape according to the data and the time in the descending order, and
- a storing unit configured to store the block mapping table;
- and
- a unit configured to generate the expiration date by performing operations including:
- receive a retention period;
- receive a write command for writing a data block to the tape;
- determine the expiration date for the data block to be written to the tape based on a current time stamp and the retention period;
- identify a current block address of the tape where the data block is to be written based on expiration date;
- and
- verify that data blocks with block addresses that have values greater than or equal to the current block address have expired relative to the current time stamp using the block mapping table,
- wherein the unit is further configured to,
- write the data block to the tape if the verify determines that all data blocks having values greater than or equal to the block address subsequent to the current block address of the tape have expired relative to the current time stamp;
- update the block mapping table to include an entry for the data block, in response to writing the data block to the tape;
- and
- resort, after the update of the block mapping table, the entries of the block mapping table such that the entries are sorted according to the date and the time in the descending order.
An apparatus comprising:
- one or more processors;
- a computer readable storage medium having computer usable program code for the one or more processors embodied therewith, the computer usable program code comprising a computer usable program code configured to:
- maintain a block mapping table having entries, the entries including an expiration date for one or more data blocks stored on a tape, wherein the entries comprise at least one entry for a data block of the one or more data blocks that has expired based on the expiration date;
- sort the entries of the block mapping table such that the entries are sorted according to date and time in a descending order;
- rearrange the data blocks on the tape according to the block mapping table, such that the data blocks are stored on the tape according to the data and the time in the descending order;
- store the block mapping table;
- and
- generate the expiration date by performing operations including:
- receive a retention period;
- receive a write command for writing a data block to the tape;
- determine the expiration date for the data block to be written to the tape based on a current time stamp and the retention period;
- identify a current block address of the tape where the data block is to be written based on expiration date;
- and
- verify that data blocks with block addresses that have values greater than or equal to the current block address have expired relative to the current time stamp using the block mapping table;
- write the data block to the tape if the verifying determines that all data blocks having values greater than or equal to the block address subsequent to the current block address of the tape have expired relative to the current time stamp;
- update the block mapping table to include an entry for the data block, in response to writing the data block to the tape;
- and
- resort after the updating of the block mapping table, the entries of the block mapping table such that the entries are sorted according to the date and the time in the descending order.
A computer program product for retention management for data stored on a tape, the computer program product comprising:
- a computer readable storage medium having computer usable program code embodied therewith, the computer usable program code comprising a computer usable program code configured to:
- receive a query for data, the query including a deadline for completion;
- determine a plurality of access plans for the query;
- and
- maintain a block mapping table having entries, the entries including an expiration date for one or more data blocks stored on the tape, wherein the entries comprise at least one entry for a data block of the one or more data blocks that has expired based on the expiration date;
- sort the entries of the block mapping table such that the entries are sorted according to date and time in a descending order;
- rearrange the data blocks on the tape according to the block mapping table, such that the data blocks are stored on the tape according to the data and the time in the descending order;
- store the block mapping table;
- and
- generate the expiration date by performing operations including:
- receive a retention period;
- receive a mite command for writing a data block to the tape;
- determine the expiration date for the data block to be written to the tape based on a current time stamp and the retention period;
- identify a current block address of the tape where the data block is to be written based on expiration date;
- and
- verify that data blocks with block addresses that have values greater than or equal to the current block address have expired relative to the current time stamp using the block mapping table;
- write the data block to the tape if the verifying determines that all data blocks having values greater than or equal to the block address subsequent to the current block address of the tape have expired relative to the current time stamp;
- update the block mapping table to include an entry for the data block, in response to writing the data block to the tape;
- and
- resort, after the updating of the block mapping table, the entries of the block mapping table such that the entries are sorted according to the date and the time in the descending order.
Dependencies are inferred from the claim text.