LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-02-2006, 01:18 AM   #1
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Rep: Reputation: 15
Unhappy 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
 
Old 03-02-2006, 04:41 AM   #2
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
Hi,
pls help me out...
 
Old 03-02-2006, 04:20 PM   #3
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
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
 
Old 03-02-2006, 04:20 PM   #4
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
(it took out the spaces - root and swap are part of the lvm)
 
Old 03-02-2006, 11:47 PM   #5
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
Hi,
Thanks for your reply. But i want to know whether the above would work in Redhat Linux. Awaiting your reply .....
 
Old 03-02-2006, 11:54 PM   #6
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
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
 
Old 03-03-2006, 12:40 AM   #7
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
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....?
 
Old 03-03-2006, 09:19 AM   #8
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHEL, AltimaLinux, Rocky
Posts: 1,151

Rep: Reputation: 46
It should.
 
Old 03-03-2006, 10:52 PM   #9
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
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
 
Old 03-06-2006, 11:42 PM   #10
sambyte
Member
 
Registered: Feb 2006
Distribution: Redhat 9
Posts: 38

Original Poster
Rep: Reputation: 15
Hi,
Pls help me with my question.......

thanks in advance....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lvm ItsNotMe Linux - General 1 04-22-2005 07:17 AM
lvm Ammad Linux - General 2 02-22-2005 08:19 PM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
Lvm Kroenecker Linux - Newbie 1 12-29-2003 01:52 PM
Lvm BoonZie Linux - Newbie 3 01-02-2003 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration