mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-01-24 05:31:09 -05:00
Add information on reducing size of disk images
This commit is contained in:
parent
befa89a19a
commit
61f2fd7cda
@ -11,9 +11,18 @@ redirect_from:
|
|||||||
- /wiki/ResizeRootDiskImage/
|
- /wiki/ResizeRootDiskImage/
|
||||||
---
|
---
|
||||||
|
|
||||||
Resize Disk Image
|
Resizing Disk Images
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
By default Qubes uses thin volumes for the disk images. This means that space is not actually allocated for the volume until it is used. So a 2GB private volume with 100M of files will only use 100M.
|
||||||
|
This explains how you can have *many* qubes with large private volumes on quite a small disk. This is called over provisioning.
|
||||||
|
You should keep an eye on the disk-space widget to see how much free space you actually have,
|
||||||
|
|
||||||
|
It is easy to increase the size of disk images. There are risks attached to reducing the size of an image, and in general you should not need to do this.
|
||||||
|
|
||||||
|
Increasing the size of Disk Images
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
There are several disk images which can be easily extended, but pay attention to the overall consumed space of your sparse/thin disk images.
|
There are several disk images which can be easily extended, but pay attention to the overall consumed space of your sparse/thin disk images.
|
||||||
In most cases, the GUI tool Qube Settings (available for every qube from the Start menu, and also in the Qube Manager) will allow you to easily increase maximum disk image size.
|
In most cases, the GUI tool Qube Settings (available for every qube from the Start menu, and also in the Qube Manager) will allow you to easily increase maximum disk image size.
|
||||||
|
|
||||||
@ -24,7 +33,7 @@ In case of template-based qubes, the private storage (the /home directory and us
|
|||||||
If you are increasing the disk image size for Linux-based qubes installed from Qubes OS repositories in Qubes 4.0 or later, changing the settings above is all you need to do - in other cases, you may need to do more, according to instructions below.
|
If you are increasing the disk image size for Linux-based qubes installed from Qubes OS repositories in Qubes 4.0 or later, changing the settings above is all you need to do - in other cases, you may need to do more, according to instructions below.
|
||||||
See also the OS-specific follow-up instructions below.
|
See also the OS-specific follow-up instructions below.
|
||||||
|
|
||||||
### Resize disk image
|
###Increasing the size of Disk Images
|
||||||
|
|
||||||
Use either GUI tool Qube Settings (`qubes-vm-settings`) or the CLI tool `qvm-volume`.
|
Use either GUI tool Qube Settings (`qubes-vm-settings`) or the CLI tool `qvm-volume`.
|
||||||
Maximum size which can be assigned through Qube Settings is 1048576 MiB - if you need more, use `qvm-volume`:
|
Maximum size which can be assigned through Qube Settings is 1048576 MiB - if you need more, use `qvm-volume`:
|
||||||
@ -74,3 +83,28 @@ Qubes will automatically grow the filesystem for you on all AppVMs with Qubes pa
|
|||||||
Otherwise, you will see that there is unallocated free space at the end of your primary disk.
|
Otherwise, you will see that there is unallocated free space at the end of your primary disk.
|
||||||
You can use standard linux tools like `fdisk` and `resize2fs` to make this space available.
|
You can use standard linux tools like `fdisk` and `resize2fs` to make this space available.
|
||||||
|
|
||||||
|
Decreasing the size of Disk Images
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
The number shown for "storage max size" does not mean that the storage is really using that amount. In most cases you need not worry about the size shown.
|
||||||
|
If you have increased the max size, and do not need it, then you *can* reduce the allocated size, but there is a risk of data loss.
|
||||||
|
Remember you really dont need to do this.
|
||||||
|
|
||||||
|
You can create a new qube, copy your files in to the new qube, and delete the old qube. (Simple and effective.)
|
||||||
|
|
||||||
|
|
||||||
|
Or you can take the risk of reducing the size of the disk. For example, to reduce the private storage of qube1 to 1GiB:
|
||||||
|
Open a terminal in dom0:
|
||||||
|
```
|
||||||
|
qvm-shutdown qube1
|
||||||
|
sudo lvresize --size 1024M /dev/qubes_dom0/vm-qube1-private
|
||||||
|
```
|
||||||
|
|
||||||
|
If you have a SSD see [here][fstrim] for information on using fstrim.
|
||||||
|
|
||||||
|
[fstrim]: /doc/disk-trim
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user