[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

 

版权声明:本文为dbseeker原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/dbseeker/p/6369777.html