Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.6/site-packages/cloudinit/config/__pycache__/ |
Upload File : |
3 ��b84 � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z ddlmZ eZ ddgdd �ZG d d� de�Zeje�Zdd � ZG dd� de�ZG dd� de�ZG dd� de�Zdd� Zdd� Zdd� Zdd� Zdd� ZdefdeffZdS ) a� 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 on which to run growpart 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 the ``mode`` key is set to ``auto``, then any available utility (either ``growpart`` or BSD ``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 existence 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:** always **Supported distros:** all **Config keys**:: growpart: mode: <auto/growpart/off/false> devices: - "/" - "/dev/vdb1" ignore_growroot_disabled: <true/false> � N)�log)�subp� temp_utils�util)� PER_ALWAYS�auto�/F)�mode�devices�ignore_growroot_disabledc @ s e Zd ZdZdZdZdZdS )�RESIZE�SKIPPED�CHANGED�NOCHANGE�FAILEDN)�__name__� __module__�__qualname__r r r r � r r �!/usr/lib/python3.6/cc_growpart.pyr U s r c C s� d }| dkr@x$t D ]\}}|� }|j� r|}P qW |s�td��nXi }xt D ]\}}|||<