Operating System - Linux
1753490 Members
5181 Online
108794 Solutions
New Discussion юеВ

Re: Change linux partition to linux lvm partition

 
SOLVED
Go to solution
Dagmar Boelen
Frequent Advisor

Change linux partition to linux lvm partition

Hi,

I made a partition on my linux-machine. When a type pvcreate /dev/hda7 (name partition) it say the partition is the wrong type and doesn't create the partition. I checked and the partition is a linux partition and not a linux lvm partition. How should I change the partition into a lvm partition? I tried it with fdisk but I don't have enough knowledge of fdisk to get it working. Does anyone know the solution for this?
3 REPLIES 3
Jerome Henry
Honored Contributor
Solution

Re: Change linux partition to linux lvm partition

Hi,

Here is the way to it :

First check that /dev/hda7 is unmounted (I often do all this stuff by booting on CD1 and typing linux rescue to have system booted from CD, not HD).
Type fdisk /dev/hda to get into fdisk.
If hda 7 is not created yet (check it by typing 'p', it'll give you the list of partitions).
Type 'n' for new, make it logical, start from the point it suggests, and give it the size you want by selecting +1000M for example, to make it 1000 mebagytes.

Now it's created, and it's linux native. Type 't' to change paritition type. It asks about partition number, it's 7.
Linux LVM type is '8e', type this (you have full list of known paritions on typing 'L').
Then type 'w' to apply changes. Reboot.

You're done !

hth

J
You can lean only on what resists you...
Balaji N
Honored Contributor

Re: Change linux partition to linux lvm partition

hi
u already have a detailed reply. but still, here goes the official document from redhat.

http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/custom-guide/ch-lvm.html
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Caesar_3
Esteemed Contributor

Re: Change linux partition to linux lvm partition

Hello!

You should check that the partiton exist
with write parameters
use fdisk /dev/hda
check that the 7 partiton is exist with
type of LVM (8e)

Then use the pvcreate.

Caesar