Solved

Reduce LVM root partiton

Posted on 2010-09-03
5
434 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

735 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