LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   LVM...pls help (https://www.linuxquestions.org/questions/linux-general-1/lvm-pls-help-420834/)

sambyte 03-02-2006 01:18 AM

LVM...pls help
 
Hi,

I need to know if a primary partion(other than /boot as converting it to LVM can cause the machine to stop functioning ) can be converted to LVM ? I tried this out with an logical partition under extended and it works fine. The steps are :
starting with #fdisk /dev/sda and then changed my partition id of that partition to 8e. After that pressing w
i type partprobe to save the changes. Next i create a PV with the command pvcreate /dev/sda3(3 for example).

Next #vgcreate vg0 /dev/sda3

Next #lvcreate -L 100M -n lv0 vg0

eveything is working fine as i can see with the commands like pvdisplay,lvdisplay,vgdisplay

The next step causes all the problem
#mke2fs -jv /dev/vg0/lv0

It gives me an error saying
"Cannot stat device " or " have you specified the device correctly "

This command works fine in an logical partition but in a primary partition it gives me the error.

pls help

sambyte 03-02-2006 04:41 AM

Hi,
pls help me out...

Cottsay 03-02-2006 04:20 PM

All of my fedora boxes have LVMs like this

*BOOT PARTITION
*LVM------------ROOT
SWAP

I've never tried converting before...you may need to update your bootloader on the change

Cottsay 03-02-2006 04:20 PM

(it took out the spaces - root and swap are part of the lvm)

sambyte 03-02-2006 11:47 PM

Hi,
Thanks for your reply. But i want to know whether the above would work in Redhat Linux. Awaiting your reply .....

WhatsHisName 03-02-2006 11:54 PM

A physical volume can be a primary or a logical partition. It shouldn’t matter.

Run lvscan and verify that the logical volume you created is active. The mke2fs command would fail if the logical volume is inactive. If it is inactive, run:

# vgchange -ay

sambyte 03-03-2006 12:40 AM

Hi,
Thanks for your reply. I also have one more query . Would the mke2fs command run for a newly created partition which does not have a mount point....?

WhatsHisName 03-03-2006 09:19 AM

It should.

sambyte 03-03-2006 10:52 PM

Hi,
I ran lvscan and it showed me as volgrp active. Then I again ran the command
mke2fs -jv /dev/vg0/lv0 . It gives me an error saying

"Couldn't Stat device /dev/vg0/lv0
Have You Specified The Device Correctly "

But surprisingly When i rebooted the machine it gives me an error saying
running fsck : /usr not clean .... because /dev/sda5 was mounted in /usr which i made into LVM.

My question is it is for sure that the command has worked but then why does it pop up those weird error messages ? This works fine for any other logical partition. Have the error messages have got something to do with the fact that the partition contained data ? Is this Because i am using a SATA hard disk ?
Pls Help

sambyte 03-06-2006 11:42 PM

Hi,
Pls help me with my question.......

thanks in advance....


All times are GMT -5. The time now is 06:02 AM.