This Blog is intended to collect information of my various Intrests,pen my opinion on the information gathered and not intended to educate any one of the information posted,but are most welcome to share there view on them
Saturday, August 14, 2010
Resize Logical Volume (LV) in Linux
Here is the quick steps to Resize Logical Volume in Linux..
If you want grow (resize) 'logvolopt1' to 20GB
1. lvresize -L 20GB /dev/volgroup001/logvolopt1
2. lvdisplay - to confirm new size of logical volume
3. df -h - will still reveal the current size
4. Resize the file system to update the INODE table on the logical volume to account for the new storage in 'logvolopt1'
'resize2fs -f -p /dev/volgroup001/logvolopt1'
Note: You may resize file systems online if the following are met:
a. 2.6x kernel series
b. MUST be formatted with ext3
If you want to shrink (resize) 'logvolopt1' to 15GB
1. lvresize -L 15GB /dev/volgroup001/logvolopt1
3. df -h
4. resize2fs -f -p /dev/volgroup001/logvolopt1
Note: online shrinking is not supported
5. df -h
Note: Check disk utilization prior to shrinking to reduce the risk of losing data..
Hope these Quick HOWTO will help administrators for quick reference.