zoukankan      html  css  js  c++  java
  • growpart增加磁盘分区空间


    centos安装growpart

    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
    sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
    yum search growpart
    yum install cloud-utils-growpart.x86_64


    ubuntu安装

    http://www.nonni.cn/index.php/20200403/cid=468.html
    sudo apt-get install cloud-initramfs-growroot

    调整分区

    growpart /dev/sda 2   增加第2个分区空间,一般对最后一个分区进行调整
    pvresize /dev/sda2
    lvextend -l +100%FREE /dev/mapper/centos-home
    resize2fs /dev/mapper/centos-home
    如果是xfs系统类型,需要执行
    xfs_growfs /dev/mapper/centos-home

    参考
    https://my.oschina.net/u/4113630/blog/4377160

    努力生活,融于自然
  • 相关阅读:
    [HNOI2012]矿场搭建
    舞蹈链
    POJ Apocalypse Someday
    扩展卢卡斯定理
    矩阵求逆
    RandomAccsiFile
    1.单例设计模式
    MySQL 7.多表操作
    IO流之Properties(配置文件)
    MySQL 6.子查询
  • 原文地址:https://www.cnblogs.com/regit/p/15735094.html
Copyright © 2011-2022 走看看