-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permanent zpool errors after a few days of making natively encrypted zvol snapshots with sanoid #15837
Comments
I have the same issue with Debian 12 zfs version 2.2.4-1 Any update on this zfs bug? |
I had to migrate data back to an unencrypted pool since it was a constant problem. |
i understand but this is not the solution. there is a bug in zfs that is causing this. I hope the are looking at this problem soon as it is really anoying. |
Is it the same as #12014? Can you try ZFS 2.2.5 or later? |
No it is not fullt the same. After some time i also get corruption errors in my encrypted pool. However when i look for the files that are corrupted i get an empty list. If i then start a scrub cancel it after 1 procent, reboot and run a scrub again everything is normal again. With zfs version 2.2.5 i had the same issue. I did a upgrade to the latest zfs version. Hopefully it is gene with the latest version. |
With version 2.2.6 is still get the same errors after a couple of days with a native zfs encrypted pool. This bug is really anoying. |
I would say that it blocks us from using native encryption in production environments or any environment that is going to work longer than a couple of days with multiple replicating snapshots. Has anybody managed to replicate this bug in TrueNAS on Linux by any chance? |
I agree. I think i am going to create a new pool without native encryption. |
Is it known in what version this started? I'm still running Ubuntu 20.04 LTS with zfs 0.8.3 and not seeing this problem. But I'm currently sending only one encrypted dataset to another host and from there to a third host where there's multiple encrypted datasets. I'm doing it with pyznap. Maybe my use case is simple enough with only a single dataset to not trigger this, or it started in a later version. I dread updating to newer version when LTS updates end. |
I read an article a couple months ago mentioning a bug in recent openzfs related to encrypted datasets. In the meanwhile I forgot... Installed two servers running Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-45-generic x86_64) for two months now. OpenZFS is 2.2.2. The machines run a couple of VMs in qemu-kvm. Everything seemed to work fine, until a week ago I started cross-copying the encrypted volumes between each other using sanoid / syncoid for a failover scenario. There is process control to ensure that only one syncoid job runs at a time. Syncoid does not create snapshots itself but only shuffles the latest one to the other server. It took not even one day for the first "cannot iterate filesystems: I/O error" to arrive on one of the two servers. No problem on Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-177-generic x86_64) with OpenZFS 0.8.3, though. Since I was not really keen on reinstalling the servers with Ubuntu 20.04.6 LTS I migrated the volumes onto non-encrypted datasets and hope that this will do the job. @aaltonenp I think for the moment you are very well advised with Ubuntu 20.04 LTS. |
When will the issue be fixed? The latest version still has this problem......... |
@zfs team. Why are such critical bugs like this one months open. No fix? Still you push new versions of zfs. |
Cannot reproduce on a RHEL 9 system currently having ZFS 2.1.15, Sanoid 2.2.0 and running this OS since September 2022 |
Are you also using syncoid to replicate to other machine? I am having this issue every 5 days. |
No, I am replicating only via zfs send/recv |
Ok, I am using the following versions and os. Debian Bookworm ZFS VERSION alsobackports. zfs-2.2.6-1 sanoid version syncoid version Every 5 days syncoid stops replicating to the other machine because of io errors. My pool show errors however when i want to show what files are the problem with the -v option its an empty list. Ik i scrub 2 times the errors are gone.(first one needs to be canceled after 1 %) And ofcourse i am using native zfs encryption. i dont understand some people are having problems with this like me and others dont. |
What encryption and checksumming algo do you use? |
Hi i use encryption, aes-256-gcm Checksum is default. |
Okay, I will try to dig deeper into this thing. AES for ARM is also ongoing ;-) |
That would be great. I would be super of we get a fix for this problem. Thank you verry much. |
Ps if you need info from my system or if i can help with some info of some sort plsase feel free to ask. I am verry willing to help. |
Hi @mcmilk Did you find anything? Do you need any help with log files or so? Kind regards. |
Strangest thing here. normaly my system would create zfs errors (io) after a few days. always between 2 and 5 days. Now i set a --source-bwlimit=50M (syncoid) and now my system is not creating these errors now. My system is now running for almost 7 days without zfs errors. I will keep track of it and inform you if the issue returns or not. |
nevermind, Now 7 days uptime and the errors are here again. Time to reboot and scrub 2 times. i am reverting all to an unencrypted pool. Encryption is to buggy |
@ckruijntjens - I am sorry, the time for me on OpenZFS is very short again. |
No problem. I am reverting as we speak to a unencrypted pool. encryption is not trustworthy with zfs. The thing that i notice (maybe it will help @ troubleshooting) the errors only happen on encrypted pools where snapshot (sanoid) and syncoid is used. If sanoid or syncoid is not used the pool stays healthy and no io errors. |
@robn FYI |
Sure, I am willing to help in every way you need.
incuspool 1.03T 2.59T 1.12K 191 43.8M 4.92M What kind of hardware / architecture you have, does it use ECC ram? Kind regards, Chris |
@ckruijntjens can you please post sanoid conf file? |
Yes of course. This is the config file:
|
Thank you @amotin And Sorry. |
@Germano0 in the other github issue someone post that he switch from sanoid to zfsbackup and the issue is gone. Could the problem be sanoid / syncoid? that something there is not going wright. kind regards, Chris. |
I am creating 2 VMs with virtual disks trying to reproduce the same environment. |
Ok, I will wait on your findings with the 2 vm machines and sanoid / syncoid. The errors are showing after 4 to 5 days of using sanoid and syncoid. |
I noticed mention of bookmarks in addition to snapshots. I wonder if that the edge case which is causing the problems. |
i indeed always using bookmarks. |
It would be nice if other people who experience the issue mention if they use bookmarks to confirm our rule this out. If the issue ionly manifests on sender machine we don't actually need the receiver VM to reproduce, unless resumable send is at play, which looks like the case. That means to reproduce we would need to simulate broken connections between VMs. Is there indications that there was a broken connection and resumed send before the corruptions happened? I tried to reproduce that with two VMs without much luck. I wonder if something else is needed as well. Memory pressure on arc? Gang blocks? |
Hi, I am using bookmarks. Now i am trying without the bookmark option to see if it changes anything. I am using resume on zfs sends. I never see broken connections and resend on my system. Please bare in mind that the corruption only happens after 4 to 5 days. no matter how much data load there is on the pool. |
Is it possible to upload the |
Hi,
I never used bookmarks and experienced the issue. I was also using sanoid / syncoid,though. And always on the sending side. Unfortunately, I am not in a position right now, where I can try to reproduce the issue. I hope beginning next year I'll find some time and resources to give it another look. My short-term fix was just to create an unencrypted filesystem in the same pool and moving all volumes on it, and it never happened again. So, difficult to imagine for me, how hardware could trigger that. |
i agree. i dont think it is a problem with the bookmarks. |
Indeed now i am not using bookmarks and the error returns after 4 days. So bookmarks is not the issue. |
Could you do anything with the logs? |
Hi All, I read that if you are using raw sends the issue is not happening. I am now testing with raw sends to see if this works. If raw sends are working then i think there is something going on with te decryption before sending the data. I will keep you informed of the status. |
On my last look into this area I've noticed that dbuf layer unlike ARC is generally incapable to handle encrypted and unencrypted version of a buffer same time. I haven't found how it may happen, but I still worry it might be an issue. Would somebody find a repeatable way to trigger it, I'd be happy to dig in. |
I Now use a different approach with sanoid/syncoid. I use sendoptions to recusive send the snapshots. Now i dont have errors on the enrypted pool. Its now running 6 days without errors. before i always had errors within 5 days. I will keep you informed. |
Guys, I can confirm. If i use the following i get encryption errors within the 5 days. syncoid --recursive But when i use it like this the errors are not happening. syncoid --sendoptions="R" I am using it now to send it in raw mode. So now the errors are not happening anymore. |
Hi All, I got one question. Now that i am sending raw and with the sendoptions i cant not see the speed of the sending pool. How can i see the speed it is going? So what i mean. when i check journactl it is not showing any progress bar. If i do it manualy it shows a progress bar. |
A |
In my case zpool scrub was not always "clearing" the corruptions. |
Mine did on the first try, but it didn't take long to re-enter the corrupt state. I ultimately destroyed/created it and switched to raw send/recv streams and so far it has been fine. I just happened to be at the terminal to observe it fail the second time:
|
According to zfs-send manual "-R" stands for "--replicate" and not raw which would be "-w" or "--raw" option. Does it meant that you also adding "w" flag with the "R"? |
You are talking about how it would be possible to trigger the bug right away? In all of my attempts it always started to happened after a few days of sending a dozen of snapshots every hour. |
System information
Describe the problem you're observing
After about several days of making autosnapshots on slightly over then twenty natively encrypted zvols hourly scheduled sanoid cronjob starts making errors "cannot iterate filesystems: I/O error" while making snapshots. "zpool status -vx" command gives an output "errors: Permanent errors have been detected in the following files:" and then blank. Getting the same "cannot iterate filesystems: I/O error" errors while trying to list snapshots on some of the zvols. Currently I have about 16 zvols in such error state. Total amount of snapshots is slightly less than a thousand.
"zfs list -t snap -r tank0 | wc -l" command gives me 23 "cannot iterate filesystems: I/O error" lines and the result of 991 to be exact. No errors in dmesg found. This particular pool was made out of three mirrored WD SA500 SSDs which support trim/unmap on LSI controllers but similar results were observed on a different servers and disks.
At least four different servers with a similar setup were failing the same way. Previously I was getting similar issues with ZFS version 2.1.14 and kernel 6.1.69-gentoo-dist with a slight difference that "zpool status -vx" command was giving more detailed output with the list of exact failing snapshots and I could also see an increasing kcf_ops_failed counter using command "grep . /proc/spl/kstat/kcf/*". Later Gentoo marked ZFS 2.2.2 as a stable and I decided to try it one more time with a newer version.
Different server pools started to failure after 3 or 5 days of uptime. All of them had less than a thousand snapshots.
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
I couldn't find any related errors in system logs.
The text was updated successfully, but these errors were encountered: