iSCSI LVM Images Raw > QCOW

Extcee

Active Member
Apr 11, 2011
50
1
26
Hi All,

Firstly, thanks to these forums and the Proxmox team, the software is awesome and these forums have helped immensely with my setup.

I have 2 Dell PE C1100 servers running Proxmox 3.0 connected to a Dell MD3200i SAN.

I have successfully (after a lot of help from these forums!!) set up iSCSI connection to my SAN on the LUN and have set up a Server 2012 instance on ProxNode1, with the image stored on the SAN, however this is in the RAW Format (seemed to default to this) and I want to convert to qcow2 for snapshotting etc..

I know I can run

Code:
[FONT=arial][COLOR=#FCFFBA]qemu-img convert [/COLOR][COLOR=#660033]-p[/COLOR][COLOR=#FCFFBA] [/COLOR][COLOR=#660033]-O[/COLOR][COLOR=#FCFFBA] qcow2 [/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]var[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]lib[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]vz[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]images[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#DDDDDD]200[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]vm-[/COLOR][COLOR=#DDDDDD]200[/COLOR][COLOR=#FCFFBA]-disk-[/COLOR][COLOR=#DDDDDD]1[/COLOR][COLOR=#FCFFBA].raw [/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]var[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]lib[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]vz[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]images[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#DDDDDD]200[/COLOR][COLOR=#CCCCCC][B]/[/B][/COLOR][COLOR=#FCFFBA]vm-[/COLOR][COLOR=#DDDDDD]200[/COLOR][COLOR=#FCFFBA]-disk-[/COLOR][COLOR=#DDDDDD]1[/COLOR][COLOR=#FCFFBA].qcow2[/COLOR][/FONT]

but I just can't seem to see where inside the Linux OS this place actually resides.

I decided to run mount:

Code:
[FONT=Menlo]root@proxnode1:~# mount[/FONT][FONT=Menlo]sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)[/FONT]
[FONT=Menlo]proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)[/FONT]
[FONT=Menlo]udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=9275386,mode=755)[/FONT]
[FONT=Menlo]devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)[/FONT]
[FONT=Menlo]tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=7422184k,mode=755)[/FONT]
[FONT=Menlo]/dev/mapper/pve-root on / type ext3 (rw,relatime,errors=remount-ro,user_xattr,acl,barrier=0,data=ordered)[/FONT]
[FONT=Menlo]tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)[/FONT]
[FONT=Menlo]tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=14844360k)[/FONT]
[FONT=Menlo]/dev/mapper/pve-data on /var/lib/vz type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered)[/FONT]
[FONT=Menlo]/dev/sda2 on /boot type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered)[/FONT]
[FONT=Menlo]rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)[/FONT]
[FONT=Menlo]fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)[/FONT]
[FONT=Menlo]beancounter on /proc/vz/beancounter type cgroup (rw,relatime,blkio,name=beancounter)[/FONT]
[FONT=Menlo]container on /proc/vz/container type cgroup (rw,relatime,freezer,devices,name=container)[/FONT]
[FONT=Menlo]fairsched on /proc/vz/fairsched type cgroup (rw,relatime,cpuacct,cpu,cpuset,name=fairsched)[/FONT]
[FONT=Menlo]/dev/mapper/mpathb on /mnt/ProxCT01 type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered)[/FONT]
[FONT=Menlo]/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)[/FONT]
[FONT=Menlo]none on /sys/kernel/config type configfs (rw,relatime)[/FONT]

If i do parted -l i get:

Code:
[FONT=Menlo]root@proxnode1:~# parted -l[/FONT][FONT=Menlo]Model: DELL PERC H700 (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sda: 2999GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: gpt[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start   End     Size    File system  Name     Flags[/FONT]
[FONT=Menlo] 1      1049kB  2097kB  1049kB               primary  bios_grub[/FONT]
[FONT=Menlo] 2      2097kB  537MB   535MB   ext3         primary  boot[/FONT]
[FONT=Menlo] 3      537MB   2999GB  2998GB               primary  lvm[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdb: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdc: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdd: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sde: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdf: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (linear) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/proxsanimages-vm--101--disk--1: 53.7GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start   End     Size    Type     File system  Flags[/FONT]
[FONT=Menlo] 1      1049kB  368MB   367MB   primary  ntfs         boot[/FONT]
[FONT=Menlo] 2      368MB   53.7GB  53.3GB  primary  ntfs[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (multipath) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/mpathd: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/mapper/mpathc: unrecognised disk label                        [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (multipath) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/mpathb: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (linear) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/pve-data: 2803GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: loop[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End     Size    File system  Flags[/FONT]
[FONT=Menlo] 1      0.00B  2803GB  2803GB  ext3[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (linear) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/pve-swap: 75.2GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: loop[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End     Size    File system     Flags[/FONT]
[FONT=Menlo] 1      0.00B  75.2GB  75.2GB  linux-swap(v1)[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: Linux device-mapper (linear) (dm)[/FONT]
[FONT=Menlo]Disk /dev/mapper/pve-root: 103GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: loop[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End    Size   File system  Flags[/FONT]
[FONT=Menlo] 1      0.00B  103GB  103GB  ext3[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdg: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdh: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdi: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdj: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdk: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdl: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdo: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdn: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdt: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdr: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdm: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdp: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdu: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdv: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdw: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdq: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sds: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Error: /dev/sdx: unrecognised disk label                                  [/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Model: DELL MD32xxi (scsi)[/FONT]
[FONT=Menlo]Disk /dev/sdy: 537GB[/FONT]
[FONT=Menlo]Sector size (logical/physical): 512B/512B[/FONT]
[FONT=Menlo]Partition Table: msdos[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]Number  Start  End  Size  Type  File system  Flags[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]root@proxnode1:~# [/FONT]

There seems to be a lot of disks here, however I set up multi-path and this is used as my targets for SAN stored OpenVZ containers (along with backups/iso's). There are two LUNs set up for each node to use (at 500GB) and these are mounted on startup in /etc/rc.local (as i mounted these in fstab but the server would not boot because it couldn't see them yet).

Anyway, briefly, where would my 3TB iSCSI Drive be mounted so I can convert my images?

Also, just on a side note, I cloned one of my VM's (50GB), which the image resides on my 3TB LUN on the SAN, but cloning this seems to take hours, which doesn't seem quite right to me.

Here's my /etc/network/interfaces conf:

Code:
[FONT=Menlo]root@proxnode1:~# cat /etc/network/interfaces [/FONT][FONT=Menlo]# network interface settings[/FONT]
[FONT=Menlo]auto lo[/FONT]
[FONT=Menlo]iface lo inet loopback[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]auto eth0[/FONT]
[FONT=Menlo]iface eth0 inet manual[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]auto vmbr0[/FONT]
[FONT=Menlo]iface vmbr0 inet static[/FONT]
[FONT=Menlo]	address  10.10.1.51[/FONT]
[FONT=Menlo]	netmask  255.255.255.0[/FONT]
[FONT=Menlo]	gateway  10.10.1.1[/FONT]
[FONT=Menlo]	bridge_ports eth0[/FONT]
[FONT=Menlo]	bridge_stp off[/FONT]
[FONT=Menlo]	bridge_fd 0[/FONT]
[FONT=Menlo]
[/FONT]
[FONT=Menlo]auto eth1[/FONT]
[FONT=Menlo]iface eth1 inet static[/FONT]
[FONT=Menlo]	address  10.10.142.111[/FONT]
[FONT=Menlo]	netmask  255.255.255.0[/FONT]
[FONT=Menlo]	gateway  10.10.1.1[/FONT]
[FONT=Menlo]	mtu	 9000[/FONT]
[FONT=Menlo]root@proxnode1:~#[/FONT]

I have put each "iSCSI traffic NIC" into the correct VLAN in access mode, leaving my "Prox" NICs for normal traffic in Trunk, with various VLANs tagged. Also have forced 1000Mb negotiation on my switch.. the "Prox" NICs are on Auto-Negotiate.

Sorry this may be a bit long winded.. if I have missed out any info anyone needs please let me know!

Thanks in advance!
 
When you say iSCSI do you also imply LVM or is it direct LUN attachment?

Funnily enough I have been testing with both... The config shown above is using LVM storage.

I've since found out that you can only use RAW format on LVM/iSCSI.. which is a shame because I really wanted to use snapshotting..

Also have noticed my /etc/network/interfaces config had the wrong gateway for eth1 (my SAN Network), which I have now corrected, but the performance still seems slow.. I am currently cloning a VM (only 50GB, in raw, on my LVM iSCSI SAN storage) and this is about 50% through after nearly 2 hours.. is this right?!

Thanks a lot :)
 
Are your LUN's thin or thick provisioned?
File-level target or block-level target?
Not sure how I can check this on the Dell Modular Disk Manager, but heres the info

Code:
Virtual Disk status: 
Optimal








    Capacity:
3,022.000 GB


    Virtual Disk world-wide identifier:
67:82:bc:b0:00:24:b4:c8:00:00:3b:07:40:59:61:7f


    Subsystem ID (SSID):
7


    RAID level:
5








    LUN:
51


    Accessible By:
Host Group ProxVE








    Media type:
 
Physical Disk


    Interface type:
 
Serial Attached SCSI (SAS)


    Enclosure loss protection:
No








    Secure:
No








    Preferred owner:
RAID Controller Module in slot 1


    Current owner:
RAID Controller Module in slot 1


 
    Segment size:
128 KB


    Capacity reserved for future segment size changes:
Yes


    Maximum future segment size:
2,048 KB


    Modification priority:
 
High


 
    Read cache:
Enabled


    Write cache:
Enabled


       Write cache without batteries:
Disabled


       Write cache with mirroring:
Enabled


    Flush write cache after (in seconds):
10.00


    Dynamic cache read prefetch:
Enabled








    Enable background media scan:
Enabled


    Media scan with consistency check:
Enabled








    Pre-Read consistency check:
Disabled


Hope that makes sense and is what your after?
 
What have you chosen for disk bus: IDE, SATA, SCSI or VirtIO
What about cache: none, direct, write-through or write-back

Give this is an enterprise SAN you should choose write-through or write-back for cache.
For disk bus you should go for VirtIO or SCSI and if you choose scsi you should also change scsi controller from LSI to virtio-scsi if your client OS supports it.
 
What have you chosen for disk bus: IDE, SATA, SCSI or VirtIO
What about cache: none, direct, write-through or write-back

Give this is an enterprise SAN you should choose write-through or write-back for cache.
For disk bus you should go for VirtIO or SCSI and if you choose scsi you should also change scsi controller from LSI to virtio-scsi if your client OS supports it.

Disk is Virtio, but I had no cache enabled.. Now changing this to write through and will let you know.

Thanks a lot for your help and advice, its really appreciated.
 

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!