LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Shrinking an LVM partition (https://www.linuxquestions.org/questions/linux-software-2/shrinking-an-lvm-partition-353168/)

Sabre_X 08-14-2005 11:39 AM

Shrinking an LVM partition
 
I have WinXP installed on hda and i got a new hard drive and installed Fedora 4 on hdb. Well, now the LVM partition is taking up the entirety of the hard drive, and i cant figure out how to shrink it so i can have an NTFS partition on there. My original purpose for buying a new hard drive was to increase storage from windows, since i was running out of room. I dont want to have to wipe linux and repartition from scratch. I tried using PartitionMagic but it refuses to do anything but delete the 8E (LVM) partition. I looked around here for a while but couldnt find anything about shrinking LVM partitions. If i missed it, i apologize and would appreciate a link. Thanks in advance to anyone who helps this linux newbie.

malcart 08-15-2005 05:06 AM

Hi,

I don't think you're actually going to be able to do what you want to.

You haven't stated how you partitioned the second hard drive or how you setup the LVM.

In theory, provided you have multiple partitions on your drive, you will need to shrink the filesystem on the logical volume, then shrink the volume to free up space.

What filesystem are you using?

Are all of your files in one volume?

If you let me know I'll see if I can help.

jwhibdon 09-22-2005 03:23 PM

I have the same kind of problem except I want to install another Linux OS (Debian). I have two 120 gig hard drives. NTFS on hda and I installed FC4 on hdb. I told it to take over the entire drive. (at that point I had never heard of LVM) FC4 created a small boot partition and the rest of the drive is LVM. When I decided FC4 and I were mostly not meant for each other I wanted to install and try some different linux os's. I found out about LVM and can't figure any way to resize it. I have been reading about LVM for several days now and I guess I am to stupid to understand it. I know less now than before I started. Is there a simple fix or do I have to dump FC4 and start over.

malcart 09-26-2005 08:38 AM

Hi there,

You shouldn't need to dump FC4, but it may be less painful if you do.

You say that FC4 created a small boot partition, how big is it? (this will determine whether you can install another kernel image in that partition).

How many logical disks is the LVM partition split into? (if it is just one big partition then your job is so much easier)

and what filesystem is being used on the disks? (i haven't kept upto date with FC so I don't know if they default to EXT3 or reiser)

jwhibdon 09-26-2005 01:29 PM

Hi.

The boot partition is 102 Meg and is a ext3 partition type.

The LVM is all one partition as far as I can tell. As far as what type it just says 08(LVM). I have tried to use Acronis partition manager but it does not support that type partition.

Thanks

sundialsvcs 09-27-2005 09:17 AM

Pocket-sized USB 2.0 disk drives are a wonderous thing. :) I use one from DataStor. About $100. Also works with USB-1. Holds about 60 to 100 gig.

Buying a second disk-drive is also very, very handy and not too expensive, either. Many motherboards routinely have two disk-drive controllers built in, so it's really just a matter of cables and screws to install it.

jwf 09-30-2005 11:13 PM

Hi Folks,
I've been struggling with this same LVM issue. I want to install suse 9.3 without removing my Suse 9.1 install.
My Partitions look like:
Code:

Device              Size            F  Type
________________________________________________________
/dev/hda                  152.6 GB    6Y160P0     
/dev/hda1                  10.5 GB    Win95 FAT32 LBA
/dev/hda2                  101.9 MB    Linux native
/dev/hda3                  121.3 GB    Linux LVM   
/dev/hda4                  20.6 GB    Extended   
/dev/hda5                  502.0 MB    Linux swap 
/dev/hda6                  20.1 GB    Linux native
/dev/hdb                    37.2 GB    6L040L2     
/dev/hdb1                  31.4 MB    Dell Utility
/dev/hdab2                  37.2 GB    HPFS/NTFS     
/dev/VolGroup00            121.3 MB    LVM2 VolGroup00   
/dev/VolGroup00/LogVol00  120.7 GB    LV   
/dev/VolGroup00/LogVol01  512.0 MB    LV

Yast wants to load the install on /dev/hda6 - That's where suse 9.1 is installed and I'd like to keep that.
I'd like to know how to install suse 9.3 on /dev/hda3, but first Yast needs to have the Linux LVM removed from the
Volume group (/dev/VolGroup00) before it will format it. Is this possible?


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