Is there a point of scrubbing after a resilver?

Status
Not open for further replies.

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Most of the material on zfs notes that resilvering is a form of scrubbing -- in at least that the data and parity data is re-read, recalculated, and written out to the resilvered drive.

But is the data that is written to the resilvered drive re-read to check that it was written correctly?

Is there any need to scrub after a resilver to make sure that the new drive is read/writing properly, or is this automatically done as part of the resilver?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
no need to scrub after a resilver. But you should be doing your standard maintenance scrubs.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You'd be better off forcing the new drive to do a SMART long test from the CLI. Scrub/resilvers only touch allocated areas of the disk.
 

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Thanks, will run:

sudo smartctl -t long /dev/ada0

after the resilver then.
 

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
...and the SMART self-tests, like the scrubs, should be scheduled to happen on a regular basis.

That's all good in principal but is there an official way of doing a long SMART self-test? What I did was:

sudo zpool offline mypool gptid/xxxxxxx-xxxx-xx-xxxxx-xxxxxxxxxxx
sudo smartctl -t long /dev/ada0

and then waited the 572 minutes for it to long self-test a 4TB volume. But I can do this because "mypool" is a zfs-2 and taking one drive offline is feasible. But what do other folks do? Do you cron the long self-tests? Or just dedicate one weekend a month to taking the whole pool offline?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That's all good in principal but is there an official way of doing a long SMART self-test? What I did was:

sudo zpool offline mypool gptid/xxxxxxx-xxxx-xx-xxxxx-xxxxxxxxxxx
sudo smartctl -t long /dev/ada0

and then waited the 572 minutes for it to long self-test a 4TB volume. But I can do this because "mypool" is a zfs-2 and taking one drive offline is feasible. But what do other folks do? Do you cron the long self-tests? Or just dedicate one weekend a month to taking the whole pool offline?
you're are making that way to complicated just use the gui.

http://doc.freenas.org/9.3/freenas_tasks.html#s-m-a-r-t-tests
 

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Hahaha, when did that (the GUI item) appear? :smile:
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Hahaha, when did that (the GUI item) appear? :)
You should never have to do anything outside of the gui, if you are then you are doing it wrong.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You should never have to do anything outside of the gui, if you are then you are doing it wrong.
That's probably an overstatement; there are plenty of things that can't be done from the GUI (like fixing upsd.conf, for example)--but if it can be done from the GUI, and SMART test scheduling certainly can, it should be.
 

RoboKaren

Contributor
Joined
Apr 8, 2014
Messages
130
Are we sure that resilver does a read-verify? I'm looking at the iostats for my resilver operation and it doesn't show any significant reads from that device (line 18: lots of writes, no reads):

Code:
/
/
/ Zpool iostat
/
                                           capacity     operations    bandwidth
pool                                    alloc   free   read  write   read  write
--------------------------------------  -----  -----  -----  -----  -----  -----
freenas-boot                            5.28G  9.22G      6      0  14.1K  1.42K
  mirror                                5.28G  9.22G      6      0  14.1K  1.42K
    gptid/xxxxxxxxxxxxx-8bc8-11e4-xxxx-xxxxxxxxxxxxx      -      -      4      0  8.35K  1.44K
    gptid/xxxxxxxxxxxxx-3ea1-11e5-xxxx-xxxxxxxxxxxxx      -      -      2      0  5.97K  1.44K
--------------------------------------  -----  -----  -----  -----  -----  -----
kiyoshi                                 3.33T   765G    586    100  55.7M   595K
  raidz2                                3.33T   765G    586    100  55.7M   595K
    replacing                               -      -    827     85  22.3M   368K
      gptid/xxxxxxxxxxxxx-dae0-11e3-xxxx-xxxxxxxxxxxxx      -      -    447     16  14.0M   157K
      gptid/xxxxxxxxxxxxx-a3ff-11e5-xxxx-xxxxxxxxxxxxx      -      -      0    685     13  22.6M
    gptid/xxxxxxxxxxxxx-a1e6-11e5-xxxx-xxxxxxxxxxxxx      -      -    152     10  14.1M   154K
    gptid/xxxxxxxxxxxxx-4028-11e5-xxxx-xxxxxxxxxxxxx      -      -    424     16  14.0M   155K
    gptid/xxxxxxxxxxxxx-a39c-11e5-xxxx-xxxxxxxxxxxxx      -      -    110    231  3.35M  10.8M
    gptid/xxxxxxxxxxxxx-7375-11e4-xxxx-xxxxxxxxxxxxx      -      -    152     10  14.1M   154K
    gptid/xxxxxxxxxxxxx-68a1-11e5-xxxx-xxxxxxxxxxxxx      -      -    155     11  14.1M   156K
--------------------------------------  -----  -----  -----  -----  -----  -----
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
In someways a scrub after a re-silver can be helpful. (If not already scheduled...)

Specifically;
  1. When using mirror with more than 1 source disk, (aka 3 way or more)
  2. When using RAID-Z2 or RAID-Z3
  3. To confirm the newly re-silvered data
For the first 2, I would assume a re-silver only reads one redundant source, and if
good, write the re-silvered data. So a re-silver is not a scrub.
 
Status
Not open for further replies.
Top