Loading Host and WWN Relationships
In environments with firewall restrictions, Capacity Manager Host Resources data cannot be collected. APTARE provides a utility for manually loading host and Worldwide Name (WWN) relationships into the Portal database so that this limited information can be included in the standard Capacity Manager reports.
This utility takes a comma-separated values (CSV) file as input and populates database tables so that the Host Bus Adapter (HBA) data is available in reports.
Loading the Host HBA Port Data
This utility provides an bulk-load method for populating the database with host data.
Create a CSV File
In preparation for loading host data, enter the information into a spreadsheet from which you will create a comma-separated file.
The table in the spreadsheet should be in the following format:
• first column - host name
• second column - node WWN
• third column - port WWN
Example of a Host WWN CSV File
test_host, 50:06:0E:80:05:63:B7:20, 50:06:0E:80:05:63:B7:21
If a host has multiple HBAs, the CSV should contain a row for every HBA so that all HBAs for the host will be loaded. For example:
host123, 50:06:0E:80:05:63:B7:20, 50:06:0E:80:05:63:B7:21
host123, 50:06:0E:80:05:63:B7:21, 50:06:0E:80:05:63:B7:24
host123, 50:06:0E:80:05:63:B7:25, 50:06:0E:80:05:63:B7:26
Execute the Script
To load host HBA port data
Note: When running this script, pay attention to the value you supply for the isIncremental parameter. When you specify ‘N’ your existing host data is deleted. When you specify ‘Y’ your host data is added without removing existing records.
1. Create a table in a spreadsheet, as shown in the above example. Save the table as a comma-separated file (for example, hostWWN.csv).
2. Log on to the Portal Server as user aptare.
3. At the command prompt, type: sqlplus <pwd>/<pwd>
4. Execute the following at the SQL prompt:
SQL> Execute srm_load_pkg.loadHBAPortFile(‘<domainName>’, ‘<isIncremental>’, ‘<CSVfile>’, ‘<logPathname>’, ‘<logFilename>’, [, ‘<source_name>’]);
where:
‘domainName’ | StorageConsole domain name (enclosed in single straight quotes) |
‘isIncremental’ | ‘Y’ or ‘N’ (enclosed in single straight quotes) to indicate if it is an incremental load. If ‘Y’, an HBA port record will be created if none exists. If ‘N’, old HBA port records will be deleted first and then new records created. Take care when choosing this option, as it will remove existing host data from the database. |
‘CSVfile’ | CSV file path and name (enclosed in single straight quotes) |
‘logPathname’ | Log path name (enclosed in single straight quotes). The audit log file is created only if errors occur. Other status is logged in scon.log. |
‘logFilename’ | Log file name (enclosed in single straight quotes). This audit log file is created only if errors occur. Other status is logged in scon.log. |
‘source_name’ | source_name is an optional, case-insensitive string, up to 100 characters, representing the source of the host details; for example, CMDB might be relevant for a change management database. This source information is retained for historical purposes, to track how the host was added to the database. If nothing or NULL is provided for this parameter, HBA CSV Load will be inserted as the source into the reporting database. |
Example:
Execute srm_load_pkg.loadHBAPortFile(‘corpHost1’, ‘Y’, ‘/tmp/hba_port_data.txt’,
‘/tmp’, ‘hba_port_data.log’, ‘CMDB’);
5. IMPORTANT: If you created a new
source_name, you need to insert it into the custom host source ranking table using the instructions provided in
Setting a Host’s Priority.