4、缩小文件系统到20G:
[root@VM_Moretv_java_01 ~]# resize2fs /dev/mapper/VolGroup-lv_home 20G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/mapper/VolGroup-lv_home to 5242880 (4k) blocks.
The filesystem on /dev/mapper/VolGroup-lv_home is now 5242880 blocks long.
5、缩小逻辑卷:
[root@VM_Moretv_java_01 ~]# lvreduce -L 20G /dev/mapper/VolGroup-lv_home
WARNING: Reducing active logical volume to 20.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 20.00 GiB
Logical volume lv_home successfully resized
7、查看vg大小:
[root@VM_Moretv_java_01 ~]# vgdisplay
--- Volume group ---
VG Name VolGroup
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 199.51 GiB
PE Size 4.00 MiB
Total PE 51074
Alloc PE / Size 18912 / 73.88 GiB
Free PE / Size 32162 / 125.63 GiB
VG UUID kbnkX4-Sd6E-lmu2-ygp9-lahU-jpKB-UYKo5G
9、调整文件系统大小:
[root@VM_Moretv_java_01 ~]# resize2fs /dev/VolGroup/lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/VolGroup/lv_root is mounted on /; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 11
Performing an on-line resize of /dev/VolGroup/lv_root to 45875200 (4k) blocks.
The filesystem on /dev/VolGroup/lv_root is now 45875200 blocks long.