When does "zpool scrub" delete files automatically?

Background is a general discussion about ZFS and the claim that in case of permanent errors to files, it automatically deletes files unless a correct copy is available. That sounded pretty wrong to me and has since been reduced to that this happens only when scrub is executed.

I've never read about that and the only cases when such things happened I found online have been in cases of checksum errors occurred, people deleted the corrupted files manually and ran scrub afterwards. The same source is even talking about having executed scrub the first time without any success, keeping the broken files in place. Removing storage for the files in case they have been manually deleted before makes totally sense of course. But the claim is that without the manual deletion scrub will delete the files automatically anyway.

The docs only talk about how files are handled if a working copy is available, but I don't read about any deletes:

For replicated (mirror or raidz) devices, ZFS automatically repairs any damage discovered during the scrub.

So, under which conditions does scrub delete things automatically? If at all.

Thanks!


Scrub never deletes anything. If it finds errors that are repairable, it repairs then. If they are not repairable, it reports them. It never, ever deletes anything under any circumstances.