-
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
Zvols get lost upon host startup and VM shut down #12712
Comments
It seems to be related to-, but distinct from #12507 (because the reproduction is different and happens much more often). |
I think that I've encountered the same bug on Fedora 35 w/ zfs-2.1.1. I've created a thread for discussing this problem here: Some of the text below has been pasted from one of my forum posts. Also, I've written a script which restores zvol links after they disappear. I regard this script as a workaround until a proper fix can be developed and released. See gzip'd attachment w/ script: When shutting down a VM, I've found that links under /dev/zvol/POOLNAME will sometimes disappear. (The actual /dev/zdX device does not get lost / go missing.) You stand a very good chance of reproducing the problem if you have a lot of virtual disks (in the form of zvols) assigned to the VM. In order to try to understand this problem better, I made a VM running Fedora 35. I assigned a total of 5 virtual disks to this VM, one for the OS and four others named D1, D2, D3, and D4. I gave each of D1..D4 a GPT partition table and partitioned them to have just one partition. During my testing, I did nothing more than start the VM, log in via ssh, and then run "shutdown -h now". At each step along the way, I'd look at the state of the zvol links on the virtualization host. This is what I saw... This is what the zvol links (should) look like on the virtualization host:
After starting the machine, nothing changes, so I won't show that. But after shutting it down, I see:
Note that the link for D4 is missing. When I attempt to power up the VM, this message pops up:
Of course, after running fix-zvol-links (see attachment), I can power on the VM again. I've conducted a number of trials similar to what's shown above. Sometimes none of the links are missing after shutdown. On some occasions all of the links were missing! When just a few are missing, it seems pretty random which are missing and which aren't. I haven't yet seen any links disappear when starting a VM; for me it only happens upon VM shutdown. Also, I've seen what may be a related problem involving zfs rename, but I'll file a separate bug report for that problem. |
I have not been able to reproduce this problem after applying the commit from #12759. |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
System information
Describe the problem you're observing
The zvols get missing randomly upon startup and virtual machine shutdown.
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: