• 添加磁盘空间


    新增一块磁盘,将此磁盘加入 /home 空间下:

     

    [root@test1 home]# fdisk /dev/sdd
    Command (m for help): n
    Partition type:
       p   primary (0 primary, 0 extended, 4 free)
       e   extended
    Select (default p):
    Using default response p
    Partition number (1-4, default 1):
    First sector (2048-419430399, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-419430399, default 419430399):
    Using default value 419430399
    Partition 1 of type Linux and of size 200 GiB is set

    *.新建的分区似乎重启才会生效
    [root@test1 home]# pvcreate /dev/sdd
    Device /dev/sdd excluded by a filter.
    [root@test1 ~]# vgextend centos /dev/sdd1
    Volume group "centos" successfully extended
    [root@test1 ~]# lvresize -L +200g /dev/centos/home
    Size of logical volume centos/home changed from 1.04 TiB (273918 extents) to <1.05 TiB (274172 extents).
    Logical volume centos/home successfully resized

    此时 df -h
    /dev/mapper/centos-home  870G  401G  469G  47% /home


    重新识别 /dev/centos/home 的大小
    [root@test1 ~]# xfs_growfs /dev/centos/home
    meta-data=/dev/mapper/centos-home isize=512    agcount=4, agsize=57015808 blks
             =                       sectsz=512   attr=2, projid32bit=1
             =                       crc=1        finobt=0 spinodes=0
    data     =                       bsize=4096   blocks=228063232, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
    log      =internal               bsize=4096   blocks=111359, version=2
             =                       sectsz=512   sunit=0 blks, lazy-count=1
    realtime =none                   extsz=4096   blocks=0, rtextents=0
    data blocks changed from 228063232 to 280752128




  • 相关阅读:
    etcd:从应用场景到实现原理的全方位解读
    open-falcon编写的整个脑洞历程
    开源还是商用?十大云运维监控工具横评
    我的后端开发书架2015 2.0版
    【MDCC 2015】友盟数据平台负责人吴磊:移动大数据平台的架构与实践
    Effective Go
    Airbnb JavaScript Style Guide
    Google HTML/CSS Style Guide
    nservicebus教程-目录
    测试
  • 原文地址:https://www.cnblogs.com/Leo-Cjh/p/13561022.html
Copyright © 2020-2023  润新知