Linux磁盘扩容

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:44

[root@stb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_stb-lv_u01 9.9G 6.5G 3.0G 69% /u01
[root@stb ~]# pvcreate /dev/sdc1
dev_is_mpath: failed to get device for 8:33
Physical volume "/dev/sdc1" successfully created
[root@stb ~]# vgextend vg_stb /dev/sdc1
Volume group "vg_stb" successfully extended

[root@stb ~]# lvextend -l +100%FREE /dev/vg_stb/lv_u01
Extending logical volume lv_u01 to 14.99 GiB
Logical volume lv_u01 successfully resized
[root@stb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_stb-lv_u01 9.9G 6.5G 3.0G 69% /u01
### lvextend扩展的是lv, df看到的是文件系统, 看来还需要扩展文件系统[root@stb ~]# resize2fs -p -F /dev/mapper/vg_stb-lv_u01
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/vg_stb-lv_u01 is mounted on /u01; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/mapper/vg_stb-lv_u01 to 3930112 (4k) blocks.
The filesystem on /dev/mapper/vg_stb-lv_u01 is now 3930112 blocks long.
[root@stb ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_stb-lv_u01 15G 6.5G 7.6G 46% /u01

本文标签:
本文标题:Linux磁盘扩容
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】