Solved

LVM & device not found

Posted on 2006-10-30
2
1,110 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

695 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