-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
lvm: run blkdiscard before remove #267
Conversation
issue #5077
[See replies below - chris's code works, I just failed to reboot first.] Thanks Chris. I pulled the replacement lvm.py and installed it. Doesn't seem to be working for me: 2019-06-21 20:21:30,899 Removing volume private: qubes_dom0/vm-disp6977-private I did try adding a sudo before the blkdiscard but that didn't seem to make it work. Reverting the code to baseline stopped the error from appearing. Brendan |
The above exception looks unrelated to this change. It's rather QubesOS/qubes-issues#5105 |
[See replies below - chris's code works, I just failed to reboot first.] I created two large random files in the disposable VM. If I delete file #1 inside the VM I see discards. If I then shutdown the VM, I do not see discards. This is with both the pull request code as well as a modification to replace 'blkdiscard' with 'sudo', 'blkdiscard' Brendan EDIT: hmm, the tested VM has a private volume size of 16GB, which is also the discard IO max for LVs in the thin pool. Tried it again with a smaller private volume, but same results. Large discard activity on deletion of the first file inside the VM, little to no discard activity on shutdown of disposable VM. |
@brendanhoar If you leave data in a volume that will be removed, you should see discards then. For example: Add 50mb random data to domU /home/user, shutdown vm, then qvm-remove it. Simpler example: Add 50mb data to domU root fs i.e. '/testfile'. Then shutdown vm. When *root-snap is automatically removed you should see discards. |
Also note that code change won't take effect until some restart procedure has been done. I think a restart of qubesd.service is possible, but most reliable way is to reboot Qubes. |
Yeah, I was getting to that point. :) I'll let you know after I restart. |
I rebooted, with chris's version of lvm.py installed.
Then I started a disposable VM. Apparently, there's a lot of cleanup work going on during VM startups!
A VM terminal window was opened.
I noted a large number of discards issued to the hardware via the monitoring script.
Then I shutdown the disposable VM, and saw additional blkdiscards being issued via forkstat...
...as well as my monitoring script. Looks good to me! |
issue #5077