zoukankan      html  css  js  c++  java
  • CentOS7下的lvm(逻辑卷)在线扩容

    扩展前该lvm分区为14GB

    关闭系统,给sdb硬盘扩展6GB,然后重新进入CentOS。(或者是原有磁盘还有剩余未使用的空间)

    对sdb进行分区:

    [root@converter ~]# fdisk /dev/sdb
    

    更改分区格式为lvm,并保存退出。

    读取分区:

    [root@converter ~]# partprobe
    

    创建物理卷:

    [root@converter ~]# pvcreate /dev/sdb3
      Physical volume "/dev/sdb3" successfully created
    

    查看卷组:现卷组是14.5GB

    [root@converter ~]# vgdisplay
    

    进行卷组扩展:

    [root@converter ~]# vgextend centos /dev/sdb3 ## 将物理卷加入到卷组“centos”中
    

    现在看卷组centos

    查看当前逻辑卷

    [root@converter ~]# lvdisplay
    

    将将剩余百分百空间都添加到逻辑卷/dev/centos/root

    [root@converter ~]# lvextend -l +100%FREE /dev/centos/root
    

    再次查看逻辑卷,/dev/centos/root增加到了19.5GB

    [root@converter ~]# xfs_growfs /dev/centos/root    #重新识别一下分区大小
    或xfs_growfs /
    

    不用重启,lvm扩展完毕。

    附lvm逻辑卷扩展的相关命令。

    物理卷 卷组管理 逻辑卷管理
    pvscan vgscan lvscan
    pvcreate vgcreate lvcreate
    pvdisplay vgdisplay lvdisplay
    pvremove vgremove lvremove
    vgextend lvextend
  • 相关阅读:
    winform 窗体移动API、窗体阴影API
    winform 对话框、打印框
    winform 容器控件
    winform listview控件
    winform 计算器
    Winform 主窗体更换 构造函数传值
    Winform 菜单和工具栏控件
    0103 luffy项目配置
    0102 三大视图配置
    1230 视图家族类
  • 原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/15670365.html
Copyright © 2011-2022 走看看