zoukankan      html  css  js  c++  java
  • 阿里云在线扩容

    1、下载阿里扩展工具

    yum install -y cloud-utils-growpart
    2、查看现有硬盘大小
    fdisk -l 可以看到最上面的是 200GB
    [root@root /]# fdisk -l
    
    Disk /dev/vda: 200 GB, 200018364800 bytes, 402430400 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk label type: dos
    Disk identifier: 0x0008d73a
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/vda1   *        2048   419428351   209713152   83  Linux
    

      3、实际上用df -lh 查看的是 100GB

    [root@root /]# df -h
    Filesystem                       Size  Used Avail Use% Mounted on
    devtmpfs                         7.8G     0  7.8G   0% /dev
    tmpfs                            7.8G     0  7.8G   0% /dev/shm
    tmpfs                            7.8G  1.5M  7.8G   1% /run
    tmpfs                            7.8G     0  7.8G   0% /sys/fs/cgroup
    /dev/vda1                        100G   95G    5G  95% /
    tmpfs                            1.6G     0  1.6G   0% /run/user/0
    

      4、使用

    运行 growpart <DeviceName> <PartionNumber> 命令,调用 growpart 为需要扩容的云盘和对应的第几个分区扩容。

    growpart /dev/vda 1 ,表示为系统盘的第一个分区(/dev/vda1)扩容。

    [root@root /]# growpart /dev/vda 1
    CHANGED: partition=1 start=2048 old: size=104855519 end=104857567 new: size=402230400 end=402430400
    

      5、重设分区大小

    [root@root /]# resize2fs /dev/vda1
    resize2fs 1.42.9 (28-Dec-2013)
    Filesystem at /dev/vda1 is mounted on /; on-line resizing required
    old_desc_blocks = 3, new_desc_blocks = 4
    The filesystem on /dev/vda1 is now 13106939 blocks long.
    

      6、打完收工

  • 相关阅读:
    通道的理解
    系统安装-老毛桃
    ppt文字变图形
    关于android出现不能下载相关依赖包,解决办法
    关于字体图标的问题
    初始化小程序的第一个问题
    css盒子垂直居中的5种方式
    关于网页图标的引用--bootstrap4和ElementUI
    安装vue-cli缓慢问题
    基于SSM在线考试系统的核心功能,随机组卷的实现
  • 原文地址:https://www.cnblogs.com/bfyang5130/p/13231690.html
Copyright © 2011-2022 走看看