Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-79-2118680.1
Update Date:2018-02-07
Keywords:

Solution Type  Predictive Self-Healing Sure

Solution  2118680.1 :   Oracle ZFS Storage Appliance: Importance of a ZFS Pool Scrub  


Related Items
  • Sun ZFS Storage 7320
  •  
  • Oracle ZFS Storage ZS5-4
  •  
  • Oracle ZFS Storage ZS3-BA
  •  
  • Oracle ZFS Storage Appliance Racked System ZS4-4
  •  
  • Sun Storage 7210 Unified Storage System
  •  
  • Oracle ZFS Storage ZS3-2
  •  
  • Oracle ZFS Storage ZS3-4
  •  
  • Sun Storage 7410 Unified Storage System
  •  
  • Oracle ZFS Storage ZS5-2
  •  
  • Sun ZFS Storage 7420
  •  
  • Oracle ZFS Storage ZS4-4
  •  
  • Sun Storage 7310 Unified Storage System
  •  
  • Sun Storage 7110 Unified Storage System
  •  
  • Sun ZFS Storage 7120
  •  
Related Categories
  • PLA-Support>Sun Systems>DISK>ZFS Storage>SN-DK: ZS
  •  




In this Document
Purpose
Details
 What is a scrub?
 Why is a scrub necessary?
 How frequently should a scrub be run?
 How long does a scrub take to complete?
 What impact does a scrub have on the system?
 How is a scrub performed?
 Can the scrub process be automated?
References


Applies to:

Oracle ZFS Storage ZS5-2 - Version All Versions to All Versions [Release All Releases]
Oracle ZFS Storage ZS5-4 - Version All Versions to All Versions [Release All Releases]
Oracle ZFS Storage ZS4-4 - Version All Versions to All Versions [Release All Releases]
Sun ZFS Storage 7420 - Version All Versions to All Versions [Release All Releases]
Sun ZFS Storage 7320 - Version All Versions to All Versions [Release All Releases]
7000 Appliance OS (Fishworks)

Purpose

The purpose of this document is to explain the importance of scrub on Oracle ZFS Storage Appliance and discuss the frequency of scrubbing the pool.

 

Details

What is a scrub?

ZFS stores a checksum of each data block in its parent block pointer in a tree format. Scrub traverses each block of data on the pool and verifies the checksum and, if any inconsistency is detected, it tries to repair the same. Depending on the pool profile redundancy eg. mirror and RAIDz, ZFS will find the good copy of data and repair the corrupted block. Unlike other filesystem repair methods, a ZFS scrub can run while the filesystem is mounted and in use.

 

Why is a scrub necessary?

The most important features of a ZFS filesystem are the data integrity and self-healing capabilities. When we successfully write a block of data to a disk there is still a (very small) chance that blocks may be corrupted because of media errors. These blocks of data on the disk are even prone to silent data corruption that goes unnoticed by disk firmware. Further - these errors may increase over time and, without performing a read operation or scrub against that data, will remain undetected. Unless you are absolutely sure that you read 100% of your data frequently, you need to scrub the data pools.

 

How frequently should a scrub be run?

How often a scrub is run on your system depends on how frequently you read each block of data. Perform a scrub at least before the the expiration of your oldest backup to ensure you have a known restore point. A scrub should be run at least as often as your system's average disk failure frequency. Scrubs should be run at least as often as the oldest data in your pool is read. A safe recommendation is to observe the duration of the scrub on your pool and then plan to run the next scrub soon after the previous scrub has completed.

 

How long does a scrub take to complete?

The time taken by the scrub depends on the IO activity, amount of data, disk RPM and record size. Because of the extreme variability of these factors a scrub can complete as quickly as you issue the command or take as long as 8 months or more.
If your scrub is not making any progress, reference:

Sun Storage 7000 Unified Storage System: ZFS - Slow resilvering and/or zpool scrub (Doc ID 1164934.1)

ZFS Resilvering Can Take a Long Time to Complete (Doc ID 1470448.1)

Workflow - scrub_priority,V1.3.akwf - Adjusts the 'zfs_scrub_delay' kernel parameter

Workflow - scrub_priority,V1.6.akwf - Adjusts the 'zfs_scrub_delay' kernel parameter for OS8.6.6 and newer.

 

What impact does a scrub have on the system?

A scrub is run as a low-priority background process should not have a noticeable impact to your environment. At default the system waits until 40ms has passed since the last data access IO operation before performing a scrub IO operation.

If your system contains 300GB, 600GB or 900GB drives, and is running an OS release older than 8.6.12, reference this document before initiating a scrub:

Oracle ZFS Storage Appliance: 300GB, 600GB and 900GB Disk Firmware Upgrade to Address Excessive Unrecoverable Read Errors (Doc ID 2073735.1)

 

How is a scrub performed?

The only supported method for initiating a scrub is by doing so manually.

Oracle ZFS Storage Appliance: How to start a scrub (verify content/check for errors) on a data pool (Doc ID 2095473.1)

There is no option in BUI/CLI to scrub the system pool

Workflow - sysscrub.akwf - Scrub the system pool

 

Can the scrub process be automated?

The only supported method for initiating a scrub is by doing so manually.
It is possible to use an appliance workflow to automate the scrub process; however, authoring or modifying workflows is not a service provided by Oracle Support.

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x, Maintenance Workflows

Working Effectively With Oracle Support - Best Practices (Doc ID 166650.1)

If you desire Oracle assistance with creating a workflow for your environment, please engage Oracle Advanced Customer Services.

How can a Customer Engage Oracle Advanced Customer Service (ACS) ? (Doc ID 2154372.1)

The scheduled_scrub.akwf workflow is example of how scrub scheduling can be accomplished, running once every 12 weeks on a Sunday. It is provided as-is, with no warranty expressed or implied. Use it at your own risk.

Workflows can be added to your appliance using the "maintenance workflows" BUI screen.

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x, Uploading and Executing Workflows Using the BUI

Workflow schedules can be adjusted either in the workflow source or after upload.

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x, Coding Workflow Schedules

Oracle® ZFS Storage Appliance Administration Guide, Release OS8.7.x, Using a Scheduled Workflow

 

References

<NOTE:1496376.1> - Understanding the ZFS Pool Scrub Operation, Tuning Scrub Performance, and Troubleshooting Scrub Issues
<NOTE:2095473.1> - Oracle ZFS Storage Appliance: How to start a scrub (verify content/check for errors) on a data pool

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback