LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   resize LVM partition (https://www.linuxquestions.org/questions/linux-general-1/resize-lvm-partition-266390/)

bkesting 12-14-2004 02:44 PM

resize LVM partition
 
Hello,

I have a new Suse 9.2 server running and I want to learn how to work with LVM properly before I put the box into production. I have an LVM /tmp partition of 1.0 GB (did it intentionallyl to practice resizing) that I want to reduce. What are the proper steps to go about doing it? If someone could point me to a website or give me some good tips, I would appreciate it.

Thanks.

trickykid 12-15-2004 12:12 AM

Here are some generic instructions and proper steps to resizing LVM partitions, just plug in or change how your setup differs from this one, etc:

The example given would be for their /tmp directory giving them 4 more GB of space:

Code:

sudo umount /tmp
or the full path of the actual device mounted would be this command:
sudo umount /dev/rootvg/tmp
sudo lvextend --size +4g /dev/rootvg/tmp
sudo e2fsck -f /dev/rootvg/tmp
sudo resize2fs /dev/rootvg/tmp
sudo mount /tmp


bkesting 12-15-2004 08:16 AM

Cool......

Thanks.

dubya 06-17-2005 09:28 AM

Hi,

I know this thread is really old, but I just tried reducing a logical volume with the command:
Code:

lvreduce /dev/VolGroup00/LogVol02 --size <can't remember what size I reduced to>
and now when I try to boot, I get many errors and then get dropped to a shell. I get messages saying that the I have a bad super block on LogVol00 and that the partition table is corrupt.

I'm really not sure what to do since I don't have too much experience with logical volumes. I can boot and login with the rescue CD or login as root after I get these errors, so all is not lost, but I do have a lot of data on these volumes that I absolutely need to recover so you can understand that any help would be much appreciated.

Thanks.


All times are GMT -5. The time now is 06:14 AM.