Products/HA/DellRedHatHALinuxCluster/Storage/EqualLogic PS-Series/Appendix

From DellLinuxWiki

Jump to: navigation, search

Dell|Red Hat HA Linux > Storage > EqualLogic PS-Series > Appendix

Contents

Appendix

Verfication Checklist

Item Verified
Physical setup and cabling  
Storage array initialized  
iSCSI NICs configured on each node  
iSCSI initiator tools installed on each node  
iSCSI Initiator IQN set on each node to ease identification  
Management node configured  
Set member RAID policy  
Create a Volume for the Cluster  
Configure Access Control List  
Set Access Type to "shared"  
Multipath I/O configured on each node  
Perform iSCSI discovery and initiate sessions on all paths  
Create logical volume with GFS and mount  

CHAP Configuration

Values to set for initiator and target authentication:

node.session.auth.authmethod = CHAP
node.session.auth.username = nodes
node.session.auth.password = nodespassword
node.session.auth.username_in = target
node.session.auth.password_in = targetpassword
discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = nodes
discovery.sendtargets.auth.password = nodespassword
discovery.sendtargets.auth.username_in = target
discovery.sendtargets.auth.password_in = targetpassword

Script to Automate iSCSI Setup

Call this script on each cluster node, giving the iSCSI target ip address as it's first argument. This script makes assumptions that the cluster node iSCSI networks are on a Class C (/24) network. Pass either A or B to change that behavior.

#!/bin/bash
# Script to setup multipath iscsi ifaces to discover targets on

# Pass the first argument to the script an ip address of the iSCSI target
# Example: ./$0 192.168.100.1
# Optionally pass a second argument of [A|B|C] to set the class of network
# Example: ./$0 192.168.100.1 B  # will only match the first 2 octets when determining which nics to create interfaces for

TARGET=$1

if [ "$TARGET" = "" ]
then
        echo "Usage: $0 iscsi_target_ip [A|B|C]"
	echo
	echo "A|B|C is is class of network A=/8 B=/16 C=/24(default)"
        exit 1
fi

echo "-Checking for iscsi-initiator-utils"
rpm -q iscsi-initiator-utils
if [ ! "$?" = "0" ]
then
        echo "-Installing iscsi-initiator-utils for you"
        yum -y install iscsi-initiator-utils
        rpm -q iscsi-initiator-utils
        if [ ! "$?" = "0" ]
        then
                echo "Error $?: Cannot find iscsi-initiator-utils"
                exit 1
        fi
fi
echo "-Checking for iscsi running"
service iscsi status
if [ ! "$?" = "0" ]
then
        echo "-Staring iscsi for you"
        service iscsi start
fi

# This is where the type of network is set.  Default of Class C
# Class C, matches 1.2.3 and the last octet doesn't matter
SUBNET=$2
if [ ! "$SUBNET" = "" ]
then
	case "$SUBNET" in
		A|a)
			echo Using Class A network, matching first octet ...
			# Class A, matches first octet only and the rest are wildcard.
			 NETWORK=$(echo $1 | awk -F"." '{print $1}')
		;;
	          B|b)
			echo Using Class B network, matching first two octets ...
			# Class B, matches 1.2 and the last two octets do not matter
			 NETWORK=$(echo $1 | awk -F"." '{print $1"."$2}')
	            ;;
	          *)
			echo Using Class C network, matching first 3 octets ...
			# Class C, matches 1.2.3 and the last octet doesn't matter
			 NETWORK=$(echo $1 | awk -F"." '{print $1"."$2"."$3}')
	            ;;
       esac
else
	echo Assuming Class C network, matching first 3 octets ...
	# Class C, matches 1.2.3 and the last octet doesn't matter
	 NETWORK=$(echo $1 | awk -F"." '{print $1"."$2"."$3}')
fi

echo "-Configuring iSCSI interfaces on $NETWORK network:"
NUM_IFACES=0
echo "running for nic in $(ip a | grep $NETWORK | awk '{print $7}')"
for nic in $(ip a | grep $NETWORK | awk '{print $7}')
do
        echo "-found $nic on $NETWORK"
        echo "-Creating iscsi iface i${nic}"
        iscsiadm -m iface -I i${nic} --op=new
        if [ ! "$?" = "0" ]
        then
                echo "$?: Error creating iface i${nic}"
                exit 1
        fi
        echo "-Associating ${nic} with iscsi iface i${nic}"
        iscsiadm -m iface -I i${nic} --op=update -n iface.net_ifacename -v $nic
        echo "Checking grep -q -s 'iface.net_ifacename = $nic' /var/lib/iscsi/ifaces/i$nic"
        grep -q -s "iface.net_ifacename = $nic" /var/lib/iscsi/ifaces/i$nic
        if [ ! "$?" = "0" ]
        then
                echo "$?: Error updating iface i${nic}"
                exit 1
        fi
        ALL_IFACES="$ALL_IFACES -I i${nic}"
        NUM_IFACES=$(( $NUM_IFACES + 1 ))
done
echo "Interfaces configured: $ALL_IFACES"
echo "Found $NUM_IFACES nics on $NETWORK"
if [ "$ALL_IFACES" = "" ]
then
        echo "Could not find any interfaces!"
        exit 1
fi
if [ "$NUM_IFACES" -lt "2" ]
then
        echo "Could not find at least two interfaces!"
        exit 1
fi
echo "-Discoverying available targets on $TARGET"
iscsiadm -m discovery -t sendtargets -p $TARGET $ALL_IFACES
if [ ! "$?" = "0" ]
then
        echo "$?: Error receiving target $TARGET"
        exit 1
fi
echo "-Logging in to all targets"
iscsiadm -m node --loginall=all
if [ ! "$?" = "0" ]
then
        echo $?: Error loggin in to target $TARGET
        exit 1
fi
echo "-Active sessions:"
iscsiadm -m node session



Continue to the Cluster documentation



Dell|Red Hat HA Linux > Storage > EqualLogic PS-Series > Appendix

Personal tools
Distributions