Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upShrinking disk images #2478
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Dec 3, 2016
Contributor
Tested above in a dispvm, but appears to be true for normal non-cow-backed vms too. Did not make isolated test specifically here, but observed that my VM which once held several install ISOs and no longer does still has a ~12gb private image.
|
Tested above in a dispvm, but appears to be true for normal non-cow-backed vms too. Did not make isolated test specifically here, but observed that my VM which once held several install ISOs and no longer does still has a ~12gb private image. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Dec 3, 2016
Contributor
Ah, well my dispvm's filesystems are not mounted with discard:
[user@fedora-23-dvm]~$ sudo mount | grep discard
[user@fedora-23-dvm]~$
But some other VMs are:
$ sudo mount | grep discard
/dev/xvdb on /rw type ext4 (rw,relatime,discard,data=ordered)
/dev/xvdb on /home type ext4 (rw,relatime,discard,data=ordered)
|
Ah, well my dispvm's filesystems are not mounted with discard:
But some other VMs are:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Dec 3, 2016
Contributor
Yeah nevermind... it does work after all.
[user@dom0 ~]$ qvm-ls -d | grep -E '(name|--|discard)'
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
name | on | state | updbl | type | label | priv-curr | priv-max | root-curr | root-max | disk |
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
discard-test | * | Running | | | red | 65 MB | 2048 MB | 7165 MB | 10240 MB | 132 MB |
[user@dom0 ~]$ qvm-run -p discard-test 'cat /dev/urandom >> garbage'
cat: write error: No space left on device
[user@dom0 ~]$ qvm-ls -d | grep -E '(name|--|discard)'
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
name | on | state | updbl | type | label | priv-curr | priv-max | root-curr | root-max | disk |
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
discard-test | * | Running | | | red | 1997 MB | 2048 MB | 7165 MB | 10240 MB | 2008 MB |
[user@dom0 ~]$ qvm-run -p discard-test 'rm garbage'
[user@dom0 ~]$ qvm-ls -d | grep -E '(name|--|discard)'
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
name | on | state | updbl | type | label | priv-curr | priv-max | root-curr | root-max | disk |
----------------------+----+---------+-------+-------+--------+-----------+----------+-----------+----------+----------+
discard-test | * | Running | | | red | 65 MB | 2048 MB | 7165 MB | 10240 MB | 153 MB |
Just isn't enabled everywhere.
|
Yeah nevermind... it does work after all.
Just isn't enabled everywhere. |
jpouellet commentedDec 3, 2016
•
edited
Edited 1 time
-
jpouellet
edited Dec 3, 2016 (most recent)
Qubes OS version (e.g.,
R3.1):R3.2
Affected TemplateVMs (e.g.,
fedora-23, if applicable):fedora-23, likely others
Expected behavior:
According to marmarek:
Actual behavior:
Unlinking files does not appear to shrink the reported disk image size.
Perhaps I'm misunderstanding the intended behavior?
Steps to reproduce the behavior:
Fill up /:
Unlink the crap:
Wait a while, still the same:
Related issues
#2132 (comment) -- suggestion to add warning and suggestion to increase size in new qubes-manager when disk is approaching full