1.\" 2.\" CDDL HEADER START 3.\" 4.\" The contents of this file are subject to the terms of the 5.\" Common Development and Distribution License (the "License"). 6.\" You may not use this file except in compliance with the License. 7.\" 8.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9.\" or http://www.opensolaris.org/os/licensing. 10.\" See the License for the specific language governing permissions 11.\" and limitations under the License. 12.\" 13.\" When distributing Covered Code, include this CDDL HEADER in each 14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15.\" If applicable, add the following below this CDDL HEADER, with the 16.\" fields enclosed by brackets "[]" replaced with your own identifying 17.\" information: Portions Copyright [yyyy] [name of copyright owner] 18.\" 19.\" CDDL HEADER END 20.\" 21.\" 22.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 23.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. 24.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. 25.\" Copyright (c) 2017 Datto Inc. 26.\" Copyright (c) 2018 George Melikov. All Rights Reserved. 27.\" Copyright 2017 Nexenta Systems, Inc. 28.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 29.\" 30.Dd August 9, 2019 31.Dt ZPOOL-SCRUB 8 32.Os 33.Sh NAME 34.Nm zpool-scrub 35.Nd Begin a scrub or resume a paused scrub of a ZFS storage pool 36.Sh SYNOPSIS 37.Nm zpool 38.Cm scrub 39.Op Fl s | Fl p 40.Op Fl w 41.Ar pool Ns ... 42.Sh DESCRIPTION 43.Bl -tag -width Ds 44.It Xo 45.Nm zpool 46.Cm scrub 47.Op Fl s | Fl p 48.Op Fl w 49.Ar pool Ns ... 50.Xc 51Begins a scrub or resumes a paused scrub. 52The scrub examines all data in the specified pools to verify that it checksums 53correctly. 54For replicated 55.Pq mirror, raidz, or draid 56devices, ZFS automatically repairs any damage discovered during the scrub. 57The 58.Nm zpool Cm status 59command reports the progress of the scrub and summarizes the results of the 60scrub upon completion. 61.Pp 62Scrubbing and resilvering are very similar operations. 63The difference is that resilvering only examines data that ZFS knows to be out 64of date 65.Po 66for example, when attaching a new device to a mirror or replacing an existing 67device 68.Pc , 69whereas scrubbing examines all data to discover silent errors due to hardware 70faults or disk failure. 71.Pp 72Because scrubbing and resilvering are I/O-intensive operations, ZFS only allows 73one at a time. 74If a scrub is paused, the 75.Nm zpool Cm scrub 76resumes it. 77If a resilver is in progress, ZFS does not allow a scrub to be started until the 78resilver completes. 79.Pp 80Note that, due to changes in pool data on a live system, it is possible for 81scrubs to progress slightly beyond 100% completion. During this period, no 82completion time estimate will be provided. 83.Bl -tag -width Ds 84.It Fl s 85Stop scrubbing. 86.El 87.Bl -tag -width Ds 88.It Fl p 89Pause scrubbing. 90Scrub pause state and progress are periodically synced to disk. 91If the system is restarted or pool is exported during a paused scrub, 92even after import, scrub will remain paused until it is resumed. 93Once resumed the scrub will pick up from the place where it was last 94checkpointed to disk. 95To resume a paused scrub issue 96.Nm zpool Cm scrub 97again. 98.It Fl w 99Wait until scrub has completed before returning. 100.El 101.El 102.Sh SEE ALSO 103.Xr zpool-iostat 8 , 104.Xr zpool-resilver 8 , 105.Xr zpool-status 8 106