LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 09-17-2006, 09:52 AM   #1
sfo
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
How To Resize LVM Partition


Hi,

My goal is:

-to resize my existing LVM partition, so that I can install a second OS.

What I want to avoid:

-deleting the existing partition, and set it up all new.
-buying a new hard disk.

I've read a couple of message posts that said that this simply isn't possible, but I'm not willing to give up yet.

fdisk -f
Code:
Disk /dev/hda: 40.0 GB, 40038211584 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14        4867    38989755   8e  Linux LVM
df -hT
Code:
/dev/mapper/main-mvol
              ext3     15G  9.6G  3.9G  72% /
/dev/hda1     ext3     99M   12M   83M  13% /boot
tmpfs        tmpfs    252M     0  252M   0% /dev/shm
pvs
Code:
PV         VG   Fmt  Attr PSize  PFree
/dev/hda2  main lvm2 a-   17.97G 2.34G
lvs
Code:
  LV         VG   Attr   LSize  Origin Snap%  Move Log Copy%
  mvol       main -wi-ao 14.62G
  swap_space main -wi-a-  1.00G
Any help is appreciated.

Thanks,
Steve

Last edited by sfo; 09-17-2006 at 10:00 AM.
 
Old 09-17-2006, 11:39 AM   #2
keithweddell
LQ Newbie
 
Registered: May 2006
Posts: 9

Rep: Reputation: 1
This should be doable but make sure you backup first.

1. Reduce the size of the filesystem in the existing LV using resize2fs. If you don't do this first you will damage your data.

2. Resize the existing LV using lvreduce.

3. Create a new LV from the free space using lvcreate.

The man pages are pretty good on this.


Keith
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I resize LVM volume group? rconan Fedora 5 04-22-2009 07:45 PM
Is there a way to resize PVs in LVM 1.0.8? Ken-ji Linux - Software 0 02-12-2006 09:20 PM
resize LVM partition bkesting Linux - General 3 06-17-2005 09:28 AM
Resize existing and add another partition with LVM donv2 Linux - Newbie 3 04-27-2005 04:23 AM
Cant resize with LVM plz help sendas4 Linux - General 4 10-21-2004 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration