# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 7.9G 938M 6.6G 13% /
tmpfs 497M 0 497M 0% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-LogVol02 4.0G 136M 3.7G 4% /home
/dev/mapper/VolGroup-LogVol03 3.6G 72M 3.3G 3% /opt
# e2fsck -f /dev/VolGroup/LogVol02
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/VolGroup/LogVol02: 11/262144 files (0.0% non-contiguous), 51278/1048576 blocks
# resize2fs /dev/VolGroup/LogVol02 3092M
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/VolGroup/LogVol02 to 791552 (4k) blocks.
The filesystem on /dev/VolGroup/LogVol02 is now 791552 blocks long.
# lvresize -L 3092M /dev/VolGroup/LogVol02
WARNING: Reducing active logical volume to 3.02 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce LogVol02? [y/n]: y
Reducing logical volume LogVol02 to 3.02 GiB
Logical volume LogVol02 successfully resized
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 7.9G 938M 6.6G 13% /
tmpfs 497M 0 497M 0% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-LogVol02 3.0G 134M 2.7G 5% /home
/dev/mapper/VolGroup-LogVol03 3.6G 72M 3.3G 3% /opt
# vgdisplay
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 4
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc PE / Size 4743 / 18.53 GiB
Free PE / Size 251 / 1004.00 MiB
VG UUID EV2q3Q-ugwW-GpnF-xcnU-CVz0-To2q-urZt9G
注:其中的 && Free PE / Size 251 / 1004.00 MiB && 表示卷組中可分配空間
# lvextend -l +251 /dev/VolGroup/lv_root
Extending logical volume lv_root to 8.98 GiB
Logical volume lv_root successfully resized
3、重啓,系統光盤啓動到救援模式;不要配置網絡,不要讓系統根掛載到/mnt/sysp_w_picpath上,所以最後的界面選擇“skip”
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 8.9G 938M 7.5G 11% /
tmpfs 497M 0 497M 0% /dev/shm
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/VolGroup-LogVol02 3.0G 134M 2.7G 5% /home
/dev/mapper/VolGroup-LogVol03 3.6G 72M 3.3G 3% /opt
# vgdisplay
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 4
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.51 GiB
PE Size 4.00 MiB
Total PE 4994
Alloc PE / Size 4994 / 19.51 GiB
Free PE / Size 0 / 0
VG UUID EV2q3Q-ugwW-GpnF-xcnU-CVz0-To2q-urZt9G