Monday, April 22, 2013

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 -al

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

Friday, April 13, 2012

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

Wednesday, January 19, 2011

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

Friday, December 17, 2010

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

Thursday, December 9, 2010

Managing vPars in SuperDome 2

1. To start a vpar from MON> prompt,

MON> vparload -p vPar_name

2. To boot a vpar from command line,

# vparload -p vPar_name

3. To show vpar info from MO> prompt,

MON> vparinfo

4. To show vpar status from command prompt,
# vparstatus

Under Construction.