No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Huawei SAN Storage Host Connectivity Guide for Red Hat

HUAWEI SAN Storage Host Connectivity Guide for Red Hat Servers

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Host Configuration

Host Configuration

Configuring Host IP Addresses

  1. Modify the parameters of host ports in their respective configuration files. Figure 5-16 provides an example configuration for port eth1.

    Figure 5-16 Configuring the IP address

  2. Restart the network service.

    Figure 5-17 Restarting the network

    In some Red Hat versions, the network service and NetworkManager are both enabled by default, as shown in the following output:

    [root@localhost ~]# chkconfig|grep -i network 
    NetworkManager  0:off 1:off 2:on    3:on    4:on    5:on    6:off
    network         0:off 1:off 2:on    3:on    4:on    5:on    6:off

    In this condition, network configurations may conflict and cannot take effect. Run the following command to disable NetworkManager:

    service NetworkManager stop

    To prevent NetworkManager from starting automatically after the system restarts, run the following command:

    chkconfig NetworkManager off

Checking iSCSI Software on the Host

After Red Hat is installed, run the rpm -qa |grep iscsi command to check the iSCSI software installation.

[root@root ~]# rpm -qa |grep iscsi 
iscsi-initiator-utils-6.2.0.872-41.el6.x86_64

The output shows that iSCSI software is installed. If iSCSI software is not installed or the installed iSCSI software is of an early version, perform the following steps to install or upgrade the software:

  1. Obtain the iSCSI software package.
  2. Upload the software package to the host.
  3. Install the iSCSI software on the host. In this example, the software package is stored under the /root directory. Run the following command:

    [root@root ~]# rpm -ivh /root/iscsi-initiator-utils-6.2.0.872-41.el6.x86_64.rpm 
    warning: /root/iscsi-initiator-utils-6.2.0.872-41.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY 
    Preparing...                ########################################### [100%] 
    1:iscsi-initiator-utils  ########################################### [100%]

Configuring Initiators Using the iscsiadm Command

  1. Start the iSCSI service.

    For systems earlier than Red Hat 7, run the following command:

    [root@root ~]# /etc/init.d/iscsi start

    For Red Hat 7 and later, run the following command:

    [root@root ~]# systemctl start iscsi.service

  2. View the host initiator information.

    [root@root ~]#cat /etc/iscsi/initiatorname.iscsi  
    InitiatorName=iqn.1994-05.com.redhat:d0104b56adc6

    The output shows that the host initiator name is iqn.1994-05.com.redhat:d0104b56adc6.

    An iSCSI initiator name must comply with the following format:

    iqn.domaindate.reverse.domain.name:optional name

    An iSCSI initiator name contains only:

    • Special characters: hyphens (-), periods (.), and colons (:)
    • Lower-case letters
    • Digits

    An iSCSI initiator name can contain a maximum of 223 characters.

  3. Query targets.

    For example, if the service IP address of the storage port is 192.168.5.6, run the following command on the host to query targets:

    [root@root ~]# iscsiadm -m discovery -t st -p 192.168.5.6  
    Starting iscsid:                                           [  OK  ]  
    192.168.5.6:3260,257 iqn.2006-08.com.huawei:oceanstor:21000022a10b7bb2::192.168.5.6-20100

  4. Log in to the target.

    [root@root ~]# iscsiadm -m node -p 192.168.5.6 -l  
    Logging in to [iface: default, target: iqn.2006-08.com.huawei:oceanstor:21000022a10b7bb2::192.168.5.6-20100, portal: 192.168.5.6,3260] (multiple)  
    Login to [iface: default, target: iqn.2006-08.com.huawei:oceanstor:21000022a10b7bb2::192.168.5.6-20100, portal: 192.168.5.6,3260] successful.

  5. Configure the iscsi service to run upon system startup.

    For systems earlier than Red Hat 7, run the following command:

    [root@root ~]# chkconfig iscsi on

    For Red Hat 7 and later, run the following command:

    [root@root ~]# systemctl enable iscsi.service

  6. Configure the host to automatically log in to the target upon startup.

    [root@root ~ ]# iscsiadm -m node -o update -n node.startup -v automatic

  7. If CHAP authentication is not required between the storage system and host, the host initiator configuration is completed. If CHAP authentication is required, run the iscsiadm command.

    [root@root ~]# iscsiadm -m node -o update -p 192.168.5.6 -n node.session.auth.authmethod -v CHAP  
    [root@root ~]# iscsiadm -m node -o update -p 192.168.5.6 -n node.session.auth.username -v root  
    [root@root ~]# iscsiadm -m node -o update -p 192.168.5.6 -n node.session.auth.password -v huawei123456  
    [root@root ~]# /etc/init.d/iscsi restart  
    Stopping iSCSI daemon: 
    iscsid dead but pid file exists                            [  OK  ]  
    Turning off network shutdown. Starting iSCSI daemon:       [  OK  ]  
                                                               [  OK  ]  
    Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2006-08.com.huawei:oceanstor:21000022a10b7bb2::192.168.5.6-20100, portal: 192.168.5.6,3260]  
    Login to [iface: default, target: iqn.2006-08.com.huawei:oceanstor:21000022a10b7bb2::192.168.5.6-20100, portal: 192.168.5.6,3260]: successful  
                                                               [  OK  ]

    For Red Hat 7 and later, run systemctl restart iscsi.service to restart the iSCSI service.

    When the iscsiadm command is executed, the user name and password of the initiator that was added to the storage system are required. If the user name and password used in this command are different from the initiator's, you will fail to establish connections between the storage system and the host.

    The command syntax is as follows:

    iscsiadm -m node -o update -p targetip -n node.session.auth.authmethod -v CHAP 
    iscsiadm -m node -o update -p targetip -n node.session.auth.username -v username 
    iscsiadm -m node -o update -p targetip -n node.session.auth.password -v password

    You are advised to run the iscsiadm command to modify related parameters. Do not modify the parameters using the configuration file.

Configuring Initiators using the iscsi.conf Configuration File

On some Red Hat operating systems of an early version, the iscsiadm command is unavailable. You need to use the configuration file to configure initiators.

  1. Start the iSCSI service.

    [root@localhost ~]# /etc/init.d/iscsi start

  2. View the host initiator information.

    [root@localhost ~]#cat /etc/iscsi/initiatorname.iscsi  
    InitiatorName=iqn.1994-05.com.redhat:d0104b56adc6

    The output shows that the name of the host initiator is iqn.1994-05.com.redhat:d0104b56adc6.

    An iSCSI initiator name must comply with the following format:

    iqn.domaindate.reverse.domain.name:optional name

    An iSCSI initiator name contains only:

    • Special characters: hyphens (-), periods (.), and colons (:)
    • Lower-case letters, for example, a to z
    • Digits, for example, 0 to 9

    An iSCSI initiator name can contain a maximum of 223 characters.

  3. Add the port address of the storage system.

    [root@localhost ~]# vi /etc/iscsi.conf

    In the configuration file, add the IP address of the storage system port connected to the host in DiscoveryAddress=xx.xx.xx.xx. Ensure that no space is left in front of DiscoveryAddress=xx.xx.xx.xx.

  4. Restart the iSCSI service.

    [root@localhost ~]# /etc/init.d/iscsi restart  
    Searching for iscsi-based multipath maps  
    Found 0 maps  
    Stopping iscsid: iscsid not running  
      
    Checking iscsi config:                                     [  OK  ]  
    Loading iscsi driver:                                      [  OK  ]  
    Starting iscsid:                                           [  OK  ]

  5. Modify the initiator startup configuration.

    Run the chkconfig iscsi on command to configure the iscsi service to run upon system startup.

  6. Configure the host to automatically log in to the target upon startup.

    [root@root ~ ]# iscsiadm -m node -o update -n node.startup -v automatic

  7. If CHAP authentication is not required between the storage system and host, skip this step.

    In the /etc/iscsi.conf file, add the target IP address for CHAP authentication and specify the user name and password of the initiator used for target authentication. Related parameters are as follows:

    DiscoveryAddress=xx.xx.xx.xx

    OutgoingUsername=xxx

    OutgoingPassword=xxxx

    Remove only pounds (#) in front of OutgoingUsername/OutgoingPassword and keep the space in front of them unchanged.

Download
Updated: 2020-01-17

Document ID: EDOC1000150157

Views: 68407

Downloads: 2059

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next