LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-14-2006, 03:34 PM   #1
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Rep: Reputation: 15
Lightbulb how do I add partitions to drives that have Logical Volume (LVM) partitions?


I sucessfuly resized a LVM partition to make room for a fat32 partition. here is the output of lvm lvscan:
Quote:
ACTIVE '/dev/VolGroup00/LogVol00' [137.84 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
Since I have a 200GB hard drive, this should leave about 60GB for my fat32 partition, but when I try to make a new partition in parted, fdisk, or cfdisk, I get:
Quote:
No free sectors available
They all show that the Linux LVM partition is 199.04 GB

Why am I getting 2 different numbers, how big is my lvm partition REALLY, and how do I get my 60GB fat32 partition on there?
 
Old 08-14-2006, 05:43 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,126

Rep: Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985Reputation: 985
Sounds like you're getting confused between logical and physical partition.
What does "fdisk -l" show now.
 
Old 08-14-2006, 07:01 PM   #3
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
fdisk -l shows that the LVM partition is 199.04GB:
Quote:
Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
If the partition really is 200gb, how do I shrink it? I did lvm lvresize already.
 
Old 08-15-2006, 09:33 PM   #4
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
Okay, I have narrowed it down some. The problem is that, while I did resize the Logical Volume, I did not resize the Logical Volume Group. The bigger problem is that there is a command to resize a Logical Volume Group, it has not been implemented yet.

My question is, how in hell are you supposed to resize a VolGroup?
 
Old 08-15-2006, 11:53 PM   #5
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
Quote:
...there is a command to resize a Logical Volume Group, it has not been implemented yet.
What you need to do is to resize the physical volume using pvresize.

The command became available with the more recent lvm2 updates in FC5, CentOS4, Debian Etch and probably many other distros.

Quote:
My question is, how the micro$oft are you supposed to resize a VolGroup?
What distro are you using? Update the system and check whether pvresize is available. If not, then maybe itís time for a version upgrade.

Otherwise, you do it the olde fashioned way by backing up your installation, reformatting the drive and then restoring the installation.
 
Old 08-17-2006, 06:15 PM   #6
The MJ
Member
 
Registered: Dec 2005
Posts: 41

Original Poster
Rep: Reputation: 15
Well, I figured it out on my own. I had to
1 delete the swap partition in the volume group, then
2 back up the volume group's data, then
3 edit the backup so that the vg is smaller
4 restore the edited backup
5 recreate the swap file
6 calculate size of new vg and use that to update the partition table via fdisk

That was the hardes six steps I have ever done.
The ironic part is that when I created a partition for windows, and popped the windows disk in, The partitions were gone once again, and I was unable to restore the partitions with fdisk.

In short, it was all for nothing. Good thing I made a backup this time...


Thanks for all your help.
 
  


Reply

Tags
fat32, lvm, partition


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
Logical drives, and Primary Partitions Infernolinux Linux - Hardware 19 01-09-2006 07:44 PM
Partitions under LVM Volume Group won't mount after install jimisola Mandriva 4 11-16-2005 04:17 PM
cloning both partitions, dual boot system, master boot record, logical volume manager saranga2000 Linux - Hardware 3 01-10-2005 11:04 AM
How to add logical partitions in linux ? copernicus Linux - General 2 10-21-2003 07:05 AM
Need help to recover extended partitions/logical drives dwmass Linux - Hardware 1 11-06-2002 07:27 PM


All times are GMT -5. The time now is 09:52 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