LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 07-12-2006, 02:07 PM   #1
zivota
Member
 
Registered: May 2005
Distribution: CENTOS
Posts: 91

Rep: Reputation: 15
Resizing / with LVM


Hi,

When I installed OS I used LVM and default partitioning scheme
/
swap

Now I added more memory and want to make swap bigger. Only way to do it is to reduce / and then after add that free space to swap. How do I resize /? Can I use LVM somehow?

OS - Centos 4.3
 
Old 07-12-2006, 02:35 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
if / and swap are both logical volumes then firstly you'd need to resize the filesystem, using something like resize2fs. once that's smaller you can then easily use lvresize to shrink to the filesystem inside it. once that's done, just use lvresize again to use the spare PE's for the swap partition. as far as the swap filesystem goes, it barely exists. i'd suggest taking the swap off the live environment with swapoff and then just use mkswap on the newly expanded lv. to be honest though i don't think you even need to do that, swapoff then swapon and it'd be bigger i *think*
 
Old 07-12-2006, 03:30 PM   #3
zivota
Member
 
Registered: May 2005
Distribution: CENTOS
Posts: 91

Original Poster
Rep: Reputation: 15
I qustion before I start.
I guess I have to umount / before I use resize2fs, correct? If so do I have to boot into single user mode or ... not sure?
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM: Resizing the root partition fulat2k Linux - General 6 01-08-2012 04:35 PM
Possible to change non-LVM to LVM? darthfoolish Linux - Software 2 08-01-2008 03:47 AM
Resizing a root LVM filesystem eigoteacher Linux - Newbie 7 08-23-2007 09:36 AM
Resizing an ext3 LVM Partition PenguinPwrdBox Linux - Software 1 09-04-2005 02:34 AM
Lvm BoonZie Linux - Newbie 3 01-02-2003 03:38 PM


All times are GMT -5. The time now is 01:17 AM.

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