zoukankan      html  css  js  c++  java
  • cloudinit.sources.DataSourceNotFoundException: Did not find any data source

     

     

    apt install build-essential
    
    该命令将安装一堆新包,包括gcc,g ++和make。
    Cloud init 18.2安装
    cloud-init-18.2依赖python 3
     pip3 install -r cloud-init-18.2/requirements.txt
     python3 setup.py build
    python3 setup.py install --init-system systemd
    CentOS 7系列,执行以下命令:
    yum install cloud-utils-growpart -y
    Ubuntu 系列,执行以下命令:
    apt-get install cloud-guest-utils -y
    root@fh-ky:~# blkid
    /dev/sda1: LABEL="SYSBOOT" UUID="3171d7e2-c941-4f4c-87f4-4b25a0eb38cf" TYPE="ext4" PARTUUID="78863d5b-01"
    /dev/sda2: LABEL="SYSROOT" UUID="e57e5655-86c9-4a8c-bbda-b002c9040f30" TYPE="ext4" PARTUUID="78863d5b-02"
    /dev/sda5: UUID="a1144960-91c0-42c9-9a0d-b7efed398a27" TYPE="swap" PARTUUID="78863d5b-05"
    /dev/sda6: SEC_TYPE="msdos" UUID="9058-FA6F" TYPE="vfat" PARTUUID="78863d5b-06"
    root@fh-ky:~# df -lh
    Filesystem      Size  Used Avail Use% Mounted on
    udev             31G     0   31G   0% /dev
    tmpfs           6.2G   21M  6.2G   1% /run
    /dev/sda2        12G  1.6G  9.3G  15% /                 -------------------没有扩容到100G
    tmpfs            31G     0   31G   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs            31G     0   31G   0% /sys/fs/cgroup
    /dev/sda1       464M  106M  331M  25% /boot
    /dev/sda6       103M  548K  103M   1% /boot/efi
    tmpfs           6.2G     0  6.2G   0% /run/user/0

    root@fh-ky:~# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 111.8G 0 disk
    ├─sda1 8:1 0 487M 0 part /boot
    ├─sda2 8:2 0 11.8G 0 part /
    ├─sda3 8:3 0 1K 0 part
    ├─sda5 8:5 0 7.6G 0 part [SWAP]
    └─sda6 8:6 0 103M 0 part /boot/efi
    sr0 11:0 1 1024M 0 rom
    sr1 11:1 1 1024M 0 rom
    sr2 11:2 1 1024M 0 rom
    sr3 11:3 1 1024M 0 rom

    root@fh-ky:~# growpart -h
    growpart disk partition
       rewrite partition table so that partition takes up all the space it can
       options:
        -h | --help       print Usage and exit
             --fudge F    if part could be resized, but change would be
                          less than 'F' bytes, do not resize (default: 1048576)
        -N | --dry-run    only report what would be done, show new 'sfdisk -d'
        -v | --verbose    increase verbosity / debug
        -u | --update  R  update the the kernel partition table info after growing
                          this requires kernel support and 'partx --update'
                          R is one of:
                           - 'auto'  : [default] update partition if possible
                           - 'force' : try despite sanity checks (fail on failure)
                           - 'off'   : do not attempt
                           - 'on'    : fail if sanity checks indicate no support
    
       Example:
        - growpart /dev/sda 1
          Resize partition 1 on /dev/sda
    root@fh-ky:~# blkid
    /dev/sda1: LABEL="SYSBOOT" UUID="3171d7e2-c941-4f4c-87f4-4b25a0eb38cf" TYPE="ext4" PARTUUID="78863d5b-01"
    /dev/sda2: LABEL="SYSROOT" UUID="e57e5655-86c9-4a8c-bbda-b002c9040f30" TYPE="ext4" PARTUUID="78863d5b-02"
    /dev/sda5: UUID="a1144960-91c0-42c9-9a0d-b7efed398a27" TYPE="swap" PARTUUID="78863d5b-05"
    /dev/sda6: SEC_TYPE="msdos" UUID="9058-FA6F" TYPE="vfat" PARTUUID="78863d5b-06"


    root@fh-ky:~# growpart -h growpart disk partition rewrite partition table so that partition takes up all the space it can options: -h | --help print Usage and exit --fudge F if part could be resized, but change would be less than 'F' bytes, do not resize (default: 1048576) -N | --dry-run only report what would be done, show new 'sfdisk -d' -v | --verbose increase verbosity / debug -u | --update R update the the kernel partition table info after growing this requires kernel support and 'partx --update' R is one of: - 'auto' : [default] update partition if possible - 'force' : try despite sanity checks (fail on failure) - 'off' : do not attempt - 'on' : fail if sanity checks indicate no support Example: - growpart /dev/sda 1 Resize partition 1 on /dev/sda root@fh-ky:~# growpart -N /dev/sda 2 NOCHANGE: partition 2 could only be grown by 2046 [fudge=2048] root@fh-ky:~#
    2020-05-13 10:15:51,182 - util.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/sda', '2'] with allowed return codes [0] (shell=False, capture=True)
    2020-05-13 10:15:51,208 - util.py[DEBUG]: resize_devices took 0.037 seconds
    2020-05-13 10:15:51,208 - cc_growpart.py[DEBUG]: '/' NOCHANGE: no change necessary (/dev/sda, 2)
    2020-05-13 10:15:51,209 - handlers.py[DEBUG]: finish: init-network/config-growpart: SUCCESS: config-growpart ran successfully
  • 相关阅读:
    octotree神器 For Github and GitLab 火狐插件
    实用篇如何使用github(本地、远程)满足基本需求
    PPA(Personal Package Archives)简介、兴起、使用
    Sourse Insight使用过程中的常使用功能简介
    Sourse Insight使用教程及常见的问题解决办法
    github 遇到Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts问题解决
    二叉查找树的C语言实现(一)
    初识内核链表
    container_of 和 offsetof 宏详解
    用双向链表实现一个栈
  • 原文地址:https://www.cnblogs.com/dream397/p/12882847.html
Copyright © 2011-2022 走看看