Access to Image Folder on iSCSI Drive

Mansaylon

Renowned Member
Feb 13, 2012
45
2
73
Zürich
www.elektrofahrer.ch
I have a Proxmox Server and a FreeNAS 8.3 Server connected with iSCSI.
Now I will copy a raw file directly in the Image folder. But I can only see the Image folder on the local drive (/var/lib/vz/images/ID/).
How can I see the image folder on the iSCSI connection?

Thanks.

Mansaylon
 
I have a Proxmox Server and a FreeNAS 8.3 Server connected with iSCSI.
Now I will copy a raw file directly in the Image folder. But I can only see the Image folder on the local drive (/var/lib/vz/images/ID/).
How can I see the image folder on the iSCSI connection?

Thanks.

Mansaylon
Hi Mansaylon,
if you want to use iSCSI, you should create an partition on that storage and create an vg there (lvm). Than you can create this as lvm-storage inside the pve-gui.
If you now create disks for an VM on this storage this will produce an logical-volume there.

An raw-file can copied with "dd".

If you want to use the raw-file directly (not so fast like lvm-storage) you must use nfs, or an clusterfs for that storage. If you select images for that storage an subfolder images will created (same like on local storage /var/lib/vz).

Udo
 
iSCSI works fine.... I have 4 VMs there yet.
But I will copy from an old Proxmox an image directly in the lvm-storage .

ISOs I can copy with WinSPC.
With dd. What is the syntax? I can see no path to iSCSI in the shell??

Hi,
the iSCSI-Storage has no filesystem - it's only an lvm-storage.
Look with
Code:
lvs
# or for more output
lvdisplay
to copy an rawfile to an excisting lv:
Code:
dd if=/var/lib/vz/images/110/vm-110-disk-1.raw of=/dev/vgname/vm-110-disk-1 bs=1024k
You should know what you do - "dd" don't ask, if you use as output the wrong device this content is lost (you can easy destroy your system with dd).
See also "man dd".

This is the reason why the official way is to use backup+restore (and use the right storage at restore - see "man qmrestore").

Udo
 
OK ... lvs works:
Code:
root@pmx1:~# lvs  LV            VG        Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  vm-100-disk-1 FreeGroup -wi-a---  32.00g
  vm-120-disk-1 FreeGroup -wi-a---  32.00g
  vm-150-disk-1 FreeGroup -wi-ao--  32.00g
  vm-250-disk-1 FreeGroup -wi-ao-- 124.00g
  vm-900-disk-1 FreeGroup -wi-ao--  32.00g
  vm-901-disk-1 FreeGroup -wi-ao--  64.00g
  data          pve       -wi-ao-- 136.32g
  root          pve       -wi-ao--  55.75g
  swap          pve       -wi-ao--  15.00g

I copied the .raw from the old Proxmox on my local computer.
I must first copy the raw locally on the new Proxmox?
The raw must be in the vm-100-disk-1 directory.
 
OK ... lvs works:
Code:
root@pmx1:~# lvs  LV            VG        Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
  vm-100-disk-1 FreeGroup -wi-a---  32.00g
  vm-120-disk-1 FreeGroup -wi-a---  32.00g
  vm-150-disk-1 FreeGroup -wi-ao--  32.00g
  vm-250-disk-1 FreeGroup -wi-ao-- 124.00g
  vm-900-disk-1 FreeGroup -wi-ao--  32.00g
  vm-901-disk-1 FreeGroup -wi-ao--  64.00g
  data          pve       -wi-ao-- 136.32g
  root          pve       -wi-ao--  55.75g
  swap          pve       -wi-ao--  15.00g

I copied the .raw from the old Proxmox on my local computer.
I must first copy the raw locally on the new Proxmox?
The raw must be in the vm-100-disk-1 directory.
Hi,
yes the raw-image must copied to the new pve-host but it's not nessesary to use the right folder below /var/lib/vz/images - you need only enough space.
After that you copy the content to the lv like
Code:
dd if=/var/lib/vz/vm-100-disk-1.raw of=/dev/FreeGroup/vm-100-disk-1 bs=1024k
If you get an error at the end, because not enough space, you must extend your lv (then it's slightly to small).
After successfull copy you can fire up your VM and if all ok, remove your raw-file.

Udo
 

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!