Skip to content

Commit

Permalink
harmonized names for 'Resizing' things and improved Root Disk Size (Q…
Browse files Browse the repository at this point in the history
  • Loading branch information
bnvk committed Nov 19, 2015
1 parent 015758b commit 554e5fd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
4 changes: 2 additions & 2 deletions en/configuration/resize-disk-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ redirect_from:
- /wiki/ResizeDiskImage/
---

Resizing Disk Image
-------------------
Resize Disk Image
-----------------

There are several disk images which can be easily extended.
But pay attention to the overall consumed space of your sparse disk images.
Expand Down
46 changes: 29 additions & 17 deletions en/configuration/resize-root-disk-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,40 @@ redirect_from:
- /wiki/ResizeRootDiskImage/
---

Resizing `root.img` Size
--------------------------
Resize Root Disk Image
----------------------

The safest way to increase the size of `root.img` is to do it for a standalone
VM (qvm-create --standalone) - which has its own root filesystem
(copy of template, instead of smart sharing).
But it should also work for a normal template (as long as changes in the
template between reboots didn't exceed 10G).
The safest way to increase the size of `root.img` is to turn your TemplateVM into a StandaloneVM. Doing this means it will have it's own root filesystem *(StandaloneVMs use a copy of template, instead of smart sharing)*. To do this run `qvm-create --standalone` from `dom0` Konsole.

Replace the size and the path (name) of the template as wished and run your
modified command:
### Resize a StandaloneVM Root Image

```
truncate -s 20G /var/lib/qubes/vm-templates/fedora-21/root.img
```
In `dom0` Konsole run the following command (replace the size and path):

~~~
truncate -s 20G /var/lib/qubes/appvms/standalonevm/root.img
~~~

Then start your template or standalone VM and run:
Then start Terminal for this StandaloneVM and run:

```
~~~
sudo resize2fs /dev/mapper/dmroot
```
~~~

Shutdown the StandaloneVM and you will have extended the size of it's `root.img`


### Resize a TemplateVM Root Image

after that shutdown the template.
In `dom0` Konsole run the following command (replace the size and path):*Make sure changes in the TemplateVM between reboots didn't exceed 10G.*

~~~
truncate -s 20G /var/lib/qubes/vm-templates/fedora-21/root.img
~~~

Then start Terminal for this TemplateVM and run the following:

~~~
sudo resize2fs /dev/mapper/dmroot
~~~

Then you should have extended `root.img` in your VM/template
Shutdown the TemplateVM and you will have extended the size of it's `root.img`

0 comments on commit 554e5fd

Please sign in to comment.