Creating host objects using the CLI Scenario: typical usage for the command-line interface Create VDisk-to-host mappings using the CLI

This task provides step-by-step instructions about how to create host objects.

Steps

Perform the following steps to create host objects:

  1. Open a command prompt window.
  2. Type the svctask mkhost command to create a logical host object. Assign your WWPN for the HBAs in the hosts.
    Example

    In our hypothetical scenario, the command to create a host is:

    svctask mkhost -name demohost1 -hbawwpn  210100e08b251dd4 

    This command will create a host called demohost1 with the HBA WWPN of 210100e08b251dd4.

  3. Type the svctask addhostport command to add ports to the host.
    Example

    In our hypothetical scenario, the command to add a port to the host is:

    svctask mkhost -name demohost2 -hbawwpn  210100e08b251dd5 

    This command will add another HBA WWPN called 210100e08b251dd5 to the host that we created in step 2.

    Example

    In our hypothetical scenario, the command to create a second host is:

    svctask mkhost -hbawwpn 210100e08b251dd6:210100e08b251dd7 -name demohost2

    This command will create a second host called demohost2 with the HBA WWPN of 210100e08b251dd6, 210100e08b251dd7.

    Note:Note: If you were to add a host with a faulty WWPN, or the WWPN had been assigned to the wrong host, you will need to issue the svctask addhostport command to add that same host with the correct WWPN, then issue the svctask rmhostport command to delete the host with the wrong or faulty WWPN. For example, if you had a host called demohost1 and its WWPN stopped working, you would need to issue the following:
    svctask addhostport -hbawwpn 210100e08b251dd4 demohost1
    This would add the host called demohost1 with the WWPN, 210100e08b251dd4. You would then need to issue the svctask rmhostport command to delete the host with the WWPN that had stopped working. For example, you would issue the following:
    svctask rmhostport -hbawwpn 210100e08b251dd5 demohost1
    From these two commands, you have deleted the host with the WWPN 210100e08b251dd5, and have added the same host with the WWPN 210100e08b251dd4.
Related topics Scenario: typical usage for the command-line interface Create VDisk-to-host mappings using the CLI

(C) Copyright International Business Machines Corporation 2003, 2004