ZFS fast scrub: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
m (Text replacement - "<source" to "<syntaxhighlight")
Line 9: Line 9:


But it worked for me:
But it worked for me:
<source lang=bash>
<syntaxhighlight lang=bash>
# echo "zfs_scrub_delay/D" | mdb -k
# echo "zfs_scrub_delay/D" | mdb -k
zfs_scrub_delay:
zfs_scrub_delay:
Line 21: Line 21:


Remember to set it back to the old value later (4 in this example)!
Remember to set it back to the old value later (4 in this example)!
<source lang=bash>
<syntaxhighlight lang=bash>
# echo "zfs_scrub_delay/W4" | mdb -kw
# echo "zfs_scrub_delay/W4" | mdb -kw
zfs_scrub_delay:0x0            =      0x4
zfs_scrub_delay:0x0            =      0x4

Revision as of 17:37, 25 November 2021

fast scrub Kategorie:Solaris

NEVER DO THIS!!!


If you need a fast scrub to get to production state after an bloody hard unplanned downtime... and so on... I would expect you to not to do this.

But it worked for me: <syntaxhighlight lang=bash>

  1. echo "zfs_scrub_delay/D" | mdb -k

zfs_scrub_delay: zfs_scrub_delay:4

  1. echo "zfs_scrub_delay/W0" | mdb -kw

zfs_scrub_delay:0x4 = 0x0 </source>

This sets the scrub delay to zero... your system will do a lot of scrubbing and not so much other things.

Remember to set it back to the old value later (4 in this example)! <syntaxhighlight lang=bash>

  1. echo "zfs_scrub_delay/W4" | mdb -kw

zfs_scrub_delay:0x0 = 0x4 </source>

But remember I told you: NEVER DO THIS!!!