Session fail over

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I try to get session fail over work with lio target on rhel 7.
For testing i have written a Shell script an connected the lun to Windows 
Server 2012.
When I simulate the fail over i start file copy and start the script with 
stop Parameter. After a few seconds the copy on Windows stalled and after 
starting the script with start parameter I get a message on Windows, that 
the copy has failed - with auto attached lun.
What i see is that the pindows cache parameter on the attached volume is 
set and i have no chance to disable it (emulate_write_cache is 0)

Here the script

#!/bin/bash

TARGET_IQN=iqn.2014-03.org.mydomain.test01:testport
INIT_IQN=iqn.1991-05.com.microsoft:win2012.mydomain.org
INIT_PAS=secret123456
PORTAL=10.1.1.220
start()
{
targetcli /backstores/block create dev=/dev/zvol/pool-test/iscsi/testlun 
name=testlun
targetcli /iscsi create ${TARGET_IQN}
echo 0 > /sys/kernel/config/target/iscsi/${TARGET_IQN}/tpgt_1/enable
targetcli /iscsi/${TARGET_IQN}/tpg1 set parameter DefaultTime2Retain=5
targetcli /iscsi/${TARGET_IQN}/tpg1 set parameter DefaultTime2Wait=60
targetcli /iscsi/${TARGET_IQN}/tpg1 set parameter ErrorRecoveryLevel=2
targetcli /iscsi/${TARGET_IQN}/tpg1/portals create ${PORTAL}
targetcli /iscsi/${TARGET_IQN}/tpg1/acls create ${INIT_IQN}
targetcli /iscsi/${TARGET_IQN}/tpg1/acls/${INIT_IQN} set auth 
userid=${INIT_IQN}
targetcli /iscsi/${TARGET_IQN}/tpg1/acls/${INIT_IQN} set auth 
password=${INIT_PAS}
targetcli /iscsi/${TARGET_IQN}/tpg1/luns create /backstores/block/testlun
echo 1 > /sys/kernel/config/target/iscsi/${TARGET_IQN}/tpgt_1/enable
}

stop()
{
echo 0 > /sys/kernel/config/target/iscsi/${TARGET_IQN}/tpgt_1/enable
targetcli /iscsi delete ${TARGET_IQN}
targetcli /backstores/block delete name=testlun
}

# See how we are called
case "$1" in
        start)
                start
                RETVAL=$?
                ;;
        stop)
                stop
                RETVAL=$?
                ;;
esac



--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux