Solved

Reduce LVM root partiton

Posted on 2010-09-03
5
442 Views
Last Modified: 2013-02-07
Hello,

I have the following LVM partition,

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      480G  164G  291G  37% /
/dev/sda1              99M   31M   64M  33% /boot
tmpfs                 4.0G     0  4.0G   0% /dev/shm
/usr/tmpDSK           485M   71M  389M  16% /tmp

As you can see it has 480G size and its used 164GB. I would like to resize that root partition to 200GB. How can I do so ?

Thanks.

Guilherme
0
Comment
Question by:maxihost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:l4ncel0t
ID: 33602380
You can't shrink online filesystem.
Make a backup,
boot on a rescue CD
use resize2fs to reduce you filesystem to 190GB
use lvreduce to reduce you volume to 200GB
then resize2fs to extend your filesystem to 200GB (It could be dangerous to try to align the 2 size by hand so doing this you are safe.)


reboot
0
 

Author Comment

by:maxihost
ID: 33603556
Hello,

Thank you very much. Could you please send me the full syntax for resize2fs and lvreduce based on my partition ?

Guilherme
0
 
LVL 4

Accepted Solution

by:
l4ncel0t earned 500 total points
ID: 33603965
resize2fs /dev/VolGroup00/LogVol00 190G
lvreduce -L200G /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00  (this last command will extend filesystem to 200GB)
0
 
LVL 4

Expert Comment

by:atech1
ID: 33604278
0
 

Author Comment

by:maxihost
ID: 33615139
Hello l4nce0t,

Booting with a Rescue CD and answering not to mount the root filesystem it wouldnt find the Volume Group to resize.

If I boot and answer to mount the file system it doesnt let met run the resize2fs. If I try to umount the filesystem it give invalid argument.

Any ideas ?
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question