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

Changing dispVM private storage has no effect #3519

Closed
3hhh opened this Issue Feb 2, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@3hhh

3hhh commented Feb 2, 2018

Qubes OS version:

4.0rc3

Affected TemplateVMs:

only debian 8 was tested

Steps to reproduce the behavior:

  1. Start a dispVM (named or unnamed) terminal
  2. Check sudo df -h in the dispVM terminal
  3. dom0: qubes-vm-settings [dispVM], edit the private storage to something larger and close
  4. Check sudo df -h in the dispVM terminal (resize2fs /dev/xvdb doesn't do anything neither)

Expected behavior:

Storage size changes at least until the dispVM is shut down.

Actual behavior:

Storage size doesn't change.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 5, 2018

Member

This is a bit tricky, because technically the same applies to root volume ("system storage") of TemplateBasedVM. Allowing change for DispVM:private would also allow it for TemplateBasedVM:root. And in both cases the change would be discarded (reset to original value) after VM shutdown. The difference is DispVM (in most cases) is removed then, but other VMs stays there. It is consistent with how TemplateBasedVM works - changes to root volume are discarded after VM shutdown. But IMO it still may be confusing.
@andrewdavidwong any advice on this?

Technically, it is easy to change it (allow resize) on LVM, might be impossible for file driver. But I wouldn't care about this case, file driver have limited functionality anyway. It's ok to support only some features in some storage drivers (as long as clearly communicated).

Member

marmarek commented Feb 5, 2018

This is a bit tricky, because technically the same applies to root volume ("system storage") of TemplateBasedVM. Allowing change for DispVM:private would also allow it for TemplateBasedVM:root. And in both cases the change would be discarded (reset to original value) after VM shutdown. The difference is DispVM (in most cases) is removed then, but other VMs stays there. It is consistent with how TemplateBasedVM works - changes to root volume are discarded after VM shutdown. But IMO it still may be confusing.
@andrewdavidwong any advice on this?

Technically, it is easy to change it (allow resize) on LVM, might be impossible for file driver. But I wouldn't care about this case, file driver have limited functionality anyway. It's ok to support only some features in some storage drivers (as long as clearly communicated).

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Feb 6, 2018

Member

This is a bit tricky, because technically the same applies to root volume ("system storage") of TemplateBasedVM. Allowing change for DispVM:private would also allow it for TemplateBasedVM:root. And in both cases the change would be discarded (reset to original value) after VM shutdown. The difference is DispVM (in most cases) is removed then, but other VMs stays there. It is consistent with how TemplateBasedVM works - changes to root volume are discarded after VM shutdown. But IMO it still may be confusing.
@andrewdavidwong any advice on this?

In 3.2, there's no need to change the volume size (user or root) of a DispVM (i.e. home directory storage in the DispVM is not limited to the DVM Template's max private storage size anyway), so this only becomes an issue in 4.x, right?

I think the proposed change would be fine. For most users, what matters is whether changes persist across VM restarts. For TemplateBasedVMs, root volume changes don't persist. For DispVMs, nothing persists. The proposed change would maintain that distinction, which is all most users care about. The users who might actually care that non-persistent TemplateBasedVM root volume size changes are possible are likely to be more advanced users trying to do special things, and we can point them to documentation that explains this.

Member

andrewdavidwong commented Feb 6, 2018

This is a bit tricky, because technically the same applies to root volume ("system storage") of TemplateBasedVM. Allowing change for DispVM:private would also allow it for TemplateBasedVM:root. And in both cases the change would be discarded (reset to original value) after VM shutdown. The difference is DispVM (in most cases) is removed then, but other VMs stays there. It is consistent with how TemplateBasedVM works - changes to root volume are discarded after VM shutdown. But IMO it still may be confusing.
@andrewdavidwong any advice on this?

In 3.2, there's no need to change the volume size (user or root) of a DispVM (i.e. home directory storage in the DispVM is not limited to the DVM Template's max private storage size anyway), so this only becomes an issue in 4.x, right?

I think the proposed change would be fine. For most users, what matters is whether changes persist across VM restarts. For TemplateBasedVMs, root volume changes don't persist. For DispVMs, nothing persists. The proposed change would maintain that distinction, which is all most users care about. The users who might actually care that non-persistent TemplateBasedVM root volume size changes are possible are likely to be more advanced users trying to do special things, and we can point them to documentation that explains this.

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 7, 2018

storage/lvm: fix resizing not persistent volumes
Even when volume is not persistent (like TemplateBasedVM:root), it
should be resizeable. Just the new size, similarly to the volume
content, will be reverted after qube shutdown.

Additionally, when VM is running, volume resize should affect _only_ its
temporary snapshot. This way resize can be properly reverted together
with actual volume changes (which include resize2fs call).

Fixes QubesOS/qubes-issues#3519

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 7, 2018

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Feb 7, 2018

@marmarek marmarek referenced this issue in QubesOS/qubes-core-admin Feb 7, 2018

Merged

Fix resizing volumes #192

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 4, 2018

Automated announcement from builder-github

The package qubes-core-dom0-4.0.24-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-4.0.24-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Mar 4, 2018

Closed

core-admin v4.0.24 (r4.0) #451

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package qubes-core-dom0-4.0.24-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-4.0.24-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment