2.2 Setting Up iSNS

The following sections contain information to help you set up and configure iSNS:

2.2.1 Configuring iSCSI Targets and Initiators to Use iSNS

To configure iSCSI targets and initiators to use iSNS, you must edit the iSCSI configuration file on each iSCSI target and initiator server and add lines that specify the iSNS server address.

Editing the iSCSI Target Configuration File

Edit the /etc/ietd.conf file and add the following line:

iSNSServer isns_server_ip_address

Replace isns_server_ip_address with the IP address of the server where you installed iSNS.

A commented-out section with this line might already exist in the configuration file. If this is the case, you only need to replace the sample IP address with the IP address of your iSNS server.

Editing the iSCSI Initiator Configuration File

Edit the /etc/iscsi/iscsid.conf file and add the following lines:

isns.address = isns_server_ip_address

isns.port = 3205

Replace isns_server_ip_address with the IP address of the server where you installed iSNS.

A commented-out section with these lines should already exist in the configuration file. If this is the case, you only need to replace the sample IP address with the IP address of your iSNS server.

2.2.2 Starting iSNS

iSNS must be started at the server. You can do this by entering rcisns start or /etc/init.d/isns start at the server console of the server where you install it. You can also use the stop, status, and restart options with iSNS.

iSNS can also be configured to start automatically each time the server is rebooted. To do this

  1. Start YaST and under Network Services, select iSNS Server.

  2. With the Service tab selected, specify the IP address of your iSNS server, then click Save Address.

  3. In the Service Start section of the screen, select When Booting .

    You can also choose to start the iSNS server manually. You must then use the rcisns start command to start the service each time the server is restarted.

2.2.3 Creating iSNS Discovery Domains

In order for iSCSI initiators and targets to use the iSNS service, they must belong to a discovery domain. A default discovery domain named default DD is automatically created when you install the iSNS service. The existing iSCSI targets and initiators that have been configured to use iSNS are automatically added to the default discovery domain.

To create a discovery domain:

  1. Start YaST and under Network Services, select iSNS Server.

  2. Click the Discovery Domains tab, then click the Add button.

    You can also select an existing discovery domain and click the Delete button to remove that discovery domain.

  3. Specify the name of the discovery domain you are creating, then click OK.

    NOTE:The field is mislabeled as Discovery Domain Set Name. Specifying a name in this field creates a discovery domain, not a discovery domain set.

2.2.4 Creating iSNS Discovery Domain Sets

Discovery domains must belong to a discovery domain set. You can create a discovery domain and add nodes to that discovery domain, but it is not active and the iSNS service does not function unless you add the discovery domain to a discovery domain set. A default discovery domain set named default DDS is automatically created when you install iSNS and the default discovery domain is automatically added to that domain set.

To create a discovery domain set:

  1. Start YaST and under Network Services, select iSNS Server.

  2. Click the Discovery Domains Sets tab, then click the Add button.

    You can also select an existing discovery domain set and click the Delete button to remove that discovery domain set.

  3. Specify the name of the discovery domain set you are creating, then click OK.

2.2.5 Adding iSCSI Nodes to a Discovery Domain

  1. Start YaST and under Network Services, select iSNS Server.

  2. Click the iSCSI Nodes tab and ensure the iSCSI targets and initiators that you want to use the iSNS service are listed.

    If an iSCSI target or initiator is not listed, you might need to restart the iSCSI service on the node. You can do this by running the rcopen-iscsi restart command to restart an initiator or the rciscsitarget restart command to restart a target.

    You can select an iSCSI node and click the Delete button to remove that node from the iSNS database. This is useful if you are no longer using an iSCSI node or have renamed it.

    The iSCSI node will be automatically added to the list (iSNS database) again when you restart the iSCSI service or reboot the server unless you remove or comment out the iSNS portion of the iSCSI configuration file.

  3. Click the Discovery Domains tab, select the desired discovery domain, then click the Display Members button.

  4. Click Add iSCSI Node, select the node you want to add to the domain, then click Add Node.

  5. Repeat Step 4 for as many nodes as you want to add to the discovery domain, then click Done when you are finished adding nodes.

    An iSCSI node can belong to more than one discovery domain.

2.2.6 Adding Discovery Domains to a Discovery Domain Set

  1. Start YaST and under Network Services, select iSNS Server.

  2. Click the Discovery Domains Set tab, select the desired discovery domain set, then click the Display Members button.

  3. Click Add Discovery Domain, select the discovery domain you want to add to the discovery domain set, then click Add Discovery Domain.

  4. Repeat Step 3 for as many discovery domains as you want to add to the discovery domain set, then click Done.

    A discovery domain can belong to more than one discovery domain set.

2.2.7 Setting Up the iSCSI Initiator to Use the iSNS Server

Do the following for each iSCSI initiator server that should use the iSNS server:

  1. At the console on the iSCSI initiator server, log in as the root user, then open a terminal console.

  2. At the terminal console prompt, enter

    iscsiadm --mode discovery --type isns --portal isns_server_ip_addr
    

    Replace isns_server_ip_addr with the IP address of the iSNS server. For example, if the IP address of the iSNS server is 10.10.10.200, enter

    iscsiadm --mode discovery --type isns --portal 10.10.10.200