-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Store volatile.img in separate location #1527
Comments
@v6ak: Just checking in. Did you happen to continue to do any work on this after your last update? Any further progress or findings you're willing to share with us would be much appreciated! |
It seems that it is up-to-date. As a quick hack for 3.0 (and probably also for 3.1, though it might require minor changes), it seems to work perfectly. A clean solution, would, however, require some code refactoring. As far as I remember, the current code for 3.0 (and probably also for 3.1) assumes that volatile.img is located in the VM's directory. I am not sure where are those assumptions made (it might be few places and is might be many different places as well), so I've decided to use the hacky symlink approach, which partially preserver the assumption of same directory for volatile.img. And I am totally unsure what changes are brought by 3.2/4.0 branches. Either there might be some refactoring that makes this change easier or there might be something that breaks my approach and makes it even harder to refactor the code. |
@v6ak, would you be willing to package your contribution according to our new package contribution procedure? |
Well, first of all, this modification works in 3.2 and older. In 4.0, LVM is used. AFAIU, there is no equivalent of volatile.img. Instead, there are COW shapshots that need to be stored in the same LVM VG. I have checked if I can add a volatile PV and add it to the VG, but this is a dead end, as LVM does not let me to control which PV is used for what data. So, I could have ended with volatile data stored on non-volatile PV (this beats the purpose) or non-volatile data on volatile PV (=> data loss and logical volume corruption).
Well, maybe even the current design can allow something like this in a limited way. We can just focus on swap and maybe /tmp, ignoring writes to /. But I would have to investigate it further.
|
Each VM still have volatile volume. By default it is used for swap only, but if root volume in template-based VM is read-only, then dm-snapshot within VM is used to for CoW layer (same as it was in R3.2). You can set |
Community Dev: @v6ak
PoC: https://gist.github.com/v6ak/d5d49375d59cfae8e455
Discussion: https://groups.google.com/forum/#!topic/qubes-users/X0BBZ-kfix0
@v6ak https://groups.google.com/d/msgid/qubes-users/1f975e13-45bb-4146-b651-a59b07560a29%40googlegroups.com
(...)
Linked message contains also PoC
Related to #904
The text was updated successfully, but these errors were encountered: