Friday 29 November 2013

Hitachi Storage Management - AIX

Hitachi Storage Management - AIX

Always its tough to find the commands when we are dealing with the Hitachi storage attached luns in AIX. Hitachi storage uses HDLM (Hitachi Dynamic Link Manager) to manage disks on AIX operating system.

Here i am going to describe about the commands,terms and tips related to Hitachi Storage.

Lets get started.

Location of  Commands & Logs:

The location of the scripts:        /usr/DynamicLinkManager/bin/
DLMManager logs:                    /var/DynamicLinkManager/log
Operation logs (command history):   /var/opt/hitachi/HNTRLib2/spool/hntr2[1-16].log
The location of config file:        /usr/D*/drv/dlmfdrv.conf

Commands:

1) To seek Help about commands:

# dlnkmgr help 
dlnkmgr { clear | help | offline | online | set | view }

2) View system and drive information:

#dlnkmgr view -help
#dlnkmgr view -sys [ -sfunc | -msrv | -adrv | -pdrv ] [-t] 
#dlnkmgr view -path [ -c | -hdev HostDeviceName ] [-t] 
#dlnkmgr view -path -item [pn] [dn] [lu] [cp] [type] [ic] [ie] [dnu] [hd] 

dlnkmgr view -hba                  shows info about the hbas
dlnkmgr view -lu                   shows the status of the path (online is OK)
dlnkmgr view -path                 shows that which device uses which path
dlnkmgr view -path -srt lu         useful command as: dlnkmgr view -lu -item
dlnkmgr view -lu -item all         gives a full list
dlnkmgr view -cha                  shows storage channel port, serial number of storage box
dlnkmgr view -sys -lic             shows license information
dlnkmgr view -drv                  shows storsge box serial, and iLU numbers

#dlnkmgr view -sys                shows sytem settings (HDLM version,load balance, health checking...)
    root@aix41: / # dlnkmgr view -sys
    HDLM Version                 : 05-94
    Service Pack Version         :
    Load Balance                 : on(rr)
    Support Cluster              :
    Elog Level                   : 3
    Elog File Size (KB)          : 9900
    Number Of Elog Files         : 2
    Trace Level                  : 0
    Trace File Size (KB)         : 1000
    Number Of Trace Files        : 4
    Path Health Checking         : on(30)
    Auto Failback                : off
    Intermittent Error Monitor   : off
----------------------------------------------------------------------------------------------
#dlnkmgr view -hba
HbaID Port.Bus IO-Count IO-Errors Paths OnlinePaths
00000 08.04     45031              0         4    4
00001 08.03     45999              0         4    4
-------------------------------------------------------------------------------------------------
# dlnkmgr view -path
Paths:000002 OnlinePaths:000002
PathStatus IO-Count IO-Errors
Online 49960 0 

PathID PathName DskName iLU ChaPort Status Type IO-Count IO-Errors DNum HDevName
000000 08.14.0000000000075000.0000 HITACHI .OPEN-V .43194 0085 1G Online Own 25152 0 0 dlmfdrv2
000001 08.3D.0000000000085000.0000 HITACHI .OPEN-V .43194 0085 2G Online Own 24808 0 0 dlmfdrv3
KAPL01001-I The HDLM command completed normally. Operation name = view

3) Clear Error Counters:

# dlnkmgr clear -help
   dlnkmgr clear -pdst [-s]  
 ==> dlnkmgr clear -pdst                  this clears the statistics (I/O counts and I/O errors)

4) Activate/De-Activate dlmfdrv:

The online option allows you to activate a dlmfdrv

# dlnkmgr online -help
Format 
dlnkmgr online [-path] [-pathid AutoPATH_ID] [-s] 

Valid value
AutoPATH_ID {000000 - 999999}(Decimal)  

==> dlnkmgr online -pathid 000023      puts a path to online state

The offline option allows you to disactivate a dlmfdrv 

# dlnkmgr offline -help
Format 
dlnkmgr offline [-path] -pathid AutoPATH_ID [-s] 

Valid value
AutoPATH_ID {000000 - 999999}(Decimal) 

==> dlnkmgr offline -hba <adapter>     puts an hba to offline state (dlnkmgr offline -hba 08.08)

5)Set various dlm values:

# dlnkmgr set -help 
Format 
dlnkmgr set { -lb { on | off } 
| -ellv LogLevel 
| -elfs LogSize 
| -systflv TraceLevel 
| -pchk { on [ -intvl Interval-Time ] | off } 
| -afb { on [ -intvl Interval-Time ] | off } 
| -rsv on ReserveLevel } 
[-s] 

Valid value
LogLevel { 0 | 1 | 2 | 3 } (Default Value 3) 
LogSize { 100 - 9900 }(KB) (Default Value 1000) 
TraceLevel { 0 | 1 | 2 | 3 | 4 } (Default Value 0) 
Interval-Time { 1 - 1440 }(Minute) (Default Value 30) 
(pchk) 
Interval-Time { 1 - 1440 }(Minute) (Default Value 1) 
(afb) 
ReserveLevel on { 0 | 2 } (Default Value "on 0") 

dlnkmgr set -help
dlnkmgr set -lb on -lbtype rr        sets load balancing on (rr:round robin, rr is recommended not exrr: extended rr)
dlnkmgr set -pchk on -intvl 10       sets path health checking on (invl: checking interval (in minutes))
dlnkmgr set -afb on -intvl 10        sets automatic failback on
dlnkmgr set -iem on -intvl 20 -iemnum 2 sets intermittent monitoring on (interval 20 min, the number of times the error is to oocur 2)
dlnkmgr set -ellv 3                  sets the error log collection level (3 is recommended, 0:no log, 1:errors only, 2:1+warnings, 3:2+infos)
dlnkmgr set -systflv 0               sets trace level (0 is recommended, after an error could be set to higher (1) to collect logs)
dlnkmgr set -elfs 9900               sets the error log file size in KB (9900 is recommended)
dlnkmgr set -elfn 2                  sets the number of error log files    (2 is recommended)
dlnkmgr set -systfs 1000             sets the trace file size (1000 is recommended)
dlnkmgr set -systfn 4                sets the number of trace files (4 is recommended)
dlnkmgr set -rsv on 2                sets the reservation level (2 is recommended it means persistent res. level, 0:ignore reservation)
                                     (it's important for reserving disks, if a LUN is not supporting it, it won't reserve the disk)

6) Configuring DLM Disks:

#dlmcfgmgr

7) Adding/Removing Disks from HDLM

Add  disks to HDLM 
If HDLM active – you can remove disks from HDLM without reboot
#/opt/DynamicLinkManager/bin/dlmsetconf
#/opt/DynamicLinkManager/bin/dlmcfgmgr –a

Remove disks from HDLM with reboot
Comment string with disk description in file /opt/DynamicLinkManager/config/dlmfdrv.unconf
#vi /opt/DynamicLinkManager/config/dlmfdrv.unconf
#/opt/DynamicLinkManager/bin/dlmsetconf -u
#reboot -- -r

8) Miscellaneous Commands:

dlmrmdev                             removes dlm devices (/usr/D*/bin/dlmrmdev) (dlmrmdev -A makes umount, varyoff, rmdev)
dlmpr                                it clears persistent reservation in clustered environment
dlmpr -k hdiskX                      shows the reservation key

dlmpr -c hdiskX                      clears the reservation key

lssrc -a | grep -i dlm      shows if HDLM Manager running (startsrc/stopsrc -s DLMManager)

Hitachi Storage Details:


HBA: The cable port on the host is the host bus adapter (HBA)
CHA: The cable port on the storage subsystem is a port (P) on a channel adapter (CHA)
------------------------------------
Product       : 9500V
SerialNumber  : 6123
LUs           : 12

iLU  SLPR HDevName VG OSPathID PathID PathName                        ChaPort CLPR Status     Type IO-Count   IO-Errors  DNum IEP
0062    - hdisk11  -  00000    000000 08.06.0000000000210300.0000     1A         - Online     Own           0          0    0 -
                      00001    000006 09.06.0000000000211300.0000     1B         - Online     Own           0          0    0 -
                      00002    000007 08.07.00000000000E0600.0000     0C         - Online     Non           0          0    0 -
                      00003    000009 09.07.00000000000E1600.0000     0D         - Online     Non           0          0    0 -

Product       : USP
SerialNumber  : 0022137
LUs           : 9

iLU  SLPR HDevName VG OSPathID PathID PathName                        ChaPort CLPR Status     Type IO-Count   IO-Errors  DNum IEP
016F    0 hdisk46  -  00000    000024 08.06.00000000000B8800.0000     3A         0 Online     Own     3201989          0    0 -
                      00001    000025 09.06.00000000000BA600.0000     3E         0 Online     Own     3201945          0    0 -
                      00002    000092 08.07.0000000000240A00.0000     4A         0 Online     Own     3198945          0    0 -
                      00003    000106 09.07.0000000000242A00.0000     4E         0 Online     Own    78042543          0    0 -

PathID:           HDLM manages a path by assigning an ID to it.
OSPathID:         The ID that AIX assigns to a path (lspath shows it as well)
Product:9500V -   HDLM performs load balancing between owner paths or between non-owner paths.
Owner paths are coming from the same CHA. Non-owner paths are coming from the other CHA.
Load is balanced first between the owner paths, if all the owner paths are lost, then between the non owner paths.

Product:USP -     All the paths are owner paths.
                  Load is balanced among all the paths.
Status:
    Online        I/O can be issued normally
    Online (E)    An error occured on the path, and none of the other paths are in Online staus (it still can be used)
    Offline (C)   Path was placed offline by using the command (manually)
    Offline (E)   I/O cannot be performed, because an error occurred in the path

Courtesy:aix4admins

1 comment: