How to Write RAW image direct on LVM GROUP

yena

Renowned Member
Nov 18, 2011
373
4
83
Hello,
i have a raw image created by Acronis.
How can i Write it direct on LVM GROUP ?
( like the web-panel KVM creation on LVM Group ?)

I have tryed with
dd if=win2003.raw of=/dev/pve/vm-102-disk-1

but i have an error of no free space .. but in my VG i have a lot of free space ..
I Also see that dd create file but i think i nedd a block device:

Details:


root@prx6:~# ls -la

root@prx6:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name pve
PV Size 1.82 TiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476708
Free PE 299812
Allocated PE 176896
PV UUID Abvh0M-iCJD-HPP0-HfxX-o0LQ-etJh-uphseJ

root@prx6:~#
root@prx6:~# vgdisplay
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 12
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 7
Open LV 5
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.82 TiB
PE Size 4.00 MiB
Total PE 476708
Alloc PE / Size 176896 / 691.00 GiB
Free PE / Size 299812 / 1.14 TiB
VG UUID ctnAxf-HL4l-y2qJ-YYI9-494W-VPcV-KWgHqK


Filesystem Size Used Avail Use% Mounted on
/dev/mapper/pve-root 95G 1.2G 89G 2% /
tmpfs 12G 0 12G 0% /lib/init/rw
udev 12G 240K 12G 1% /dev
tmpfs 12G 13M 12G 1% /dev/shm
/dev/mapper/pve-data 99G 67G 32G 68% /var/lib/vz
/dev/sda1 495M 56M 414M 12% /boot
/dev/fuse 30M 16K 30M 1% /etc/pve

Thanks!!

-- Yena --
 
hi

you are trying to dd to /dev/pve/vm-102-disk-1 (lv)

did you create that lv before?

try posting this command result
#lvdisplay /dev/pve/vm-102-disk-1


here
http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE
you could find some more info...

Marco


Thanks Marco,
so, before doing the dd command i have to create the Logical-Volume? Right ?
( Same space capacity of my RAW image . .):

root@prx6:~# lvdisplay
--- Logical volume ---
LV Path /dev/pve/swap
LV Name swap
VG Name pve
LV UUID AFyDuV-p6n1-ugNg-AjcZ-5Qgd-U1cE-AsFnaH
LV Write Access read/write
LV Creation host, time proxmox, 2013-04-08 19:29:46 +0200
LV Status available
# open 1
LV Size 23.00 GiB
Current LE 5888
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/pve/root
LV Name root
VG Name pve
LV UUID LD5TLJ-nTyS-1dkM-bsPW-DNRP-dvYy-5uhGrx
LV Write Access read/write
LV Creation host, time proxmox, 2013-04-08 19:29:46 +0200
LV Status available
# open 1
LV Size 96.00 GiB
Current LE 24576
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/pve/data
LV Name data
VG Name pve
LV UUID 2IEU5z-HSdr-rAjo-yqfu-E4JM-0qqm-zgxitS
LV Write Access read/write
LV Creation host, time proxmox, 2013-04-08 19:29:46 +0200
LV Status available
# open 1
LV Size 100.00 GiB
Current LE 25600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Path /dev/pve/vm-100-disk-1
LV Name vm-100-disk-1
VG Name pve
LV UUID obRNil-Us87-0Ruj-RuWT-ueNr-B1YO-TsIyXL
LV Write Access read/write
LV Creation host, time prx6, 2013-04-09 16:53:00 +0200
LV Status NOT available
LV Size 180.00 GiB
Current LE 46080
Segments 1
Allocation inherit
Read ahead sectors auto

--- Logical volume ---
LV Path /dev/pve/vm-100-disk-2
LV Name vm-100-disk-2
VG Name pve
LV UUID kIWBYl-vQX4-2Wc1-fSot-sBZc-CPvP-RF9ssz
LV Write Access read/write
LV Creation host, time prx6, 2013-04-09 16:56:50 +0200
LV Status available
# open 1
LV Size 180.00 GiB
Current LE 46080
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

--- Logical volume ---
LV Path /dev/pve/vm-102-disk-1
LV Name vm-102-disk-1
VG Name pve
LV UUID 17ewdN-c4ek-hnxw-iVX3-S6Gt-V3qD-VtxKQZ
LV Write Access read/write
LV Creation host, time prx6, 2013-04-11 10:07:57 +0200
LV Status available
# open 0
LV Size 80.00 GiB
Current LE 20480
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4

--- Logical volume ---
LV Path /dev/pve/vm-101-disk-2
LV Name vm-101-disk-2
VG Name pve
LV UUID MiUy5r-FEen-5al3-XkqY-hjil-liiF-6kb3Md
LV Write Access read/write
LV Creation host, time prx6, 2013-04-11 12:32:41 +0200
LV Status available
# open 0
LV Size 32.00 GiB
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:6


Thanks!

-- Yena --
 
the lvs you see there with lvdisplay should be other vm's lvm disks.

think of the lv as your vm "physcal" disk. without that, you can't dd on it

Marco
 
Thanks Marco,
so, before doing the dd command i have to create the Logical-Volume? Right ?
( Same space capacity of my RAW image . .):




-- Yena --


OK I try creating a dedicated LVM.

Many Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!