error on using iscsi with cluster

copymaster

Member
Nov 25, 2009
183
0
16
Hi again ;-)

as i wrote i got a cluster with 3 Servers and configured iscsi as storage and lVM with this iscsi target.

Then i installed a w2k3 Server on this storage and all seems to be great.

But then i wanted to see where the vm is located and tried to mount that LUN on a normal linux box. The lun was mounted successfully, but a cfdisk showed an empty partition (no filesystem, no files) and the whole partition seems to be emtpy.

I wondered about that and thought: ok, lets try a online migration (that is the next step in my test environment) so i logged on to the webinterface of the master, started the w2k3 VM and selcted online migration to node 2.

the output:
Code:
/usr/sbin/qmigrate --online 192.168.0.72 104
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
Dec 14 13:13:35 starting migration of VM 104 to host '192.168.0.72'
Dec 14 13:13:35 copying disk images
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
Dec 14 13:13:35 starting VM on remote host '192.168.0.72'
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
Dec 14 13:13:36 starting migration tunnel
Dec 14 13:13:36 starting online/live migration
Dec 14 13:13:38 migration status: active (transferred 36920KB, remaining 4174336KB), total 4210944KB)
Dec 14 13:13:40 migration status: active (transferred 64032KB, remaining 4147356KB), total 4210944KB)
Dec 14 13:13:42 migration status: active (transferred 86516KB, remaining 4125892KB), total 4210944KB)
Dec 14 13:13:44 migration status: active (transferred 109384KB, remaining 4103320KB), total 4210944KB)
Dec 14 13:13:46 migration status: active (transferred 132252KB, remaining 4080500KB), total 4210944KB)
Dec 14 13:13:48 migration status: active (transferred 154988KB, remaining 4057928KB), total 4210944KB)
Dec 14 13:13:50 migration status: active (transferred 178464KB, remaining 4035356KB), total 4210944KB)
Dec 14 13:13:53 migration status: active (transferred 3528476KB, remaining 685524KB), total 4210944KB)
Dec 14 13:13:55 migration status: active (transferred 3636776KB, remaining 578112KB), total 4210944KB)
Dec 14 13:14:06 migration status: completed
Dec 14 13:14:06 migration speed: 136.53 MB/s
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
Dec 14 13:14:08 migration finished successfuly (duration 00:00:34)
VM 104 migration done

Why do i get errors (input/output) ?
And where's the vm image located, when the lun seems to be empty?

And:
How can i create snapshots from the vm located on lvm/iscsi to the local disk?
 
Last edited:
well,

i just added an iscsi target from netapp, the added a lvm volume group through the webinterface using this iscsi target and then created a vm on the lvm.

i used the
Use iSCSI LUN for LVM base wiki article


for this. i didn't delete anything. and it seems to work. can i verify this somehow?

and as i wrote in my first post, the lun seems empty when i mount it via a linuxbox. on proxmox, the vm seems to be where it should.
 
You can use 'pvesm' to manage storgae (see 'man pvesm')

for example:

# pvesm list -a

lists all volumes.
 
thanks for your quick reply, dietmar.

i read the lvm howto as i posted above. i just can not understand where to find the image from my vm.

on my cluster, the vm i am searching for is running on node 2. if i use the above command


Code:
Trick:~# pvesm list -a
ISCSI1:0.0.0.scsi-360a9800068706575566f546374313141 0   raw  157308480
ISCSI1:0.0.9.scsi-360a9800068706575566f54664a2f6646 0   raw  104857600
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
ID2:vm-104-disk-1 104   raw  157286400
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 34359672832: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 34359730176: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 4096: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-3: read failed after 0 of 4096 at 0: Input/output error

here ISCSI lines 1 and 2 are 2 luns and the line ID2 is a LVM based on LUN1
i just wanted to know, where on the node 2 i can see the vm. maybe under /dev/mapper or so?

i just wanted to copy this vm but cannot find the file. Can you please tell me where to search as i don't know how you designed the filesystem.

thanks
 
Hi,
you can access the filesystem also in raw-mode
(vzdump will be better ;-)
Look with lvdisplay for the device like /dev/netapp-vg/vm-112-disk-1. Then you can copy the device local with
Code:
dd if=/dev/netapp-vg/vm-112-disk-1 of=/var/lib/vz/images/112/vm-112-disk-1.raw bs=1024k
But i'm afraid about your Input/Output-Error. You are shure, that with your netapp is all right? And only proxmox-guests use this iscsi-device?

Udo
 
Thank you a lot. That was the information i were looking for!
The input/output error is a bit spooky, so i will copy the vm's to a safe location and reinstall my cluster again.

I used the wizard on the netapp to create the lun, and i think i have chosen "windows" as the type of lun. Maybe the error lies here somewhere.
Dietmar said, the Disk info may be deleted, defective. so a fresh install should heal the problems.

This forum is a great thing. The Proxmox staff members are always here to answer the questions and even on weekends.
I will give proxmox a try in my production environment after some more tests and i hope, dietmar and tom and all the others are are not afraid to answer stupid questions like mine.

Keep up your very very good work guys!;)
 
I ran into this as well. I'm not 100% sure what caused it, but it may have something to do with removing your iSCSI target before removing the VMs related to it (if created as LVMs on the target). I wrote this up for my own logs:

You may receive this error when creating VM guests on an LVM partition or running lvdisplay on the proxmox server:

Code:
/dev/dm-2: read failed after 0 of 4096 at 4096: Input/output error

This pertains to, coining a popular but irrelevant NFS term, a stale LVM state on the Proxmox host possibly because the LVM was destroyed before the guest was deleted. You can view stale LVMs from the particular Proxmox server using

Code:
dmsetup info

You can remove them using

Code:
dmsetup remove <lvm name>

This should remove those errors.