Solved

LVM & device not found

Posted on 2006-10-30
2
1,106 Views
Last Modified: 2013-12-15
I have an extra hard disk in my server that was formatted with extfs3 and mounted in the filesystem.  The drive has nothing on it and I'm not learning about setting up LVM partitions.  So I unmounted the partition /dev/sda1 and ran the command "pvcreate /dev/sda" but it tells me "Device /dev/sda not found".  Can't I just put the whole drive under LVM instead of just a partition?

0
Comment
Question by:phasevar
2 Comments
 
LVL 1

Accepted Solution

by:
q_shakur earned 500 total points
ID: 17838927
>>Can't I just put the whole drive under LVM instead of just a partition?<<
yes you can,
but first you have to know that using LVM assumes that the disk or disks you will be using do not have a formatted partition. In Linux you would use the fdisk to remove the partition, note that this thing will remove all the data, in your case there is nothing to lose your HD is empty and you dont use it at all.

next to use the whole disk in LVM, you can do this command :
# dd if=/dev/zero of=/dev/sda bs=1K count=1
see /dev/sda --> its your HD, be sure its the HD that you want to use, the above command will erase the partition table by zeroing the fist sector.
then type this command :
# blockdev --rereadpt /dev/sda
this will call block device ioctls with reread partition table for your /dev/sda HD

now as i think every thing is ok you can run the command :
# pvcreate /dev/sda
now should be no problem so you can continue by vgcreate, lvcreate ...
0
 

Author Comment

by:phasevar
ID: 17838992
Thanks!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question