LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-03-2013, 06:03 PM   #1
spankbot
Member
 
Registered: Aug 2007
Posts: 131

Rep: Reputation: 15
Easy way to re-size Centos 6 LVM partition layout


I have inherited Centos 6.3 box that has a default LVM layout like so..

/ = 35GB
/home = 800GB
/swap = 5GB

I need to shrink "/home" and grow "/" (more space is needed in /var/www)

I have backups and was just going to take the machine down, repartition, and restore data, but I was wondering if anyone was aware of a nice boot cd, or some other tool, that understands LVM and would make the process a little easier?

Can I simply use system-config-lvm?

Last edited by spankbot; 04-03-2013 at 06:09 PM.
 
Old 04-03-2013, 10:44 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
You can use the GUI, but the cli process is basically
Code:
# reducing eg /data to 128MB
df /data
umount /data
e2fsck -f /dev/vg0/data
resize2fs /dev/vg0/data 128M
lvreduce -L 128M /dev/vg0/data
mount /dev/vg0/data /data
df /data

# extend target lv
lvextend -L +128M /dev/vg0/data
resize2fs -p /dev/vg0/data
http://www.linuxtopia.org/online_boo...ion/index.html
http://linux.die.net/man/8/lvm

PS ALWAYS get a good backup (x 2) before messing with LVMs or partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Increase size of an encrypted LVM partition jjthomas Slackware 2 01-13-2013 04:10 AM
GFS clustered on LVM: error in partition size mizio79 Linux - Enterprise 1 11-12-2011 04:04 PM
Reduce LVM Partition size without any data loss viral_Ahire Linux - Software 1 04-11-2008 03:42 PM
RHEL4 - LVM Setup Partition Size sbababei Linux - Server 2 05-31-2007 02:36 PM
Reducing size of PV (partition) in LVM clacour Linux - General 2 10-24-2003 08:19 PM


All times are GMT -5. The time now is 09:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration