PDA

View Full Version : LVM resizing a PE?



craiger317
23rd May 2006, 08:05 PM
Hi there, I have a harddisk which has LVM setup on it. Basically what I had was 1 Logical Volume that spanned the entire size of the disk.

What I wanted to do was reduce this logical volume to 31Gs (there was 28G of data on it) and then remove the rest of the unused PE to a place outside of LVM as a separate partition.

So what I did was use resize2fs to get the filesystem down to 30Gs, then I ran lvreduce and reduced the logical volume to 31Gs. I now want to take the remaining 40+Gs and partition it outside of LVM, but it doesn't appear that there is a way to do this?

vgreduce removes a PE that is not being used, however I only have 1 PE which spans the entire disk.

Is there any utility that will alow me to reduce the size of a PE? Like are we talking Partition Magic time here? If I used partition magic, and made sure to reduce the partition to someting > the size of the LV would everything work out fine?

Thanks in advance for any help you can provide,

Craig

jlc
23rd May 2006, 08:27 PM
Once you have done the entire disk as LVM, I believe that you are stuck with the current setup.

http://tldp.org/HOWTO/LVM-HOWTO/

If it was a seperate physical disk connected using LVM than its a slightly different story.

craiger317
23rd May 2006, 08:55 PM
Once you have done the entire disk as LVM, I believe that you are stuck with the current setup.

http://tldp.org/HOWTO/LVM-HOWTO/

If it was a seperate physical disk connected using LVM than its a slightly different story.

Oiy vey. Yeah, I tried using "parted" on it by issuing a: "parted /dev/sda" and then printing the partition table. It shows the first partition fine (its just formated ext3 and was my /boot mount), but the second partion is where LVM is setup and parted just kinda goes "huh?" when I do a "parted /dev/sda2" and try to print the partition info because it doesn't recognize the filesystem (cause its LVM with embedded ext3 in the logical volumes)

So I am screwed aren't I?

Craig.

craiger317
23rd May 2006, 09:18 PM
Actually, my whole point of this exercise was to to get my data off my logical volume onto my windows drive via a USB enclosure. So I was going to move all the data from the LVM logical volume to an ext2 formated partition on the same drive so windows would be able to read it (using an ext2 file system driver).

Now I found this: http://www.chrysocome.net/explore2fs it doesn't integrate a file system driver right into windows, its a standalone application that allows you to browse and export data from ext2/3 even if they are in LVM.

Thank god, it saved me.

Craig.