11–Protocolo iSCSI
Inicio iSCSI
21 de enero de 2021
{
$ISCSIADM -m session 2> /dev/null | while read t num i target ;
do
ip=${i%%:*}
STARTUP=`$ISCSIADM -m node -p $ip -T $target 2> /dev/null |
grep "node.conn\[0\].startup" | cut -d' ' -f3`
if [ "$STARTUP" -a "$STARTUP" != "onboot" ] ; then
$ISCSIADM -m node -p $ip -T $target -o update -n
node.conn[0].startup -v onboot
fi
done
}
# Reset status of this service
rc_reset
# We only need to start this for root on iSCSI
if ! grep -q iscsi_tcp /proc/modules ; then
if ! grep -q bnx2i /proc/modules ; then
rc_failed 6
rc_exit
fi
fi
case "$1" in
start)
echo -n "Starting iSCSI initiator for the root device: "
iscsi_load_iscsiuio
startproc $DAEMON $ARGS
rc_status -v
iscsi_mark_root_nodes
;;
stop|restart|reload)
rc_failed 0
;;
status)
echo -n "Checking for iSCSI initiator service: "
if checkproc $DAEMON ; then
rc_status -v
else
rc_failed 3
Página 131
Doc Nº. BC0054508-09 Rev. R
Copyright © 2021 Marvell