#查看Free PE / Size可用空间 vgdisplay --- Volume group --- VG Name vg_data System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size 200.00 GiB PE Size 4.00 MiB Total PE 51199 Alloc PE / Size 43520 / 170.00 GiB Free PE / Size 7679 / 30.00 GiB VG UUID EQhiUt-Waj1-F3V2-cwej-2joz-oC3P-JMSFui #设置逻辑卷的大小 lvresize -L 40g /dev/vg_data/lv_oracle lvresize -L +20g /dev/vg_data/lv_oracle #检查磁盘错误,等待时间较长可以考虑跳过 e2fsck -f /dev/vg_data/lv_oracle #更新文件系统信息 resize2fs /dev/vg_data/lv_oracle #检查逻辑卷状态 lvdisplay vg_data LVM缩减
注意减少的大小,实施前umount逻辑卷