NetBSD-Users archive

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

Re: Network very very slow... was iSCSI and jumbo frames



RVP a écrit :
> isns_cd is probably the iSNS server, not the iSCSI target server:
> 
> https://github.com/open-iscsi/open-isns

	Oops, sorry...

In /etc/init.d/iscsitrgt.sh, I have :

...
FBDISK_SH=/etc/init.d/fbdisk.sh
ISCSI_TARGET_KO=/lib/modules/misc/target_core_mod.ko
ISCSI_UTILITY=/sbin/iscsi_util
ISCSI_LOG_DAEMON=/sbin/iscsi_logd
ISNS_CLIENT_DAEMON=/sbin/isns_cd
ISCSI_CONFIG=/etc/config/iscsi_trgt.conf
MIN_FSIZE=200 #minimum config file size required


start_target()
{
    # check if fbdisk loaded
    if [ -z "`/sbin/lsmod | /bin/grep fbdisk | /bin/awk {'print $1'}`" ];
    then
        $FBDISK_SH start;
    fi
    if [ -f $ISCSI_CONFIG ];
    then
        $ISCSI_UTILITY --replace_config
    fi
    [ -d "/var/target/pr" ] || mkdir -p /var/target/pr
    [ -f $ISCSI_CONFIG ] || $ISCSI_UTILITY --new
        if [ -x /usr/bin/du ] && [ -f $ISCSI_CONFIG ]; then
                conf_size=`/usr/bin/du -b $ISCSI_CONFIG | /bin/awk
'{print $1}'`
                if [ -z "$conf_size" ] || [ "$conf_size" -lt $MIN_FSIZE
]; then
                        /bin/cp $ISCSI_CONFIG ${ISCSI_CONFIG}.replaced
                        last_conf_size=0
                        [ -f ${ISCSI_CONFIG}.last ] &&
last_conf_size=`/usr/bin/du -b ${ISCSI_CONFIG}.last | /bin/awk '{print $1}'`
                        if [ ! -z "$last_conf_size" ] && [
"$last_conf_size" -ge $MIN_FSIZE ]; then
                                /bin/cp ${ISCSI_CONFIG}.last $ISCSI_CONFIG
                        else
                                [ -x /etc/init.d/backup_conf.sh ] &&
/etc/init.d/backup_conf.sh restore iscsi_trgt.conf
                        fi
                fi
        fi
    ENABLE_ISCSI=`/sbin/getcfg iSCSIPortal bServiceEnable -f
$ISCSI_CONFIG -u -d 1`
    if [ "$ENABLE_ISCSI" != "TRUE" ];
    then
        $ISCSI_UTILITY --config
        exit 0;
    fi
    ENABLE_ISNS=`/sbin/getcfg iSCSIPortal bISNSEnable -f $ISCSI_CONFIG
-u -d 1`
    if [ "$ENABLE_ISNS" == "TRUE" ];
    then
        ISNS_IP=`/sbin/getcfg iSCSIPortal ISNSIP -f $ISCSI_CONFIG -u -d
127.0.0.1`
        $ISNS_CLIENT_DAEMON --address $ISNS_IP
    fi
    $ISCSI_UTILITY --load --config
    # log daemon should be launched after the target service
    $ISCSI_LOG_DAEMON
}

	I don't know if this file can help. iscsi initiator seems to be open-iscsi.

	JKB


Home | Main Index | Thread Index | Old Index