Reducing a Logical Volume

check current size “lv00″

#  df -h
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/vg00-lvrooC5
                                           19G  2,5G   16G  14% /
/dev/sda1                             244M   28M  203M  12% /boot
tmpfs                                   3,8G     0  3,8G   0% /dev/shm
/dev/mapper/vg00-lv00
                                           15G  154M   14G   2% /mnt

umount filesystem (can not be mounted)

# umount /dev/mapper/vg00-lv00

optional:  check filesystem (recommended)

# e2fsck -f /dev/mapper/vg00-lv00
e2fsck 1.39 (29-May-2006)
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/mapper/vg00-lv00: 11/1966080 files (9.1% non-contiguous), 100898/3932160 blocks

reduce filesystem (new size 10G)

# resize2fs /dev/mapper/vg00-lv00 10G
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/mapper/vg00-lv00 to 2621440 (4k) blocks.
The filesystem on /dev/mapper/vg00-lv00 is now 2621440 blocks long.

mount  and check size filesystem

# mount /dev/mapper/vg00-lv00 /mnt/
# df -h
Filesystem                          Size  Used Avail Use% Mounted on
/dev/mapper/vg00-lvrooC5
                                          19G  2,5G   16G  14% /
/dev/sda1                            244M   28M  203M  12% /boot
tmpfs                                  3,8G     0  3,8G   0% /dev/shm
/dev/mapper/vg00-lv00
                                          9,9G  151M  9,2G   2% /mnt

check size Logical Volume

# lvdisplay /dev/vg00/lv00 | grep Size
  LV Size                15,00 GB

Reduce size Logical Volumen

# lvreduce -L 10GB /dev/vg00/lv00
WARNING: Reducing active and open logical volume to 10,00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce lv00? [y/n]: y
Reducing logical volume lv00 to 10,00 GB
Logical volume lv00 successfully resized

check new size

# lvdisplay /dev/vg00/lv00 | grep Size
LV Size                10,00 GB

Optional: Reduce Group Volume “vg00″

# vgreduce vg00 /dev/sdc5
  Removed “/dev/sdc5″ from volume group “vg00″