Clear a permanent ZFS error in a healthy pool

Solution 1:

Scrub your pool again (if you haven't already):

zpool scrub zstorage

That error is telling you that inode <0x9f115> is corrupt (deleting the file broke the filename->inode mapping, so it's just reporting the inode now). Either something still has the file open or the metadata just needs to be cleaned up (which a scrub should do).

To clear the error if a scrub won't you need to get down and dirty with zdb, which is not publicly documented by oracle (and poorly documented elsewhere) - and at any rate probably indicates something more fundamentally wrong.

Solution 2:

I know I'm super late to the party, but just wanted to add that if the additional scrubs don't fix issues like this, instead of looking at zdb you can instead just start a scrub, let it run for a couple minutes, and then stop it with zpool scrub -s zstorage. That will worked for me at clearing permanent errors for files when when all the read/write/checksum errors were at zero.

http://unixetc.co.uk/2012/01/22/zfs-corruption-persists-in-unlinked-files/

EDIT: After having to do this a few times I also realized that the timing of how long you let the scrub run will affect whether it works (depending on what blocks it does looks at first). So if it doesn't work at first, try a few more times and adjust the timing of when you stop it.

Tags:

Zfs

Zfsonlinux