Solved

LVM & device not found

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
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.

932 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

12 Experts available now in Live!

Get 1:1 Help Now