lvreduce and lvextend

Shankar Jha shankar.jha at gmail.com
Tue Mar 23 05:27:21 UTC 2010


Hi,

Resizing logical volumes:
Task-1: Resize 'logvolopt' to 20Gb
#lvresize -l 20GB /dev/volgroup001/logvolopt
#lvdisplay
#df -h
resize the file system to update the inode table on the logical volume
to account for new storage in 'logvolopt'
#resize2fs -p /dev/volgroup001/logvolopt

Note*-You may resize the file system online if the following are met:
a). 2.6xkernel series
b). must be formatted with ext3 format.

Task-2: Shrink(resize) 'logvolopt' to 15GB
#lvresize -L 15GB /dev/volgroup001 /logvolopt
#lvdisplay
#df -h
for online
#resize2fs -p /dev/volgroup001 /logvolopt
#df -h

Note*- Check disk utilization prior to shrinking to reduce the risk of
losing data.

Rgds,
Shankar

On Sat, Mar 20, 2010 at 12:55 AM, Eugene Vilensky <evilensky at gmail.com> wrote:
> On Thu, Mar 18, 2010 at 11:07 PM, Geofrey Rainey
> <Geofrey.Rainey at tvnz.co.nz> wrote:
>> Try running resize2fs first (reduce the filesystem), then use lvresize.
>> Then do the same for / but execute the commands in the other order. I
>> don't think either need to be umounted but if they do, fuser /var will
>> tell you what you
>> Need to stop to umount /var.
>>
>
> resize2fs can only shrink unmounted filesystems.
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>




More information about the redhat-list mailing list