[linux-lvm] Question about LVM2 and repartitioning

Wolfgang Liebich wolfgang.liebich at siemens.com
Fri Apr 29 09:34:31 UTC 2005


Hi,
I have a somewhat strange question about LVM2 on a Linux 2.6.11 kernel:
- When installing a new hard disk, I had to use some partitioning trickery to 
move my data from the old disk (partitioned and using LVM2) to the new one.
As a result, my partition scheme looked like this:
- a primary boot partition (not inside a  LVM container)
- a primary root partition (not inside a LVM container)
- an extended partition spanning the rest of the disk
-- inside of that a logical partition containing the primary LVM container
--- inside this LVM container, my main partitions (/home,/usr,...)
- some remaining logical partitions. This partitions were needed during the 
move, but now they can be killed.
I want to use the disk space from the remaining partitions for the one and 
only LVM2 container. If I add the partitions as new PVs, I can use the space 
alright, but I also lose some MBs due to these partitions not being exactly 
right sized (sorry, bad english, I know :-().
So I want to know if I can just do the following:
- remove the partitions not needed anymore
- resize the LVM2 partition to use the whole disk
- resize the LVM2 container.
Is this possible, or is it the smartest move for me to create one logical 
partition containing the rest of the disk and add that as a new PV, accepting 
that maybe some MB might be lost?
TIA,
Wolfgang Liebich




More information about the linux-lvm mailing list