Method and system for dirty time log directed resilvering
First Claim
Patent Images
1. A method for resilvering a storage pool, comprising:
- identifying, in response to a read request, a first live block in the storage pool by traversing a hierarchical tree structure in which the storage pool is organized, wherein the first live block is a first indirect block, and wherein the first indirect block is live when the first indirect block is referenced by a first block pointer of a second indirect block located hierarchically above the first indirect block in the hierarchical tree structure;
making a first determination that a first birth time of the first live block is on a dirty time log (DTL), wherein the first birth time is stored in the first block pointer of the second indirect block, wherein the first birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the first indirect block fail;
obtaining, in response to the first determination, a first alternate location of the first live block from the DTL;
obtaining a first mirrored copy of the first live block from the alternate location, wherein the first mirrored copy of the first live block corresponds to the new version of the first indirect block;
resilvering the first live block with the first mirrored copy of the first live block to obtain a resilvered indirect block;
identifying, using the resilvered indirect block, a second live block in the storage pool by traversing the hierarchical tree structure of the storage pool, wherein the second live block is a data block and is live when the data block is referenced by a second block pointer of the resilvered indirect block, wherein the resilvered indirect block is located hierarchically above the data block in the hierarchical tree structure;
making a second determination that a second birth time of the second live block is on the DTL, wherein the second birth time is stored in the second block pointer of the resilvered indirect block, wherein the second birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the data block fail;
obtaining, in response to the second determination, a second alternate location of the second live block from the DTL;
obtaining a second mirrored copy of the second live block from the second alternate location, wherein the second mirrored copy of the second live block corresponds to the new version of the data block; and
resilvering the second live block with the second mirrored copy of the second live block to obtain a resilvered data block.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for resilvering a storage pool includes identifying a live block in the storage pool, determining whether a birth time associated with the live block is on a dirty time log (DTL), and resilvering the live block, if the birth time is on the DTL.
76 Citations
10 Claims
-
1. A method for resilvering a storage pool, comprising:
-
identifying, in response to a read request, a first live block in the storage pool by traversing a hierarchical tree structure in which the storage pool is organized, wherein the first live block is a first indirect block, and wherein the first indirect block is live when the first indirect block is referenced by a first block pointer of a second indirect block located hierarchically above the first indirect block in the hierarchical tree structure; making a first determination that a first birth time of the first live block is on a dirty time log (DTL), wherein the first birth time is stored in the first block pointer of the second indirect block, wherein the first birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the first indirect block fail; obtaining, in response to the first determination, a first alternate location of the first live block from the DTL; obtaining a first mirrored copy of the first live block from the alternate location, wherein the first mirrored copy of the first live block corresponds to the new version of the first indirect block; resilvering the first live block with the first mirrored copy of the first live block to obtain a resilvered indirect block; identifying, using the resilvered indirect block, a second live block in the storage pool by traversing the hierarchical tree structure of the storage pool, wherein the second live block is a data block and is live when the data block is referenced by a second block pointer of the resilvered indirect block, wherein the resilvered indirect block is located hierarchically above the data block in the hierarchical tree structure; making a second determination that a second birth time of the second live block is on the DTL, wherein the second birth time is stored in the second block pointer of the resilvered indirect block, wherein the second birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the data block fail; obtaining, in response to the second determination, a second alternate location of the second live block from the DTL; obtaining a second mirrored copy of the second live block from the second alternate location, wherein the second mirrored copy of the second live block corresponds to the new version of the data block; and resilvering the second live block with the second mirrored copy of the second live block to obtain a resilvered data block. - View Dependent Claims (2, 3)
-
-
4. A system comprising:
-
a storage pool organized in a hierarchical tree structure and configured to store data blocks and indirect blocks located hierarchically above the data blocks, wherein the hierarchical tree structure is traversed to; identify, in response to a read request, a first live block in the storage pool, wherein the first live block is a first indirect block, and wherein the first indirect block is live when the first indirect block is referenced by a first block pointer of a second indirect block located hierarchically above the first indirect block in the hierarchical tree structure, and identify a second live block, in response to resilvering the first indirect block to obtain a resilvered indirect block, wherein the second live block is a data block and is live when the data block is referenced by a second block pointer of the resilvered indirect block, wherein the resilvered indirect block is located hierarchically above the data block; a dirty time log (DTL), wherein the DTL is used to; make a first determination that a first birth time of the first live block is on the DTL, wherein the first birth time is stored in the first block pointer of the second indirect block, wherein the first birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the first indirect block fail, obtain, in response to the first determination, a first alternate location of the first live block from the DTL, obtain a first mirrored copy of the first live block from the alternate location, wherein the first mirrored copy of the first live block corresponds to the new version of the first indirect block, resilver the first live block with the first mirrored copy of the first live block to obtain the resilvered indirect block make a second determination that a second birth time of the second live block is on the DTL, wherein the second birth time is stored in the second block pointer of the resilvered indirect block, wherein the second birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the data block fail; obtain, in response to the second determination, a second alternate location of the second live block from the DTL; obtain a second mirrored copy of the second live block from the second alternate location, wherein the second mirrored copy of the second live block corresponds to the new version of the data block; and resilver the second live block with the second mirrored copy of the second live block to obtain a resilvered data block. - View Dependent Claims (5, 6, 7)
-
-
8. A non-transitory computer readable storage medium comprising executable instructions for resilvering a storage pool by:
-
identifying, in response to a read request, a first live block in the storage pool by traversing a hierarchical tree structure in which the storage pool is organized, wherein the first live block is a first indirect block, and wherein the first indirect block is live when the first indirect block is referenced by a first block pointer of a second indirect block located hierarchically above the first indirect block in the hierarchical tree structure; making a first determination that a first birth time of the first live block is on a dirty time log (DTL), wherein the first birth time is stored in the first block pointer of the second indirect block, wherein the first birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the first indirect block fail; obtaining, in response to the first determination, a first alternate location of the first live block from the DTL; obtaining a first mirrored copy of the first live block from the alternate location, wherein the first mirrored copy of the first live block corresponds to the new version of the first indirect block; resilvering the first live block with the first mirrored copy of the first live block to obtain a resilvered indirect block; identifying, using the resilvered indirect block, a second live block in the storage pool by traversing the hierarchical tree structure of the storage pool, wherein the second live block is a data block and is live when the data block is referenced by a second block pointer of the resilvered indirect block, wherein the resilvered indirect block is located hierarchically above the data block in the hierarchical tree structure; making a second determination that a second birth time of the second live block is on the DTL, wherein the second birth time is stored in the second block pointer of the resilvered indirect block, wherein the second birth time is stored in the DTL only when both a first attempt and a second attempt to store a new version of the data block fail; obtaining, in response to the second determination, a second alternate location of the second live block from the DTL; obtaining a second mirrored copy of the second live block from the second alternate location, wherein the second mirrored copy of the second live block corresponds to the new version of the data block; and resilvering the second live block with the second mirrored copy of the second live block to obtain a resilvered data block. - View Dependent Claims (9, 10)
-
Specification