Solved

LVM & device not found

Posted on 2006-10-30
2
1,096 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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now