2021-07-04 linux学习-硬盘的高级操作(四)之LVM技术-扩展逻辑卷

一 扩展逻辑卷

    1 检查挂载信息 df -hT|grep xiaofeng

[root@linuxprobe ~]# df -hT|grep xiaofeng
/dev/mapper/sonny-xiaofeng ext4      380M  2.3M  354M   1% /root/new_disk/lv/xiaofeng

    2 卸载逻辑卷  umount /dev/sonny/xiaofeng 

[root@linuxprobe ~]# umount /dev/sonny/xiaofeng

    3 扩展逻辑卷,扩展至800M  lvextend -L 800M /dev/sonny/xiaofeng

[root@linuxprobe ~]# lvextend -L800M /dev/sonny/xiaofeng
  Size of logical volume sonny/xiaofeng changed from 400.00 MiB (100 extents) to 800.00 MiB (200 extents).
  Logical volume sonny/xiaofeng successfully resized.

二 同步信息

    1 检查逻辑卷  e2fsck -f /dev/sonny/xiaofeng

[root@linuxprobe ~]# e2fsck -f /dev/sonny/xiaofeng 
e2fsck 1.44.3 (10-July-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sonny/xiaofeng: 11/102400 files (0.0% non-contiguous), 23456/409600 blocks

    2 同步信息  resize2fs /dev/sonny/xiaofeng

[root@linuxprobe ~]# resize2fs /dev/sonny/xiaofeng
resize2fs 1.44.3 (10-July-2018)
Resizing the filesystem on /dev/sonny/xiaofeng to 819200 (1k) blocks.
The filesystem on /dev/sonny/xiaofeng is now 819200 (1k) blocks long.

三 重新挂载

    1 挂载逻辑卷 mount -a

[root@linuxprobe ~]# mount -a

    2 检查挂载情况 df -hT|grep xiaofeng

[root@linuxprobe ~]# df -hT|grep xiaofeng
/dev/mapper/sonny-xiaofeng ext4      767M  2.5M  721M   1% /root/new_disk/lv/xiaofeng

   可见容量已经扩展,大功告成!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

鹅一只

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值