Adding existing logical volumes to the list of virtual disks

Oct 24, 2009
54
1
6
I am migrating from an existing installation that was using LVM in raw format for the disk images. I added the VG. While I can modify the conf file for the vm to point to the vm it does not start up. how do I add the existing LV to the storage model?
 
I am migrating from an existing installation that was using LVM in raw format for the disk images. I added the VG. While I can modify the conf file for the vm to point to the vm it does not start up. how do I add the existing LV to the storage model?

did you get this article?
http://pve.proxmox.com/wiki/Storage_Model

try adding the volume group via web interface.
 
Here is my lvdisplay
only vm-101-disk-1 and vm-101-disk-2 are shown in the web interface

lvdisplay
--- Logical volume ---
LV Name /dev/raid/vmtest
VG Name raid
LV UUID yzQ6fP-Ey7U-2Cnb-Clba-1YUf-o4nG-K74DHt
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GB
Current LE 12800
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:3

--- Logical volume ---
LV Name /dev/raid/isos
VG Name raid
LV UUID Q16klr-i69c-UmEr-shcj-yyNO-WD8R-2I1O81
LV Write Access read/write
LV Status available
# open 0
LV Size 200.00 GB
Current LE 51200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4

--- Logical volume ---
LV Name /dev/raid/gentoo-hardened-template
VG Name raid
LV UUID 32F5qZ-x8DP-QedU-cdqQ-bqCE-B80a-0r0Afe
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:5

--- Logical volume ---
LV Name /dev/raid/library-os
VG Name raid
LV UUID PXZIWQ-bnpN-foxo-Qq3e-jSSb-mBuf-slSsO0
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:6

--- Logical volume ---
LV Name /dev/raid/library-media
VG Name raid
LV UUID XrH2g5-GKPQ-aSIU-iX9W-0R7k-iZ6p-RC3Rmb
LV Write Access read/write
LV Status available
# open 0
LV Size 4.00 TB
Current LE 1048576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:7

--- Logical volume ---
LV Name /dev/raid/http
VG Name raid
LV UUID AR6Ibr-g32p-WAl3-plMp-7aly-NLtv-W1igBq
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:8

--- Logical volume ---
LV Name /dev/raid/bug2000
VG Name raid
LV UUID 8K79IE-TJ9X-h7cQ-V9ol-99Fz-EEeG-PNYS30
LV Write Access read/write
LV Status available
# open 0
LV Size 50.00 GB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:9

--- Logical volume ---
LV Name /dev/raid/vyatta-test
VG Name raid
LV UUID r2Mk83-CMRs-sJ9O-mA7f-nxFm-q9oK-5RdmOg
LV Write Access read/write
LV Status available
# open 0
LV Size 10.00 GB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:10

--- Logical volume ---
LV Name /dev/raid/vm-101-disk-1
VG Name raid
LV UUID cw3E3L-s8mr-OVOY-Cv7y-4SHL-kTme-uyK9a4
LV Write Access read/write
LV Status available
# open 0
LV Size 1.00 GB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:11

--- Logical volume ---
LV Name /dev/raid/vm-101-disk-2
VG Name raid
LV UUID AgNiS6-ewTU-UkZ0-3For-s191-nik1-MVi9Nu
LV Write Access read/write
LV Status available
# open 0
LV Size 1.00 GB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:12

--- Logical volume ---
LV Name /dev/pve/swap
VG Name pve
LV UUID Dy1wyM-xS20-5vvs-NLve-udOG-VoNH-2Mdt7Q
LV Write Access read/write
LV Status available
# open 1
LV Size 11.00 GB
Current LE 2816
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

--- Logical volume ---
LV Name /dev/pve/root
VG Name pve
LV UUID T0SiXG-f1jQ-bLVl-dof0-gNrH-HbJ4-ElGixb
LV Write Access read/write
LV Status available
# open 1
LV Size 96.00 GB
Current LE 24576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1

--- Logical volume ---
LV Name /dev/pve/data
VG Name pve
LV UUID CFOGlJ-z05w-Vui1-LieO-4mr6-0Lqf-jsCy92
LV Write Access read/write
LV Status available
# open 1
LV Size 820.02 GB
Current LE 209924
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2
 
see also /etc/pve/storage.cfg
 
cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content images,iso,vztmpl,rootdir

lvm: os-images
vgname raid
content images

Where does the web interface get it's list of valid LVs from, that is what I need to add my old LVs to?
 
An logical volume need to have the correct naming, and additianolly we set an lvm tag (take a look at a LV created with pve).