diff options
author | Wesley Wiedenmeier <wesley.wiedenmeier@gmail.com> | 2016-08-28 17:56:17 -0500 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-09-30 13:21:00 -0400 |
commit | 1071b9940b4e114cd2eabf290b739f92fbab33de (patch) | |
tree | a8fbef15c5be9510df93b4544e3bca1f74e2f29a /cloudinit/config/cc_growpart.py | |
parent | 02f6c4bb8cef17b3fe04ef4dc1ef199e20aeb4d9 (diff) | |
download | vyos-cloud-init-1071b9940b4e114cd2eabf290b739f92fbab33de.tar.gz vyos-cloud-init-1071b9940b4e114cd2eabf290b739f92fbab33de.zip |
Improve module documentation and doc cleanup.
This adds lots of config module documentation in a standard format.
It will greatly improve the content at readthedocs.
Additionally:
* Add a 'doc' env to tox.ini
* Changed default highlight language for sphinx conf from python to yaml
most examples in documentation are yaml configs
* Updated datasource examples to highlight sh code properly
Diffstat (limited to 'cloudinit/config/cc_growpart.py')
-rw-r--r-- | cloudinit/config/cc_growpart.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py index 40560f11..a95e6c81 100644 --- a/cloudinit/config/cc_growpart.py +++ b/cloudinit/config/cc_growpart.py @@ -18,6 +18,63 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +""" +Growpart +-------- +**Summary:** grow partitions + +Growpart resizes partitions to fill the available disk space. +This is useful for cloud instances with a larger amount of disk space available +than the pristine image uses, as it allows the instance to automatically make +use of the extra space. + +The devices run growpart on are specified as a list under the ``devices`` key. +Each entry in the devices list can be either the path to the device's +mountpoint in the filesystem or a path to the block device in ``/dev``. + +The utility to use for resizing can be selected using the ``mode`` config key. +If ``mode`` key is set to ``auto``, then any available utility (either +``growpart`` or ``gpart``) will be used. If neither utility is available, no +error will be raised. If ``mode`` is set to ``growpart``, then the ``growpart`` +utility will be used. If this utility is not available on the system, this will +result in an error. If ``mode`` is set to ``off`` or ``false``, then +``cc_growpart`` will take no action. + +There is some functionality overlap between this module and the ``growroot`` +functionality of ``cloud-initramfs-tools``. However, there are some situations +where one tool is able to function and the other is not. The default +configuration for both should work for most cloud instances. To explicitly +prevent ``cloud-initramfs-tools`` from running ``growroot``, the file +``/etc/growroot-disabled`` can be created. By default, both ``growroot`` and +``cc_growpart`` will check for the existance of this file and will not run if +it is present. However, this file can be ignored for ``cc_growpart`` by setting +``ignore_growroot_disabled`` to ``true``. For more information on +``cloud-initramfs-tools`` see: https://launchpad.net/cloud-initramfs-tools + +Growpart is enabled by default on the root partition. The default config for +growpart is:: + + growpart: + mode: auto + devices: ["/"] + ignore_growroot_disabled: false + +**Internal name:** ``cc_growpart`` + +**Module frequency:** per always + +**Supported distros:** all + +**Config keys**:: + + growpart: + mode: <auto/growpart/off/false> + devices: + - "/" + - "/dev/vdb1" + ignore_growroot_disabled: <true/false> +""" + import os import os.path import re |