ZFS fast scrub: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "[[Kategorie:" to "[[Category:")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Kategorie:ZFS|fast scrub]]
[[Category:ZFS|fast scrub]]
[[Kategorie:Solaris]]
[[Category:Solaris]]


NEVER DO THIS!!!
NEVER DO THIS!!!
Line 16: Line 16:
# echo "zfs_scrub_delay/W0" | mdb -kw
# echo "zfs_scrub_delay/W0" | mdb -kw
zfs_scrub_delay:0x4            =      0x0
zfs_scrub_delay:0x4            =      0x0
</source>
</syntaxhighlight>


This sets the scrub delay to zero... your system will do a lot of scrubbing and not so much other things.
This sets the scrub delay to zero... your system will do a lot of scrubbing and not so much other things.
Line 24: Line 24:
# echo "zfs_scrub_delay/W4" | mdb -kw
# echo "zfs_scrub_delay/W4" | mdb -kw
zfs_scrub_delay:0x0            =      0x4
zfs_scrub_delay:0x0            =      0x4
</source>
</syntaxhighlight>


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

Latest revision as of 01:32, 26 November 2021


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:

# echo "zfs_scrub_delay/D" | mdb -k
zfs_scrub_delay:
zfs_scrub_delay:4

# echo "zfs_scrub_delay/W0" | mdb -kw
zfs_scrub_delay:0x4             =       0x0

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)!

# echo "zfs_scrub_delay/W4" | mdb -kw
zfs_scrub_delay:0x0             =       0x4

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