HBA

SAN Management - HBA, LUN, ..

Here are some commands used to manage HBA, SAN LUNs, etc...

To show the connectivity and WWN of a FC adapter :
# fcmsutil /dev/fcd0

To show the VPD (incl firmware) of a FC adapter :
# fcmsutil /dev/fcd1 vpd

To disable a HBA :
# fcmsutil /dev/fcd1 -f disable

To enable a HBA :
# fcmsutil /dev/fcd1 enable

To show the WWN of the SAN Tape Drives:
# fcmsutil /dev/td0 get remote all

To show details for a hardware path :
# ioscan -fnkH 1/0/8/1

To list the EVA Array LUNs:
# evainfo -al

To list the XP Array LUNs:
# xpinfo -i

To list all the devices attached to all the HBAs:
# tdlist
# fcdlist

To list all the tape drives:
# ioscan -funC tape

To list all the tape drives:
# tdlist

To list all the drives (along with their WWN) attached to a specific HBA:
# tdutil /dev/td9 get remote all
# fcmsutil /dev/fcd1 get remote all

To replace WWID:
# scsimgr replace_wwid -C lunpath -I 826 dsf

Some of the IMP PowerPath Commands

1. powermt display – Display High Level HBA I/O Paths
powermt display command (without any arguments), displays the available HBAs and their current status. The following examples, shows that there are 2 HBAs connected to the server, both the HBAs are in active condition with 2 I/O path’s each. qla2xxx indicates that it is using the Q-Logic HBA card.
This also indicates that the connected EMC device is CLARiiON, as it displays a value for “CLARiiON logical device count” as 1.
# powermt display
Symmetrix logical device count=0
CLARiiON logical device count=1
Hitachi logical device count=0
Invista logical device count=0
HP xp logical device count=0
Ess logical device count=0
HP HSx logical device count=0
==============================================================================
----- Host Bus Adapters ---------  ------ I/O Paths -----  ------ Stats ------
###  HW Path                       Summary   Total   Dead  IO/Sec Q-IOs Errors
==============================================================================
   1 qla2xxx                       optimal       2      0       -     0      0
   2 qla2xxx                       optimal       2      0       -     0      0


2. powermt display dev=all – Display All Attached LUNs

This is the most frequently used powermt command, which will display all the attached logical devices to the server.
# powermt display dev=all
Pseudo name=emcpowera
CLARiiON ID=AAA00000000000 [dev-server]
Logical device ID=1111111111111111111 [LUN 1]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sdd       SP A4     active  alive      0      0
   1 qla2xxx                   sde       SP B4     active  alive      0      0
   2 qla2xxx                   sdf       SP A5     active  alive      0      0
   2 qla2xxx                   sdg       SP B5     active  alive      0      0
Pseudo name=emcpowerb
CLARiiON ID=AAA00000000000 [dev-server]
Logical device ID=2111111111111111111 [LUN 2]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP A       Array failover mode: 1
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sdh       SP A4     active  alive      0      0
   1 qla2xxx                   sdi       SP B4     active  alive      0      0
   2 qla2xxx                   sdj       SP A5     active  alive      0      0
   2 qla2xxx                   sdk       SP B5     active  alive      0      0
The above command output indicates the following:
  • Pseudo name=emcpowera – The device name that can be used by the server. For example, /dev/emcpowera.
  • CLARiiON ID=AAA00000000000 [dev-server] - EMC CLARiiON CX3 serial number and the server name.
  • Logical device ID=11111111 [LUN 1] – LUN number. For example, LUN 1.
  • state=alive; policy=CLAROpt; – This displays that this particular LUN is valid and using the CLAROpt policy.
  • Owner: default=SP B, current=SP B – This indicates that the default (and current) owner for this LUN is storage processor SP B.

3. powermt display dev=emcpowera – Display specific LUN

When there are multiple LUNs connected to a server, you might want to view information about a specific LUN by providing the logical name of the LUN as shown below.
# powermt display dev=emcpowera
Pseudo name=emcpowera
CLARiiON ID=AAA00000000000 [dev-server]
Logical device ID=1111111111111111111 [LUN 1]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sdd       SP A4     active  alive      0      0
   1 qla2xxx                   sde       SP B4     active  alive      0      0
   2 qla2xxx                   sdf       SP A5     active  alive      0      0
   2 qla2xxx                   sdg       SP B5     active  alive      0      0
If the device is not available, you’ll get a “Bad dev value” as shown below.
# powermt display dev=emcpowerc
Bad dev value emcpowerc, or not under Powerpath control.

4. powermt check_registration – Display PowerPath Registration Key / Status

If you’ve lost the PowerPath registration key that you’ve used during the EMC PowerPath installation, you can retrieve it using the following command.
# powermt check_registration
Key AAAA-BBBB-CCCC-DDDD-EEEE-FFFF
Product: PowerPath
Capabilities: All

5. powermt display options – Display EMC PowerPath Options

Displays the high level EMC SAN array options as shown below.
# powermt display options
        Default storage system class: all
        Show CLARiiON LUN names:      true
        Path Latency Monitor: Off
        Path Latency Threshold: 0 Sec.
        Storage
        System Class  Attributes
        ------------  ----------
        Symmetrix     periodic autorestore = on
                      status = managed
        CLARiiON      periodic autorestore = on
                      status = managed
        Hitachi       periodic autorestore = on
                      status = managed
        Invista       periodic autorestore = on
                      status = managed
        HP xp         periodic autorestore = on
                      status = managed
        Ess           periodic autorestore = on
                      status = managed
        HP HSx        periodic autorestore = on
                      status = managed

6. powermt display hba_mode – Display PowerPath HBA Mode

This is similar to #1, but displays whether hba is enabled or not, as shown in the last column of the output.
# powermt display hba_mode
Symmetrix logical device count=0
CLARiiON logical device count=1
Hitachi logical device count=0
Invista logical device count=0
HP xp logical device count=0
Ess logical device count=0
HP HSx logical device count=0
==============================================================================
----- Host Bus Adapters ---------  ------ I/O Paths -----  Stats
###  HW Path                       Summary   Total   Dead  Q-IOs Mode
==============================================================================
   1 qla2xxx                       optimal       2      0     0 Enabled
   2 qla2xxx                       optimal       2      0     0 Enabled

7. powermt display path – Display available I/O Paths.

This displays all available path for your SAN device.
# powermt display paths
Symmetrix logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
CLARiiON logical device count=1
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
   1 qla2xxx                      AAA00000000000      SP A4          1       0
   1 qla2xxx                      AAA00000000000      SP B4          1       0
   2 qla2xxx                      AAA00000000000      SP A5          1       0
   2 qla2xxx                      AAA00000000000      SP B5          1       0
Hitachi logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
Invista logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
HP xp logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
Ess logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================
HP HSx logical device count=0
==============================================================================
----- Host Bus Adapters --------- ------ Storage System -----    - I/O Paths -
###  HW Path                           ID          Interface     Total    Dead
==============================================================================

8. powermt displays port_mode – Display Port Status

Displays the status of the individual ports on the HBA. i.e Whether the port is enabled or not.
# powermt display port_mode
Storage class = Symmetrix
==============================================================================
----------- Storage System ---------------     -- I/O Paths --   --- Stats ---
    ID              Interface         Wt_Q      Total    Dead    Q-IOs  Mode
==============================================================================
Storage class = CLARiiON
==============================================================================
----------- Storage System ---------------     -- I/O Paths --   --- Stats ---
    ID              Interface         Wt_Q      Total    Dead    Q-IOs  Mode
==============================================================================
    AAA00000000000     SP A4           256          1       0        0  Enabled
    AAA00000000000     SP B4           256          1       0        0  Enabled
    AAA00000000000     SP A5           256          1       0        0  Enabled
    AAA00000000000     SP B5           256          1       0        0  Enabled

9. powermt version – Display EMC PowerPath Version

How to identify the version number of EMC PowerPath software?
# powermt version
EMC powermt for PowerPath (c) Version 5.3 (build 185)

10. powermt check – Check the I/O Paths

If you have made changes to the HBA’s, or I/O paths, just execute powermt check, to take appropriate action. For example, if you have manually removed an I/O path, check command will detect a dead path and remove it from the EMC path list.
# powermt check
 Warning: storage_system I/O path path_name is dead.
       Do you want to remove it (y/n/a/q)?
Note: If you want powermt to automatically remove all dead paths, without any confirmation, execute “powermt check force”.

11. powermt set mode hba – Forcefully set the mode for a specific HBA

You can change the mode of a specific HBA to either standby or active using this command. Following example, changes HBA #1′s mode from active to standby.
# powermt set mode=standby hba=1
After the above command, you can see the mode for HBA#1 changed to standby, as shown below.
# powermt display dev=all
Pseudo name=emcpowera
CLARiiON ID=AAA00000000000 [dev-server]
Logical device ID=1111111111111111111 [LUN 1]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sdd       SP A4     standby alive      0      0
   1 qla2xxx                   sde       SP B4     standby alive      0      0
   2 qla2xxx                   sdf       SP A5     active  alive      0      0
   2 qla2xxx                   sdg       SP B5     active  alive      0      0
Note: Path mode can also be “unlic” indicating that you’ve not registered the PowerPath with proper License key.
Note: Some powermt commands (for example, powermt set port_disable), is restricted to certain platform and storage type — On AIX and Solaris, only Fibre channel is supported. On HP-UX, only iSCSI and Fibre are supported. On Linux, Only iSCSI (HBAs) and Fibre are supported.

12. powermt remove – Delete an I/O Path

Use this command to remove any specific I/O path (or) a whole device.
The following example has 4 I/O Paths.
# powermt display dev=all
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sdd       SP A4     standby alive      0      0
   1 qla2xxx                   sde       SP B4     standby alive      0      0
   2 qla2xxx                   sdf       SP A5     active  alive      0      0
   2 qla2xxx                   sdg       SP B5     active  alive      0      0
To remove I/O Path sdd, execute the following powermt remove command.
# powermt remove dev=sdd

# powermt display dev=all
==============================================================================
---------------- Host ---------------   - Stor -   -- I/O Path -  -- Stats ---
###  HW Path                I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
   1 qla2xxx                   sde       SP B4     standby alive      0      0
   2 qla2xxx                   sdf       SP A5     active  alive      0      0
   2 qla2xxx                   sdg       SP B5     active  alive      0      0
Following will remove all I/O Path for a particular device. i.e To remove /dev/emcpowera, do the following. If the /dev/emcpowera is mounted and used by some program, following command will not work.
# powermt remove dev=emcpowera

13. powermt config – Configure PowerPath

This command checks for available EMC SAN logical devices and add those to PowerPath configuration list. Powermt config command, sets some of the options to it’s default values. For example, write throttling = off, HBA mode = active, CLARiiON policy = CLAROpt, etc.
Possible EMC SAN LUN policy values are: Adaptive, BasicFailover, CLAROpt, LeastBlocks, LeastIos, NoRedirect, Request, RoundRobin, StreamIO, or SymmOpt.
After you execute the powermt config, if you don’t like any of the default values, you should change it accordingly.
# powermt config

14. powermt restore – Make Dead I/O Path Alive

If you have dead I/O paths, and if you’ve done something to fix the issue, you can request PowerPath to re-check the paths and mark it as active using powermt restore command.
When you execute powermt restore, it does an I/O path check. If a previously dead path is alive, it will be marked as alive, and if a previously alive path is dead, it will be marked as dead.
For some reason, if you see the default owner and the current owner of a particular LUN is not the same storage processor, then execute the following command, which will make the current owner of the LUN same as the default owner.
# powermt restore dev=all
Instead of dev, you can also specify class in the powermt restore command. Class can be one of the following depending on your system.
  • symm – Symmetrix
  • clariion -  CLARiiON
  • invista – Invista
  • ess – IBM ESS
  • hitachi – Hitachi Lightning TagmaStore
  • hpxp -  HP StorageWorks XP, or EVA series
  • hphsx – HP StorageWorks EMA, or MA
  • all – All systems

15. Powermt Save and Load – Save and Restore PowerPath Configurations

powermt save – Save the current Powerpath Configuration

If you are changing the PowerPath configurations for testing purpose, you can save the current configuration using powermt save command.
Use this method to backup the current PowerPath Configurations.
# powermt save
This will save the current powermt configuration to /etc/powermt.custom file. Following is the partial content of this file.
# cat /etc/powermt.custom
global:version:5.3.0.0.0:4.1.0
path_c:sdd:sdd:qla2xxx:0x111
path_c:sde:sde:qla2xxx:0x111
adapter:  1:  1:qla2xxx:0x111:1:0:111:0:11:0
adapter:  2:  2:qla2xxx:0x111:1:0:111:0:111:0
arrPort_c:04000000:04000000:111:111
mpext_cfg:unused:Mp:0:symm:0:0
...
...
If you want to store the current PowePath configuration to a different file, do the following.
# powermt save file=/etc/powermt.21-Aug-2010

powermt load – Load a previously saved EMC PowerPath Configuration

When you are testing EMC PowerPath configuration, if you are not satisfied with the new configuration, you can go back to the previous configuration.
For example, to restore the configuration to a specific file that you created in the above powermt save example, do the following.
# powermt load file=/etc/powermt.21-Aug-2010

Backup and Recovery

1. To backup a filesystem :
# fbackup -f /dev/rmt/0m -i /home

2. To list the contents of the tape media and store it in a file :
# frecover -I /tmp/indexfile -f /dev/rmt/0m

3. To do level 0 (full) backup of a filesystem and also update the file /var/adm/fbackupfiles/dates :
# fbackup -f /dev/rmt/0m -0 -u /home

4. To do a level 1 backup using a graph file to specify which files will be included/excluded :
# fbackup -f /dev/rmt/2m -1 -u -g /var/adm/fbackupfiles/graphs/g0

Graph file content may look like
i /data
e /data/tmp

5. To backup to the tape drive on the remote server :
# fbackup -f host1:/dev/rmt/0m -v -i /home

6. To backup data to two tape drives (one by one) :
# fbackup -f /dev/rmt/0m -f /dev/rmt/1m -i /data

7. To restore all the files from the tape media
# frecover -v -r -f /dev/rmt/0m

8. To show the tape drive status :
# mt -f /dev/mt/0mnb status

9. To eject a tape :
# mt -f /dev/mt/0mnb offline

10. To rewind the tape media :
# mt -f /dev/rmt/0mnb rewind


Managing Printers in HP-UX

Configuration File:
/etc/rc.config.d/lp

Commands:

To stop LP Spooler:
# lpshut

To restart LP Spooler :
# lpshed

To accept print requests :
# accept printerA

To reject future print requests :
# reject -r"Use alternate printer - PrinterB" printerA

To cancel print requests :
# lpcancel printerA

To enable the printer to process requests :
# enable printerA

To disable the printer from processing requests :
# disable -r"PrinterA is disabled" printerA


To view jobs in a print queue :
# lpstat -o printerA

To move the jobs between printers :
# lpmove printerA printer B

To remove the printer :
# lpadmin -xprinterA

To remove a printer from a class :
# lpadmin -pprinterA -rclass1

To set the printer's fence priority (use a value from 0 to 7) :
# lpfence printerA

To cancel a print job :
# cancel job#

To list request ids of all the print jobs:
# lpstat -o

To view view the status of printers and their jobs :
# lpstat

To check the functionality of a printer :
# lpstat -t


HP-UX Kernel

Kernel files are stored under /stand.

Commands :

1. To display detailed information about a kernel module :
# kcmodule -v autofs

2. To load a module :
# kcmodule autofs=best

3. To unload a module :
# kcmodule autofs=unused

4. To view the values of tunables :
# kctune acctresume

5. To view the values of tunables with description :
# kctune -d acctresume

6. To view the values of tunables with detailed information :
# kctune -v acctresume

7. To change a tunable's value to the default :
# kctune nproc=Default

8. To change the value of a tunable :
 # kctune nproc=3500

9. To view the list of module changes  for next boot :
# kcmodule -D

10. To view the list of tunable changes  for next boot :
# kctune -D

11. To view the list of module and tunable changes  for next boot :
# kconfig -D

12. To view the list of module settings that are set to non-default :
# kcmodule -S

13. To view the list of tunable settings that are set to non-default :
# kctune -S

14. To view the list of module and tunable settings that are set to non-default :
# kconfig -S

15. To unhold all the module and tunable settings being held for next boot :
# kconfig -H

Points to remember :

Different states of kernel modules :
unused         -  This module is not used, but installed in the system.
static            -  This module will be statically bound to the kernel executable
loaded         -  This module will be dynamically bound to the kernel while booting
auto             -  The module will be dynamically loaded into the kernel when it is first needed after each boot.


NFS in HP-UX

There has been a vast difference between HP-UX 11i v3 with the older versions.Prior to v3, HP-UX used NFS concepts (commands and files) a like AIx. From v3, it following Solaris-like environment.

Configuration Files :

/etc/exports                  -  Contains a list of exportable file systems. This file is available in upto HP-UX 11i v2
/etc/dfs/dfstab               - Contains a list of sharable file systems. This file is available from HP-UX 11i v3
/etc/rc.config.d/nfsconf  - NFS server configuration file contains the nfs, autofs and mountd daemons startup


Command :

1.  To start NFS server daemons :
# /sbin/init.d/nfs.server start

2. To stop NFS server daemons :
# /sbin/init.d/nfs.server stop

3. To start NFS daemons on system boot,
Change the value of NFS_SERVER to "1" in /etc/rc.config.d/nfsconfig file.


For Ex,
NFS_SERVER=1
4. To export or share a file system :
# exportfs /data         <--- Upto HP-UX 11i v2
# share     /data         <--- From HP-UX 11i v3

5. To unexport or unshaer a file system :
# exportfs -u /data         <--- Upto HP-UX 11i v2
# unshare     /data          <--- From HP-UX 11i v3

6. To export or share all the filesystems defined in /etc/exports or /etc/dfs/dfstab :
# exportfs -a         <--- Upto HP-UX 11i v2
# shareall              <--- From HP-UX 11i v3


Network Configuration in HP-UX

Configuration File :
/etc/rc.config.d/netconf        -  Contains the hostname, ip address, default route
/etc/hosts                            -  Contains the hsotname to IP address mapping
/etc/resolv.conf                   -  Contains DNS server details
/etc/inetd.conf                     - Internet daemon configuration file

Configuration Files used for DNS Client:
/etc/nsswitch.compat
/etc/nsswitch.nis
/etc/nsswitch.ldap
/etc/nsswitch.conf
/etc/nsswitch.files
/etc/nsswitch.hp_defaults

Scripts :
/sbin/init.d/net start  - To start network services
/sbin/init.d/net stop  - To stop network services

Commands :

1. To set the hostname :
# set_parms hostname

2. To set primary ip address :
# set_parms ip_address

3.  To set the default gateway, DNS/NIS server details :
# set_parms addl_netwrk

4.  To restart inetd daemon :
# inetd -c

5. To display the ip address configuration details :
# netstat -i

6. To set the IP details of lan0 :
# ifconfig lan0

7. To display all the network adapters :
# lanscan

8. To display routing table :
# netstat -rn

9. To add a route :
# route add default 192.168.1.254 1

10. To enable a network interface :
# ifconfig lan0 up

11. To disable a network interface :
# ifconfig lan0 down

12. To change NIC settings like speed, duplex,..
# lanadmin


Managing vPars


1. To boot the system in vpmon
ISL> hpux /stand/vpmon
2. To start a vpar from MON> prompt,
MON> vparload -p vPar_name

3. To boot a vpar from command line,
# vparboot -p vPar_name

4. To show vpar info from MO> prompt,
MON> vparinfo

5. To show vpar status from command prompt,
# vparstatus -v 

6. To create new vpar
#vparcreate -p <vpar_name> -a cpu::2 -a cpu:::1:4 -a mem::12288 -a io:0.0.8 -a io:0.0.6 -a io:1.0.8 -a io:1.0.6 -a io:0/0/8/1/0/4/1.0.0:BOOT -a io:0/0/8/1/0/4/0.2.0:TAPE

7. Ignite restore through Ignite server on another vpar of same npar
a) PA-RISC server procedure
vPar1:# vparboot -p vPar0 -I Ignite_serer_IP, /opt/ignite/boot/Rel_b.11.11/WINSTALL 

b) INTEGRITY server procedure
vpar1:# vparboot -p vpar0 -I -s <Ignite server IP> -c <vpar0 IP address> -g <gateway IP> -m <subnet mask> -b /opt/ignite/boot/nbp.efi -o IINSTALL
  • Login to the console of vpar0
  • Select the MAC address to boot with 
  • and Select the OS version

SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment