2015-09-18 17:46:58 -04:00
|
|
|
---
|
|
|
|
layout: doc
|
2015-10-13 23:31:03 -04:00
|
|
|
title: Resize Root Disk Image
|
2015-10-28 18:14:40 -04:00
|
|
|
permalink: /doc/resize-root-disk-image/
|
2015-10-11 03:04:59 -04:00
|
|
|
redirect_from:
|
2015-10-28 18:14:40 -04:00
|
|
|
- /en/doc/resize-root-disk-image/
|
2015-10-11 03:04:59 -04:00
|
|
|
- /doc/ResizeRootDiskImage/
|
|
|
|
- /wiki/ResizeRootDiskImage/
|
2015-09-18 17:46:58 -04:00
|
|
|
---
|
|
|
|
|
2015-09-18 18:43:30 -04:00
|
|
|
Resizing \`root.img\` Size
|
|
|
|
--------------------------
|
2015-09-18 17:46:58 -04:00
|
|
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
Replace the size and the path (name) of the template as wished and run your
|
2015-09-18 18:43:30 -04:00
|
|
|
modified command:
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2015-09-18 17:46:58 -04:00
|
|
|
truncate -s 20G /var/lib/qubes/vm-templates/fedora-21/root.img
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2015-09-18 17:46:58 -04:00
|
|
|
|
|
|
|
Then start your template or standalone VM and run:
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2015-09-18 17:46:58 -04:00
|
|
|
sudo resize2fs /dev/mapper/dmroot
|
2015-09-26 19:00:33 -04:00
|
|
|
~~~
|
2015-09-18 17:46:58 -04:00
|
|
|
|
|
|
|
after that shutdown the template.
|
|
|
|
|
|
|
|
Then you should have extended \`root.img\` in your VM/template
|