Ask Your Question
0

How to create the LVM physical and logical volumes on VM

asked 2014-05-14 10:50:10 -0500

anonymous user

Anonymous

updated 2014-05-15 02:54:09 -0500

Hello, I am installing OpenStack as VMs on top of VirtualBox.

I encountered the following error when I try to issue "pvcreate /dev/sdb" under Step 9 "Configure a Block Storage service node" of the Openstack Installation Guide for Ubuntu - IceHouse". The Block Storage service node is running Ubuntu 12.04. Any help is appreciated.

root@ubuntu:~# pvcreate /dev/sdb

Device /dev/sdb not found (or ignored by filtering).

To give you more info:

root@ubuntu:~# ls -al /dev/sd*

brw-rw---- 1 root disk 8, 0 May 14 08:33 /dev/sda    
brw-rw---- 1 root disk 8, 1 May 14 08:33 /dev/sda1    
brw-rw---- 1 root disk 8, 2 May 14 08:33 /dev/sda2    
brw-rw---- 1 root disk 8, 5 May 14 08:33 /dev/sda5



root@ubuntu:~# pvdisplay

  --- Physical volume ---

  PV Name               /dev/sda5    
  VG Name               ubuntu-vg    
  PV Size               23.76 GiB / not usable 2.00 MiB    
  Allocatable           yes    
  PE Size               4.00 MiB    
  Total PE              6082    
  Free PE               4    
  Allocated PE          6078    
  PV UUID               796TH9-veHR-Bs0D-Tb8k-qQRB-X7i4-zqXxso
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-15 01:43:51 -0500

rubicon gravatar image

updated 2014-05-15 01:45:14 -0500

How is the disk on this block storage node partitioned? Manual or automatic?

The way I did it for my disk was to do a manual partition on the node that is going to act as a block storage service.

I partitioned my disk into 3, one root, one swap and then the remaining on a third disk. Its from this one I make a physical volume with pvcreate and add it to the logical volume group.

pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               cinder-volumes
  PV Size               134.81 GiB / not usable 2.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              34510
  Free PE               31950
  Allocated PE          2560
  PV UUID               30GfWA-hImT-WQpY-upTR-oJXD-wTRe-rxDdbB

root@blockstorage:~# vgdisplay
  --- Volume group ---
  VG Name               cinder-volumes
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  48
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               134.80 GiB
  PE Size               4.00 MiB
  Total PE              34510
  Alloc PE / Size       2560 / 10.00 GiB
  Free  PE / Size       31950 / 124.80 GiB
  VG UUID               30mgki-i1DI-CSiC-nrAA-EWki-9eYa-EsqKZ1

root@blockstorage:~# vgs
  VG             #PV #LV #SN Attr   VSize   VFree  
  cinder-volumes   1   1   0 wz--n- 134.80g 124.80g

root@blockstorage:~# lvscan
  ACTIVE            '/dev/cinder-volumes/volume-b708a9d3-c692-4450-bb23-cffdc9129cec' [10.00 GiB] inherit

EDIT: This output looks terrible, how do you make it look like code? Im really bad.

EDIT: Fixed it.

edit flag offensive delete link more

Comments

Iam confused.

rubicon gravatar imagerubicon ( 2014-05-15 04:21:54 -0500 )edit

What you mean exactly ?
Do you understand my answer to you and instructions been placed in area bellow ? Please, confirm

dbaxps gravatar imagedbaxps ( 2014-05-15 04:44:34 -0500 )edit

My answer is directed to the person who made the main question. I dont see the relevance of your answer to my question. MY question to him was how he partitioned the disk when he installed the Ubuntu virtual machine in Virtualbox.

I hope this clears things up.

rubicon gravatar imagerubicon ( 2014-05-15 04:56:25 -0500 )edit

I just saw Step 9 "Configure a Block Storage service node". I misunderstood original question.

dbaxps gravatar imagedbaxps ( 2014-05-15 05:45:36 -0500 )edit

Thanks Rubicon.

I didn't do any partitioning on the Ubuntu. I simply downloaded the Ubuntu ISO and use VBox to boot it up. During the installation process, I recalled choosing LVM but I didn't customize any partitioning.

Can you show me steps by steps on how to partition the disk into 3, one root, one swap and then the remaining on a third disk, starting from /dev/sda5?

as2618 gravatar imageas2618 ( 2014-05-15 13:36:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-05-14 10:50:10 -0500

Seen: 5,212 times

Last updated: May 15 '14