Tuesday, 21 June 2011

iscsi trouble

What do we have today!

Netapp is awesome.... (there is always a but! and here it is!) BUT

When configuring an iscsi lun on CentOS we change first of all the initiator name:
echo 'InitiatorName=iqn.1994-05.com.redhat:somenodename > /etc/iscsi/initiatorname.iscsi

after that we try to discover our targets
iscsiadm -m discovery -t sendtargets -p xxx.xxx.xxx.xxx

Well as you would know this end up giving you as many targets as the NetApp filer has interfaces! (pretty much the same lun on all VLANS), which you cant access because you only have 2 NICs (one for the LAN and one for the storage LAN... and in the end of the day thats all you need! Anyway... so we add the interface
iscsiadm -m iface -I eth1 -o new

and change the configuration
sed -i -e '/node.startup/s/automatic/manual/g' /etc/iscsi/iscsid.conf

That is not enough though... the discovered targets are set to automatic already... soooo lets make them all to manual:
iscsiadm -m node -o update -n node.startup -v manual

and make the one we want automatic (so it doesnt take 100mins to start iscsi :P)
iscsiadm -m node -o update -n node.startup -v automatic -p xxx.xxx.xxx.xxx,3260 -I eth1

Now restart iscsi and presto!
service iscsi restart

Wooohoo! Victory!

Many thanks to Pete for helping out with this :)

No comments:

Post a Comment