WARNING: Reducing active and open logical volume to 282.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home? [y/n]: y
Reducing logical volume lv_home to 282.00 GiB
Logical volume lv_home successfully resized
[root@CentOS-78 /]#
[root@CentOS-78 /]# lvreduce -L 282G /dev/mapper/vg_centos-lv_homeWARNING: Reducing active and open logical volume to 282.00 GiBTHIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv_home? [y/n]: yReducing logical volume lv_home to 282.00 GiBLogical volume lv_home successfully resized
[root@CentOS-78 /]#我认为这个命令是将已经减少的100G空间拿到系统公共的区域,可以被其他分区加载和利用。
查询卷组的信息:
[plain] view plaincopyprint?
[root@CentOS-78 /]# vgdisplay
--- Volume group ---
VG Name vg_centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
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 465.27 GiB
PE Size 4.00 MiB
Total PE 119109
Alloc PE / Size 86472 / 337.78 GiB
Free PE / Size 32637 / 127.49 GiB
VG UUID 1k4ooN-RFV9-uyf1-uMYf-aERG-YaGs-ZNoSD6
[root@CentOS-78 /]# vgdisplay--- Volume group ---VG Name vg_centosSystem IDFormat lvm2Metadata Areas 1Metadata Sequence No 5VG Access read/writeVG Status resizableMAX LV 0Cur LV 3Open LV 3Max PV 0Cur PV 1Act PV 1VG Size 465.27 GiBPE Size 4.00 MiBTotal PE 119109Alloc PE / Size 86472 / 337.78 GiBFree PE / Size 32637 / 127.49 GiBVG UUID 1k4ooN-RFV9-uyf1-uMYf-aERG-YaGs-ZNoSD6
Filesystem at /dev/mapper/vg_centos-lv_root is mounted on /; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 12
Performing an on-line resize of /dev/mapper/vg_centos-lv_root to 46504960 (4k) blocks.
The filesystem on /dev/mapper/vg_centos-lv_root is now 46504960 blocks long.
[root@CentOS-78 /]# resize2fs -p /dev/mapper/vg_centos-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/vg_centos-lv_root is mounted on /; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 12
Performing an on-line resize of /dev/mapper/vg_centos-lv_root to 46504960 (4k) blocks.
The filesystem on /dev/mapper/vg_centos-lv_root is now 46504960 blocks long.5、再次查看分区大小
[plain] view plaincopyprint?