Editing for style guide compliance

Signed-off-by: Evan Couzens <evan.couzens@intel.com>
This commit is contained in:
Evan Couzens
2018-01-25 12:35:58 -08:00
parent 95c7e1ec98
commit 7f52cf29ef
@@ -3,26 +3,26 @@
Increase Clear Linux image virtual disk size
############################################
Pre-built |CLOSIA| images come in different sizes, ranging anywhere
from 300M to 20G. This section shows you how to increase the size of your
pre-built |CL| image if you need more capacity.
Prebuilt |CLOSIA| images come in different sizes, ranging anywhere
from 300MB to 20GB. This section shows you how to increase the size of your
prebuilt |CL| image if you need more capacity.
Determine the pre-built image size
**********************************
Determine the prebuilt image size
*********************************
There are two methods you can use to find the virtual disk size of your
pre-built |CL| image.
There are two methods you can use to find the virtual disk size of your
prebuilt |CL| image.
The first method is to check the image's config JSON file located in the
`releases`_ repository. For example, to find the size of the
Hyper-V image version number 20450, you can follow these steps:
The first method is to check the image's config JSON file, located in the
`releases`_ repository. For example, to find the size of the
Hyper-V* image version number 20450, you can follow these steps:
#. Go to the `releases`_ repository.
#. Drill down into the `20450 > clear > config > image` directory.
#. Open the :file:`hyperv-config.json` file.
#. Locate the `PartitionLayout` key like this example. This one shows an
512MB for the EFI partition, 32MB for the swap partition, and 8GB for the
root partition.
#. Open the :file:`hyperv-config.json` file.
#. Locate the `PartitionLayout` key. This example shows a
512MB for the EFI partition, 32MB for the swap partition, and 8GB for the
root partition.
.. code-block:: console
@@ -39,42 +39,44 @@ Hyper-V image version number 20450, you can follow these steps:
"size" : "8G",
"type" : "linux" } ],
The second method is to simply boot up your :abbr:`VM (Virtual Machine)` and
execute the :command:`lsblk` command. Here's a sample output:
The second method is to simply boot up your :abbr:`VM (Virtual Machine)` and
execute the :command:`lsblk` command. Here's a sample output:
.. code-block:: console
.. code-block:: bash
# lsblk
.. code-block:: console
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 8.5G 0 disk
├─sdd1 8:1 0 512M 0 part
├─sdd1 8:1 0 512M 0 part
├─sdd2 8:2 0 32M 0 part [SWAP]
└─sdd3 8:3 0 8G 0 part /
As you can see, both methods show the pre-built Hyper-V image is about 8.5GB.
As you can see, both methods show the prebuilt Hyper-V image is about 8.5GB.
Increase virtual disk size
**************************
To increase the size of a pre-built image, follow these steps:
Follow these steps to increase the size of a prebuilt image:
#. Shutdown your VM, if it's running.
#. Use an appropriate hypervisor tool to increase the virtual disk size of
your VM.
#. Shutdown your VM, if it's running.
#. Use an appropriate hypervisor tool to increase the virtual disk size of
your VM.
#. Power up the VM.
#. Log into an account with root privileges.
#. Login to an account with root privileges.
#. Open a terminal emulator.
#. Add the |CL| `storage-utils` bundle to install the `parted` and
#. Add the |CL| `storage-utils` bundle to install the `parted` and
`resize2fs` tools.
.. code-block:: console
.. code-block:: bash
# swupd bundle-add storage-utils
#. Launch the :command:`parted` tool.
.. code-block:: console
.. code-block:: bash
# parted
@@ -85,38 +87,39 @@ To increase the size of a pre-built image, follow these steps:
.. code-block:: console
Warning: Not all of the space available to /dev/sda appears to be
used, you can fix the GPT to use all of the space (an extra ... blocks)
or continue with the current setting?
Warning: Not all of the space available to /dev/sda appears to be
used, you can fix the GPT to use all of the space
(an extra ... blocks) or continue with the current setting?
Fix/Ignore?
Fix/Ignore?
Enter :command:`fix`.
#. Enter :command:`resizepart [partition number]` where [partition number]
#. Enter :command:`resizepart [partition number]` where [partition number]
is the partition number you wish to modify.
#. Enter :command:`yes` when prompted.
#. Enter the new `End` size.
#. Enter the new `End` size.
.. note::
If you want a partition to take up the remaining disk space, just
enter the total size of the disk. The total disk size is shown
after the `Disk` label when you print the partitions table with
the :command:`p` command.
If you want a partition to take up the remaining disk space, just
enter the total size of the disk. When you print the partitions table
with the :command:`p` command, the total disk size is shown
after the `Disk` label.
#. Enter :kbd:`q` to exit `parted` when you're done resizing.
#. Enter :command:`resize2fs -p /dev/[modified partition name]` where
#. Enter :kbd:`q` to exit `parted` when you are finished resizing the
image.
#. Enter :command:`resize2fs -p /dev/[modified partition name]` where
[modified partition name] is the partition that was changed in `parted`.
Figure 1 below shows an example of increasing the size of a |CL| Hyper-V
image from 8.5GB to 20GB. The Hyper-V Manager was used prior to increase
the virtual disk size from 8.5GB to 20GB before performing the steps show
in Figure 1.
Figure 1 below shows an example of how to increase the size of a |CL|
Hyper-V image from 8.5GB to 20GB. Prior to the performing the steps shown
in Figure 1, we used the Hyper-V Manager to increase the virtual disk size
from 8.5GB to 20GB.
.. figure:: figures/increase-virtual-disk-size-1.png
:scale: 100 %
:alt: Increase root partition size example
Figure 1: Increase root partition size example
Figure 1: Increase root partition size example
.. _releases: https://download.clearlinux.org/releases/