• 添加磁盘空间


    新增一块磁盘,将此磁盘加入 /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




  • 相关阅读:
    Ubuntu 16.04安装Guake Terminal终端(使用一键唤醒功能)
    MySQL查询count(*)、count(1)、count(field)的区别收集
    MySQL查询在一个表而不在另一个表中的数据
    Spring MVC中的拦截器/过滤器HandlerInterceptorAdapter的使用
    Spring mvc解析
    RestTemplate的一个请求过程,mark一下
    福袋开发迭代总结
    Rest分享
    写Markdown费事?Typora让你像写word一样行云流水,所见即所得。
    送你几个用起来很爽的Studio插件
  • 原文地址:https://www.cnblogs.com/Leo-Cjh/p/13561022.html
Copyright © 2020-2023  润新知