-
Notifications
You must be signed in to change notification settings - Fork 46
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
Migrating to the in-kernel KVDO, or "Recovery journal is in the old format" #85
Comments
Sorry, the fix was to first replay the journal using a machine with old version of KVDO. (And shut down the vdo cleanly). |
Unfortunately, I have to reopen the issue because there is likely a bug related to the new version (in-kernel) of KVDO.
I have just lost two of my devices like that, and as I see, the only option now is a read-only rebuild, copying to another block device (which is R/W), and then a hard fsck — I bet with a moderate data loss. Other devices, which were not dirty back when I had old KVDO, are operating correctly and stable. |
A one more thing to note: the VDO stats are broken (in-kernel KVDO, the names of my devices are replaced with "****")
While we can live without the userspace VDO tools for some time, I believe that the issue (described in the post above) affecting dirty devices of old journal format is severe. It poses an unpredictable risk to the correctness of devices, especially for those who weren't warned about the issue in any way. |
Fix for the broken devicesSorry again, it turned out that the broken dirty devices were easily fixable by a forced «rebuild». They are now R/W, give no errors, and likely most (if not all) of the data is safe and untouched. |
Hi @thememika, can you share which version you were using prior to upgrading to the in-kernel version? I'm glad you were able to discover the I'd like for us to reproduce this situation so we can better understand it and figure out what needs to be done. Thanks, |
Hi @rhawalsh, thanks for your reply!
After that, I moved (from linux-6.8) to linux 6.9-rc2 with it's built-in KVDO. To reproduce the issue, you can simply:
Thanks! |
Hi @thememika. We'll take a look at it. Thank you for the report! Just to clarify, you did the forced rebuild on the old (8.2.3.3) version, or the in-kernel 6.9-rc2 version? |
Thanks for the attention, @rhawalsh. |
Hi @thememika, just wanted to give a quick update. I ran through a few scenarios, and I was able to reproduce what you're seeing. I'm still playing around with things to figure out how best to document this. However, the bottom line is to try and always make sure you're cleanly shutting down the VDO volume(s) before making any changes. Though in my testing from the 8.2.3.3 to 6.9-rc2 on Fedora Rawhide, I was able to repair the volume going both to and from either end after a dirty shutdown by using the My reproduction environment was done using an iSCSI target and two initiators.
I went through a few scenarios.
Scenario 1:
Scenario 2 is the same as Scenario 1, but with the initiators swapped. Scenario 3 replaced the step where VDO is gracefully stopped with a forced reboot via Scenario 4 is the same as Scenario 3, but with Initiators swapped, once again. |
I did a little bit more digging into the behavior that was experienced here, since just a basic 'unclean shutdown' shouldn't really render a VDO volume to require a forced rebuild. If I take the same setup as mentioned above, and set up a volume on a RHEL9 host, forcibly reset the host, and then let the system come back up, the VDO volume starts with an automatic recovery and no manual intervention required. It is specifically the act of trying to move the dirty volume from RHEL9 to the upstream version that causes this particular behavior. I don't believe this is particularly a new thing with VDO volumes. We've always had an "upgrade" when moving from one version to the next. Though, I can't say that I've seen the issue where simply attempting to start a dirty volume on the new version would cause it to require a force-rebuild. That's something I need to talk with the team about a bit more. |
First of all thank you for your efforts and work, this is just great! On the bright side: performance seems improved :) I went from 2000MB/s max throughput to 3500 (non vdo partition is still about 5000 MB/s though, so I guess there is some room left for improvements). Max IOPS is about 400000 which is in line with the non vdo partition. On the not so bright side: at first everyting just worked with 6.9 but after some onrelated reboots to the old dkms vdo and some fiddling with my system I too faced the read only problem mentioned above. What finally helped me was firstly I was lucky enough to have included the vdo userspace tools in my initramfs and second that I managed to figure out the right vdoforcerebuild command:
You can forget about that neo part :) But the rest seems important: you don't point it to your virtual combined LV device but rather to the underlying data LV ... right? In the end nothing was lost and I'm happy now 👍 Perhaps this is of use to others. |
That is correct. vdoforcerebuild, and most of the other userspace tools, must operate directly on the pool_data device. Thanks for your kind words, and I'm glad it's working out for you. |
After reading the 6.9-rc1 update notice from Linus, I was excited to know that KVDO has been finally merged to the Linux kernel.
But unfortunately, I'm not able to use any of my production VDO devices with it. The recovery journal is in old format, and as I got, there is no way to bring the devices up for r/w without re-creating them and copying terabytes of data.
I don't understand why you change the format of journal without writing a conversion code for it. What is the reason behind doing it?
I can't use the in-kernel KVDO because of that.
Is it true that everyone will now have to re-create the VDO devices from scratch, and copy all the data over?
The text was updated successfully, but these errors were encountered: