ZFS zfs error 122 - any idea how to remove corrupted file?

Hello,

Since some time I have this issue with my zfs pools - getting error 122 for some files. I have several systems affected - FreeBSD 10.2 and 10.3.

These are FreeBSD vmware virtual machines and the storage below them is iSCSI - physical FreeBSD systems with zvol and istgt.
My best suggestion is that it's caused by packet loss, because my iSCSI network is mixed with the application network and sometimes there is a huge load.

I'm also getting lots of cksum errors, but no read, or write errors. Don't know how can this happen. There are none read, write and cksum errors on the physical storage systems.

When I get error 122 - it causes a file that cannot be read, moved or deleted. I've done several scrubs that have completed successfully, but the file is still there. Tried to export and then import the pool and this didn't help either.

All over the Internet there are topics with investigations what my cause this error, but there are none how to fix it.

My question: Does anybody knows If such error happen - how can I fix it? How can I delete this file, so a new file can be written with the same name and location?

Thank you in advance.
 
I don't think you can delete the file - the ZFS filesystem "locks" this file. You should copy the rest of the data off the zfs volume, builld a new one and copy the data back. Or simply restore from a backup. Maybe some zfs experts can chime in if this is incorrect.
As for you storage network - if you are having trouble because you run it on the same network as your network traffic, you should move your storage network to a separate network.
 
Thank you for the reply,

Do you have any idea if zfs send/receive will copy only the "Good" data, or it will copy the corrupted file too?

As for the network I know what I have to do, but so far just didnt't have the chance to do it :(
Probably when something more serious comes up I will do it on fire :D


Cheers
 
I don't have experience with zfs send / receive, but I would imagine that it would copy only the good data. If it will stop when it hits the corrupted file, or simply ignore it I don't know.
 
Back
Top