VM with libiscsi hangs on missing disk - no timeout

Dec 30, 2020
13
1
23
Hello,
after some (much) fiddling, I managed to boot a VM with two (LVM) mirrored root disks over iSCSI with both libiscsi (User_Mode_iSCSI) and kernel iSCSI.
I'm using other Proxmox nodes in the cluster as LIO targets.

BTW: please fix iscsi-login-negotiation-failed - I skipped the tcp_ping in /usr/share/perl5/PVE/Storage/Plugin.pm with:
Perl:
sub iscsi_test_portal {
    my ($portal) = @_;

    my ($server, $port) = PVE::Tools::parse_host_and_port($portal);
    return 0 if !$server;
    return 1;
    return PVE::Network::tcp_ping($server, $port || 3260, 2);
}

BUT
when I reboot a Proxmox node, that is serving one of the two iSCSI disks to the VM - the VM is stuck until the Proxmox node with LIO is up again - when using libiscsi.
Switching to kernel iSCSI timeouts the iSCSI disk after about 120 sec. (can be shortened by editing node.session.timeo.replacement_timeout in /etc/iscsi/iscsid.conf)

VM.conf
Code:
agent: 1
boot: order=scsi0;scsi1
scsi0: iscsi-test01:lun0,backup=0,discard=on,iothread=1,size=255G
scsi1: iscsi-test02:lun0,backup=0,discard=on,iothread=1,size=255G
scsihw: virtio-scsi-single
serial0: socket
storage.conf
Code:
iscsidirect: iscsi-test01
    portal 192.168.1.45
    target iqn.2003-01.org.linux-iscsi.test01.x8664:sn.ca0a6b7e722a

iscsidirect: iscsi-test02
    portal 192.168.1.46
    target iqn.2003-01.org.linux-iscsi.test02.x8664:sn.dcf539fbd724

Does anybody know - if/where I can set a disk timeout when serving iSCSI disks over libiscsi?

Thanks,
Gerald
 
Last edited: