Monday 1 April 2013

All about Adapters in AIX

All about Adapters in AIX

  1.  Some Adapter Typtes
  2.  Adapter Settings Description
  3.  HOT PLUG adapter replacement
  4.  Adapter replacement with SDD dynamically (hot plug)
  5.  Adapter parameter change with SDD

1) Some Adapter Typtes:

HBA (host bus adapter) is a physical Fibre Channel adapter that can be assigned to a logical partition.

 FC HBA - Fibre Channel Host Bus Adapter

    fcsx - hardware adapter,
    fscsix - fc-scsi protocol device (logical device) (scsi protocol over the fc protocol)
    fcstat fcsX                 fiber channel statistics report

SCSI HBA - SCSI Host Bus Adapter

    sisscsiaX - SCSI ADAPTER (internal disks are connected to this)
    lsdev -C | grep sisscsia   list the scsi adapters
    lsdev -Cs scsi -H          lists the scsi devices with location code

2) Adapter Settings Description:

 root@umaix: / # lsattr -El fscsi0
attach       switch       How this adapter is CONNECTED         False   <-- shows actual connection protocol (None,switch,al lehet)
dyntrk       no           Dynamic Tracking of FC Devices        True    <-- dynamically follows SAN changes
fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True    <-- 3. delayed_fail or fast_fail
scsi_id      0x133300     Adapter SCSI ID                       False
sw_fc_class  3            FC Class for Fabric                   True

root@umaix: / # lsattr -El fcs0
bus_intr_lvl  305        Bus interrupt level                                False
bus_io_addr   0xffc00    Bus I/O address                                    False
bus_mem_addr  0xfffbf000 Bus memory address                                 False
init_link     al         INIT Link flags                                    True    <--al or pt2pt
intr_priority 3          Interrupt priority                                 False
lg_term_dma   0x800000   Long term DMA                                      True    <--deafault 0x200000, max. 0x8000000
max_xfer_size 0x100000   Maximum Transfer Size                              True    <--default is 100000, max 1000000
num_cmd_elems 200        Maximum number of COMMANDS to queue to the adapter True    <--default 200, max is 1024 or 2048
pref_alpa     0x1        Preferred AL_PA                                    True
sw_fc_class   2          FC Class for Fabric                                True

attach:(sets the Fiber Channel topology)
    none: if no cable has been plugged in
    al: all devices are in a loop or ring, similar to token ring networking. The failure of one device causes a break in the ring.
 switch: all devices or loops of devices are connected to Fibre Channel switches, similar conceptually to modern Ethernet implementations
dyntrk:
    http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/fast_fail_dynamic_interaction.htm
    If it is on yes, it enables dynamic changing of fibre channel cable connections on switch ports or storage ports.
    We have changed few StoragePorts to another Switch last saturday ==> that means, that the HardwarePath changed for these servers,
    where the Option "dyntrk" is set to no. --> reconfigure your disks
fc_err_recov:
    http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/fast_fail_dynamic_interaction.htm
    delayed_fail: waits some time before acting.
    fast_fail is useful where multipathing software is used. This would support faster failover to alternate paths
init_link:
    from online help: "Do not change this attribute unless directed by IBM support."
    al: arbitrared loop : first tries al, then pt2pt, if not succes then link remains down
    pt2pt: tries pt2pt, if not succes then link remains down
lg_term_dma:
    it controls the DMA memory resource that an adapter driver can use.
    If you have a dual port adapter the maximum value is divided between the adapter ports.
max_xfer_size:
    controls the maximum transfer size. You can increase this value to improve performance.
    Different storages might need different values to utilize the performance
num_cmd_elems:
    Maximum number of commands to be queued to the adapter.
    When a large number of supported storage devices are configured, you can increase this to improve performance.
    if queue_depth=16  (hdisk or power path) and we have 10 disks, num_cmd_element should be  minimum 160

3) HOT PLUG adapter replacement:

0. lsslot -c pci  (check if the adapter hot pluggable)
1. paths are better in offline (C) state: dlnkmgr offline -hba 01.01
it can be done with "smitty mpio" as well:
> MPIO Management > MPIO Path Management > Remove Paths  > Disable Paths under a Parent
2. rmdev -Rl fcs1 <--(-R: unconfigures the device and its children, -l: specifies the logical device)
3. adapter replacement:
diag --> task selection  --> hot plug task ---> PCI Hot Plug Manager ---> Replace/Remove...

After starting it, adapter will blink.

During replacement we should leave this menu point in open,after replacement we can close this menu point in diag (enter)

(If this menu option is in open state, it will lock the adapter and configuring it is not possible, so should be closed.)
4. cfgmgr, the new device will come up with new WWN (lscfg -vpl fcsX, lsattr -El fscsiX)
5. mail to storage team, for mapping the storage to the new WWN
6. Another cfgmgr will bring up the new disks
7. put adapter to online state: dlnkmgr online -hba 01.01

4) Adapter replacement with SDD dynamically (hot plug):

datapath query adapter                        <--identify the adapter to be replaced
datapath remove adapter X                     <--X is the adapter number to be removed ("select counts" shows I/O still running on other adapt.)
rmdev -dl fcsX -R                             <--remove fcs0 and all of its child devices (lsdev -Cc disk, should not show any device)
diag --> task selection  --> hot plug task ---> PCI Hot Plug Manager ---> Replace/Remove...
(from command line: lscfg -vpl fcs0| grep Adapter -> drslot -R -c pci -s P1-I8 <--P1-I8 is the slot location)
go to the ESS specialist to update the WWN of the new adapter (the zone information of the fabric switch must be updated)
cfgmgr                                        <--check with lsdev -Cc adapter, lsdev -Cc disk
addpaths                                      <--configure the new adapter and its child devices to SDD

5) Adapter parameter change with SDD:

lsattr -El fcsX, lsattr -El fscsiX            <--checking the needed settings (num_cmd_elements, fc_err_recov,...)
rmdev -dl dpo -R                              <--remove SDD vpath devices
rmdev -l fcsX -R                              <--put fc adapter and its children devices to Defined state
chdev -l fcsX -a num_cmd_elems=1024
chdev -l fscsiX -a fc_err_recov=fast_fail
cfgmgr -l fcsX                                <--configiure the fc adapter, children devices and hdisks
cfallvpath                                    <--configure vpaths

0 blogger-disqus:

Post a Comment