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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-14-2006, 04:34 PM
|
#1
|
Member
Registered: Dec 2005
Posts: 41
Rep:
|
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?
|
|
|
08-14-2006, 06:43 PM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,340
|
Sounds like you're getting confused between logical and physical partition.
What does "fdisk -l" show now.
|
|
|
08-14-2006, 08:01 PM
|
#3
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
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.
|
|
|
08-15-2006, 10:33 PM
|
#4
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
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?
|
|
|
08-16-2006, 12:53 AM
|
#5
|
Senior Member
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151
Rep:
|
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.
|
|
|
08-17-2006, 07:15 PM
|
#6
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|