Skip to contentSkip to conversation

Extending an LVM-Partition

linux-lvm Kai Weber 3 participants 3 messages Jul 14, 2002

lore
Share & tools
lore

Kai Weber

author
#0 lore raw

Hi,

I read the "RAID extension" thread. I have a similiar problem but without RAID:

I have a hard disk with an setup like that

/dev/hda1 Linux LVM
/dev/hda2 ext2

I want to remove the hda2 partition and use the free space for LVM. I read in the HOWTO (or was it some FAQ) that 2 or more PV's on one hard disk are not a good idea. So I am searching for a way, to extend the LVM partition easily.

Or I ask for an "you can just add the PV hda2 and it does not matter, if there is another PV on this disk" advice.

Kai

#1 lore raw
Quoted 2 lines · Kai Weber

Or I ask for an "you can just add the PV hda2 and it does not matter, if there is another PV on this disk" advice.

It's ok to do this (I do this all the time with my regular setups:
install the system to a mini ext2 partition, make the rest LVM, move system to LVM, add former ext2 partition to LVM. As the installers nowadays support LVM this is nolonger needed, but when I started LVM no installer knew it).
It is only a bad idea when you want to try striping (for, I hope, obviouse reasons)

Signature · 4 lines
Goetz Bock       (c) 2002 as     blacknet.de - Munich - Germany   /"\
IT Consultant    GNU FDL 1.1    secure mobile Linux everNETting   \ /
                                                                   X
 ASCII Ribbon Campaign against HTML email & microsoft attachments / \
#2 lore raw
Quoted 5 lines · Goetz Bock
Quoted 3 lines · Kai Weber

Or I ask for an "you can just add the PV hda2 and it does not matter, if there is another PV on this disk" advice.

Quoted 8 lines

It's ok to do this (I do this all the time with my regular setups:
install the system to a mini ext2 partition, make the rest LVM, move system to LVM, add former ext2 partition to LVM. As the installers nowadays support LVM this is nolonger needed, but when I started LVM no installer knew it).
It is only a bad idea when you want to try striping (for, I hope, obviouse reasons)

The method I use is to make an initrd system
hda1 30Mb ext2 /boot
hda2 1G (or 2x memory) ext /
hda3 200Mb ext2 / (not used initially)
hda4 - the rest as an lvm partition.

I install to hda2 and hda1 until I get a base system which understands lvm (with debian woody this is quite a lot of effort!) Then I copy all genuine root stuff to hda3 and make lvm partitions for the rest which are then populated. Lilo is set to boot either hda2 or hda3 for safety and I test the hda3 boot sequence. Once happy I turn hda2 into a swap partition. Doing it this way I find have no worries about merging small partition bits back in.

Regards
Andy Baillie