# US 8,280,858 B2 · Storage pool scrubbing with concurrent snapshots

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,280,858 B2
- Document ID: US8280858B2
- Status: Granted
- Kind: B2
- Application number: 12/494,090
- Filed: 2009-06-29
- Published: 2010-12-30
- Granted: 2012-10-02
- Earliest claimed: 2009-06-29
- Assignees: Oracle America, Inc.
- Inventors: Matthew A. Ahrens; Mark J. Maybee
- Web page: https://patentgrep.com/patent/US8280858B2

## CPC

- G06F 16/10: File systems; File servers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for scrubbing a storage pool is disclosed. The method includes loading a scrub queue with a number of identifiers corresponding to a number of datasets, selecting a first identifier from the scrub queue, where the first identifier corresponds to a first dataset, initiating a scrubbing of the first dataset. The method further includes, upon receiving an indication of a requirement to pause the scrubbing, pausing the scrubbing of the first dataset, creating a bookmark recording a last location within the first dataset that was scrubbed before pausing the scrubbing of the first dataset, detecting at least one change to a storage pool, and performing a modification in response to detecting the at least one change to the storage pool.

## Claims

### Claim 1

A non-transitory computer readable storage medium having a computer readable program code embodied therein, the computer readable program code adapted to be executed by a processor to perform a method, the method comprising:
loading a scrub queue with a plurality of identifiers corresponding to a plurality of datasets in a storage pool;
selecting a first identifier from the scrub queue, wherein the first identifier corresponds to a first dataset, wherein the first dataset is a dataset of the plurality of datasets;
initiating a scrubbing of the first dataset, wherein the first dataset is a hierarchical block tree (HBT) comprises:
a plurality of data blocks and at least one indirect block, wherein the indirect block comprises a first block pointer that references at least one of the plurality of data blocks, and wherein the first block pointer comprises a birth time associated with the at least one of the plurality of data blocks, and
a root block comprising a second block pointer referencing the at least one indirect block, wherein the second block pointer comprises a birth time associated with the at least one indirect block; and
upon receiving an indication of a requirement to pause the scrubbing:
pausing the scrubbing of the first dataset;
creating a bookmark recording of a last location within the first dataset that was scrubbed before pausing the scrubbing of the first dataset;
detecting at least one change among the plurality of datasets in the storage pool; and
performing a modification to one of the plurality of identifiers in the scrub queue in response to detecting the at least one change.

### Claim 2 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein scrubbing the first dataset comprises scrubbing only blocks having a birth time after a birth time of a previously scrubbed dataset.

### Claim 3 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein scrubbing the first dataset comprises validating that a checksum is correct, wherein the checksum is associated with at least one selected from a group comprising a data block and an indirect block.

### Claim 4 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein scrubbing the first dataset comprises resilvering at least one selected from a group comprising a data block and an indirect block.

### Claim 5 (depends on 1)

The non-transitory computer readable storage medium of claim 1, further comprising, upon completing the scrubbing of the first dataset:
removing the first identifier from the scrub queue.

### Claim 6 (depends on 5)

The non-transitory computer readable storage medium of claim 5, further comprising:
selecting a second identifier from the scrub queue, wherein the second identifier corresponds to the oldest dataset remaining in the scrub queue.

### Claim 7 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein the storage pool comprises at least one physical disk.

### Claim 8 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein each of the plurality of datasets is associated with a plurality of pointers comprising:
a snapshot pointer; and
a clones pointer.

### Claim 9 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein detecting the at least one change to the storage pool comprises detecting a deletion of the first dataset from the storage pool, and wherein performing the modification comprises:
determining, based on a snapshot pointer associated with the first dataset, a descendant dataset of the first dataset;
resetting the bookmark to a beginning of the descendant dataset; and
initiating a scrubbing of the descendant dataset according to the bookmark.

### Claim 10 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein detecting the at least one change to the storage pool comprises detecting a deletion of a second dataset from the storage pool, and wherein performing the modification comprises:
determining, based on a snapshot pointer associated with the second dataset, a descendant dataset of the second dataset;
replacing, within the scrub queue, an identifier corresponding to the second dataset with an identifier corresponding to the descendant dataset; and
resuming the scrubbing of the first dataset according to the bookmark.

### Claim 11 (depends on 8)

The non-transitory computer readable storage medium of claim 8, wherein detecting the at least one change to the storage pool comprises detecting a clone swap between the first dataset and a clone dataset, and wherein performing the modification comprises:
swapping an identifier of the first dataset with an identifier of the clone dataset;
resetting the bookmark to a beginning of the clone dataset; and
initiating a scrubbing of the clone dataset according to the bookmark.

### Claim 12 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein detecting the at least one change to the storage pool comprises detecting that a snapshot has been created from the first dataset, and wherein performing the modification comprises initiating a scrubbing of the snapshot according to the bookmark.

### Claim 13 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein detecting the at least one change to the storage pool comprises detecting that a snapshot has been created from a second dataset, wherein the second dataset is associated with an identifier loaded in the scrub queue, and wherein performing the modification comprises:
replacing, within the scrub queue, the identifier associated with the second dataset with an identifier associated with the snapshot; and
resuming the scrubbing of the first dataset according to the bookmark.

### Claim 14 (depends on 1)

The non-transitory computer readable storage medium of claim 1, wherein detecting the at least one change to the storage pool comprises detecting a clone swap between at least one dataset and a clone dataset, and wherein performing the modification comprises:
swapping an identifier of the at least one dataset with an identifier of the clone dataset; and
resuming the scrubbing of the first dataset according to the bookmark.

### Claim 15

A system, comprising:
a processor;
a computer readable storage medium having computer readable program code embodied therein, the computer readable program code adapted to, when executed by the processor, implement a method, the method comprising:
loading a scrub queue with a plurality of identifiers corresponding to a plurality of datasets to be scrubbed, wherein the plurality of datasets are stored in a storage pool;
selecting a first identifier from the scrub queue, wherein the first identifier corresponds to a first dataset, wherein the first dataset is an oldest dataset of the plurality of datasets;
initiating a scrubbing of the first dataset, wherein the first dataset is a hierarchical block tree (HBT) comprises:
a plurality of data blocks and at least one indirect block, wherein the indirect block comprises a first block pointer that references at least one of the plurality of data blocks, and wherein the first block pointer comprises a birth time associated with the at least one of the plurality of data blocks, and
a root block comprising a second block pointer referencing the at least one indirect block, wherein the second block pointer comprises a birth time associated with the at least one indirect block; and
upon receiving an indication of a requirement to pause the scrubbing:
pausing the scrubbing of the first dataset;
creating a bookmark recording of a last location within the first dataset that was scrubbed before pausing the scrubbing of the first dataset;
detecting at least one change among the plurality of datasets in the storage pool; and
performing a modification to one of the plurality of identifiers in the scrub queue in response to detecting the at least one change.

### Claim 16 (depends on 15)

The system of claim 15, wherein scrubbing the first dataset comprises validating that a checksum is correct, wherein the checksum is associated with at least one selected from a group comprising a data block and an indirect block.

### Claim 17 (depends on 15)

The system of claim 15, wherein the bookmark comprises the first identifier, an object identifier corresponding to a file in a dataset being scrubbed prior to pausing the scrubbing, a level identifier of the dataset being scrubbed prior to pausing the scrubbing, and a block identifier corresponding to the block within the level being scrubbed prior to pausing the scrubbing.
