Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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....?
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.