LVM扩容

在线扩容

[root@liujunjun ~]# df -h
文件系统                        容量  已用  可用 已用% 挂载点
devtmpfs                        384M     0  384M    0% /dev
tmpfs                           400M     0  400M    0% /dev/shm
tmpfs                           400M  5.8M  394M    2% /run
tmpfs                           400M     0  400M    0% /sys/fs/cgroup
/dev/mapper/cl-root              19G  1.4G   18G    8% /
/dev/sda1                       283M  126M  139M   48% /boot
tmpfs                            80M     0   80M    0% /run/user/0
/dev/mapper/vgtest-vgtest_LV01   30G  247M   30G    1% /data
[root@liujunjun ~]# lvextend -L 35G /dev/vgtest/vgtest_LV01 
[root@liujunjun ~]# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/vgtest/vgtest_LV01
  LV Name                vgtest_LV01
  VG Name                vgtest
  LV UUID                62qwnI-NGDT-Cvat-ahw1-Kzvf-qfgT-fOcDYR
  LV Write Access        read/write
  LV Creation host, time liujunjun, 2020-12-13 06:48:47 -0500
  LV Status              available
  # open                 1
  LV Size                35.00 GiB
  Current LE             8960
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

 

[root@liujunjun ~]# xfs_growfs /dev/vgtest/vgtest_LV01
meta-data=/dev/mapper/vgtest-vgtest_LV01 isize=512 agcount=4, agsize=1966080 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=7864320, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=3840, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 7864320 to 9175040
[root@liujunjun ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/mapper/centos-root 19G 1.8G 18G 10% /
devtmpfs 475M 0 475M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 7.7M 479M 2% /run
tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/sda1 197M 111M 87M 56% /boot
tmpfs 98M 0 98M 0% /run/user/0
/dev/mapper/vgtest-vgtest_LV01 35G 33M 35G 1% /data
[root@liujunjun ~]#
resize2fs /dev/vg01/lv02        #此为ext分区格式的重载大小

 

posted @ 2020-12-13 20:04  星火撩原  阅读(86)  评论(0编辑  收藏  举报