Reduce LVM Partition Size
Environment
Wanna the resize the logical volumes
Procedures
Allow to control the availability of the logical volumes
Reference
- Ubuntu 9.04 x64
Wanna the resize the logical volumes
Procedures
Allow to control the availability of the logical volumes
#vgchange -a yCheck the logical volume before resizing
3 logical volume(s) in volume group "VolGroup00" now active
#e2fsck -f /dev/VolGroup00/LogVolume02Umount it and resize it to be the wanted size
e2fsck 1.41.4 (27-Jan-2009)
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/VolGroup00/LogVolume02: 75/9682944 files (13.3% non-contiguous), 6692532/38707200 blocks
#umount /media/LogVolume02Mount it back when successful
#resize2fs -f /dev/VolGroup/LogVolume02 70G
resize2fs 1.41.4 (27-Jan-2009)
Resizing the filesystem on /dev/VolGroup00/LogVolume02 to 18350080 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVolume02 is now 18350080 blocks long.
#lvreduce -L 70G /dev/VolGroup00/LogVolume02
WARNING: Reducing active logical volume to 70.00GB
THIS MAY DESTROY YOUR DATA (filesystem etc/)
Do you really want to reduce LogVolume02? [y/n]: y
Reducing logical volume LogVolume02 to 70.00GB
Logical volume LogVolume02 successfully resized
Reference
- http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/LVM-HOWTO.html#commontask