• Centos7将/dev/mapper/centoshome磁盘空间转移到/dev/mapper/centosroot


    lvextend命令
    -L:指定逻辑卷的大小,单位为“kKmMgGtT”字节;
    -l:指定逻辑卷的大小(LE数)

    [root@localhost ~]# df -h
    文件系统 容量 已用 可用 已用% 挂载点
    /dev/mapper/centos-root 50G 1.3G 49G 3% /
    devtmpfs 1.9G 0 1.9G 0% /dev
    tmpfs 1.9G 0 1.9G 0% /dev/shm
    tmpfs 1.9G 9.0M 1.9G 1% /run
    tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
    /dev/sda1 1014M 148M 867M 15% /boot
    /dev/mapper/centos-home 46G 33M 46G 1% /home
    tmpfs 379M 0 379M 0% /run/user/0


    [root@localhost ~]# umount /home


    [root@localhost ~]# lvremove /dev/mapper/centos-home
    Do you really want to remove active logical volume centos/home? [y/n]: y
    Logical volume "home" successfully removed


    [root@localhost ~]# lvextend -L +50G /dev/mapper/centos-root
    Insufficient free space: 12800 extents needed, but only 11551 available


    [root@localhost ~]# lvextend -l +11551 /dev/mapper/centos-root
    Size of logical volume centos/root changed from 61.28 GiB (15688 extents) to 95.12 GiB (24351 extents).
    Logical volume centos/root successfully resized.


    [root@localhost ~]# xfs_growfs /dev/mapper/centos-root
    meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=3276800 blks
    = sectsz=512 attr=2, projid32bit=1
    = crc=1 finobt=0 spinodes=0
    data = bsize=4096 blocks=13107200, imaxpct=25
    = sunit=0 swidth=0 blks
    naming =version 2 bsize=4096 ascii-ci=0 ftype=1
    log =internal bsize=4096 blocks=6400, version=2
    = sectsz=512 sunit=0 blks, lazy-count=1
    realtime =none extsz=4096 blocks=0, rtextents=0

    ————————————————

    原文链接:https://blog.csdn.net/iteye_18762/article/details/116712640

  • 相关阅读:
    mysql数据库 --数据类型、约束条件
    并发编程 --线程
    并发编程 --进程
    MySQL数据库 --基础
    网络编程之 TCP-UDP的详细介绍
    网络编程之 OSI七层协议
    python 元类、单例模式
    python 面向对象_多态、内置方法、反射
    Python 面向对象_继承、组合
    简单工厂设计模式
  • 原文地址:https://www.cnblogs.com/walkersss/p/15928681.html
Copyright © 2020-2023  润新知