美文网首页
centos7.6 扩容

centos7.6 扩容

作者: 上下而求索 | 来源:发表于2021-07-14 16:22 被阅读0次

    [root@localhost ~]# fdisk /dev/sdb
    欢迎使用 fdisk (util-linux 2.23.2)。

    更改将停留在内存中,直到您决定将更改写入磁盘。
    使用写入命令前请三思。

    Device does not contain a recognized partition table
    使用磁盘标识符 0x44217e13 创建新的 DOS 磁盘标签。

    命令(输入 m 获取帮助):n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p): p
    分区号 (1-4,默认 1):
    起始 扇区 (2048-104857599,默认为 2048):
    将使用默认值 2048
    Last 扇区, +扇区 or +size{K,M,G} (2048-104857599,默认为 104857599):
    将使用默认值 104857599
    分区 1 已设置为 Linux 类型,大小设为 50 GiB

    命令(输入 m 获取帮助):t
    已选择分区 1
    Hex 代码(输入 L 列出所有代码):8e
    已将分区“Linux”的类型更改为“Linux LVM”

    命令(输入 m 获取帮助):w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.
    正在同步磁盘。

    pvcreate /dev/vdb1 (报错-partprobe)

    vgdisplay
    vgextend centos /dev/vdb1

    lvdisplay
    lvextend /dev/mapper/centos-root /dev/vdb1

    centos6.9 resize2fs /dev/mapper/centos-root

    xfs_info /dev/mapper/centos-root
    xfs_growfs /dev/mapper/centos-root

    df -h

    相关文章

      网友评论

          本文标题:centos7.6 扩容

          本文链接:https://www.haomeiwen.com/subject/hibypltx.html