Monday, October 22, 2012

NFS share issues with multiple ip on a host



NAS box has a share which is to be mounted on a client


NAS box: myNasBox
Client: SolZone1


NAS box has provided access to the ip/hostname of the host

(SolZone1:/)# nslookup SolZone1
Server:         10.10.134.3
Address:        10.10.134.3#53

Name:   SolZone1.bc
Address: 45.26.20.216

But the mounting failed with permission error

(SolZone1:/)# mount -F nfs -o rw,bg,soft,vers=3 myNasBox:/nasdump/nasdata /nasdata
nfs mount: myNasBox:/nasdump/nasdata: Permission denied


Issue identified as below

(SolZone1:/)# traceroute myNasBox
traceroute: Warning: Multiple interfaces found; using 10.12.12.12 @ aggr535001:3
traceroute to myNasBox (10.12.11.45), 30 hops max, 40 byte packets
 1  10.13.142.2 (10.13.142.2)  0.713 ms  0.710 ms  0.574 ms
 2  172.27.128.113 (172.27.128.113)  3.354 ms  3.056 ms  2.407 ms
 3  172.27.128.142 (172.27.128.142)  2.375 ms  8.416 ms  2.308 ms
 4  nas-box-14 (10.12.11.45)  1.406 ms  1.481 ms  1.427 ms
(SolZone1:/)#

The traffic comes through the ip 10.12.12.12

(SolZone1:/)# nslookup 10.12.12.12
Server:         10.10.134.3
Address:        10.10.134.3#53

12.142.120.10.in-addr.arpa      name = SolZone1-lb.bc.

Multiple ip's for the host

(SolZone1:/)# ifconfig -a
lo0:7: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
aggr209001:1: flags=201000843 mtu 1500 index 4
        inet 45.16.20.26 netmask fffffe00 broadcast 45.216.205.255
aggr302001:3: flags=201000843 mtu 1500 index 5
        inet 45.29.1.8 netmask ffffff00 broadcast 45.219.1.255
aggr535001:3: flags=201000843 mtu 1500 index 6
        inet 10.12.12.12 netmask ffffff00 broadcast 10.13.142.255
nxge200006:1: flags=201000843 mtu 1500 index 7
        inet 10.28.18.165 netmask fffffe00 broadcast 10.48.129.255
(SolZone1:/)#


NAS is adapted to permit the ip 10.12.12.12.

Now the mount is successfull

(SolZone1:/)# mount -F nfs -o rw,bg,soft,vers=3 myNasBox:/nasdump/nasdata /nasdata

(SolZone1:/)# bdf /nasdata
Filesystem            kbytes    used   avail capacity  Mounted on
myNasBox:/nasdump/nasdata
                     4017992400 1317611268 2722172800    33%    /nasdata
(SolZone1:/)#

"kill -9" fails... why?


Kill -9 >> Process still alive !!!!


A signal is a message sent to a process to interrupt it and cause a response. If the process has been designed to respond to signals of the type sent it does so; otherwise, it terminates. There are 42 signals, as defined in the signal(5) man page. 


Why sometime process cannot be killed with kill -9?

If the process is hung waiting for I/O (or some other kernel resource) it will behave that way. The problem is the process is hung waiting for an I/O to return and is unable to service the signal. So it never gets killed. Usually reboot is the only solution for this condition.

Sometimes a process will be waiting for kernel to do some I/O and the kernel is waiting for a timeout because of a hardware error, etc. This can happen if you try to do a file copy for instance and a harddrive fails. The 'cp' command may not be killable until the kernel timeout has occurred (this may hang indefinately).

stale NFS mounts will cause the issue if hard mount is used. One way to avoid hung processes is to "soft" mount the NFS mounts. 


https://forums.oracle.com/thread/2398407

http://docs.oracle.com/cd/E19455-01/806-1360/processmanagerusing-62/index.html

Monday, October 15, 2012

HP-UX sw* operations


HP-UX Package install/uninstall/list operations


### Find the available depot on a host

in the local host :

**swlist -i -d @ /var/opt/pkgs/depots/Rel.11.31/apps

In a remote host :

root@MyHPHOST:/hroot# swlist -l depot -s MyHPHOST2 -d /var/opt/pkgs/depots/Rel.11.31/apps
# Initializing...
# Target "MyHPHOST2" has the following depot(s):
  /var/opt/pkgs/depots/Rel.11.23/core
  /var/opt/pkgs/depots/Rel.11.23/apps
  /var/opt/pkgs/depots/Rel.11.31/core
  /var/opt/pkgs/depots/Rel.11.31/apps
  /var/opt/pkgs/depots/Rel.11.11/core
  /var/opt/pkgs/depots/Rel.11.11/apps
  /var/spool/sw
root@MyHPHOST:/hroot#


### Find a specific Package in the depot

root@MyHPHOST:/hroot# swlist -d -l product NMSAP @ MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps
# Initializing...
# Contacting target "MyHPHOST2"...
#
# Target:  MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps
#

  NMSAP         4.0            NetWorker Module for SAP with Oracle
root@MyHPHOST:/hroot#


root@MyHPHOST:/hroot# swlist -d -l product @ MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps | grep NMSAP
  NMSAP                 4.0            NetWorker Module for SAP with Oracle
root@MyHPHOST:/hroot#



### Find the list of files in a specific package

root@MyHPHOST:/hroot# swlist -d -l file NMSAP @ MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps
# Initializing...
# Contacting target "MyHPHOST2"...
#
# Target:  MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps
#

# NMSAP                 4.0            NetWorker Module for SAP with Oracle
# NMSAP.lgto-nmsap      4.0            NetWorker Module for SAP with Oracle
  /etc/init.utl
  /etc/nsrsapsv.cfg
  /etc/nwsldreg.xml
  /opt/networker/bin/backint
  /opt/networker/bin/nsrsapadm
  /opt/networker/bin/nsrsapprobe
  /opt/networker/bin/nsrsapra
  /opt/networker/bin/nsrsaprachild
  /opt/networker/bin/nsrsapsv
  /opt/networker/bin/sapclone
  /opt/networker/bin/sapra.jar
  /opt/networker/bin/sapra_res.jar
  /opt/networker/lib/apps/nmsap/hpux64/libcommonssl.7.6.dev.139.so
  /opt/networker/man/man8/backint.8
  /opt/networker/man/man8/nsrsapadm.8
  /opt/networker/man/man8/nsrsapprobe.8
  /opt/networker/man/man8/nsrsapsv.8
  /opt/networker/man/man8/sapclone.8
  /usr/lib/libnworasap.so
root@MyHPHOST:/hroot#


### Remove a package

root@MyHPHOST:/hroot# swlist -l product | grep NMSAP
  NMSAP                 3.5            EMC NetWorker Module for SAP with Oracle
root@MyHPHOST:/hroot#
root@MyHPHOST:/hroot# swremove NMSAP

=======  08/21/13 14:26:51 METDST  BEGIN swremove SESSION
         (non-interactive) (jobid=MyHPHOST-0432)

       * Session started for user "root@MyHPHOST".

       * Beginning Selection
       * Target connection succeeded for "MyHPHOST:/".
       * Software selections:
             NMSAP.lgto-nmsap,l=/,r=3.5,a=HP-UX_11.XX_64
       * Selection succeeded.


       * Beginning Analysis
       * Session selections have been saved in the file
         "/hroot/.sw/sessions/swremove.last".
       * The analysis phase succeeded for "MyHPHOST:/".
       * Analysis succeeded.


       * Beginning Execution
       * The execution phase succeeded for "MyHPHOST:/".
       * Execution succeeded.


NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log MyHPHOST-0432 @ MyHPHOST:/".

=======  08/21/13 14:27:11 METDST  END swremove SESSION
         (non-interactive) (jobid=MyHPHOST-0432)

root@MyHPHOST:/hroot# swlist -l product | grep NMSAP
root@MyHPHOST:/hroot#



### Install a package



root@MyHPHOST:/hroot# swinstall -s MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps NMSAP

=======  08/21/13 14:30:47 METDST  BEGIN swinstall SESSION
         (non-interactive) (jobid=MyHPHOST-0433)

       * Session started for user "root@MyHPHOST".

       * Beginning Selection
       * Target connection succeeded for "MyHPHOST:/".
       * Source connection succeeded for
         "MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps".
       * Source:
         MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps
       * Targets:                MyHPHOST:/
       * Software selections:
             NMSAP.lgto-nmsap,r=4.0,a=HP-UX_11.XX_64
           + NetWorker.nwr-cbin,r=7.6.3,a=HP-UX_11.XX_64
       * A "+" indicates an automatic selection due to dependency or
         the automatic selection of a patch or reference bundle.
       * Selection succeeded.


       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/hroot/.sw/sessions/swinstall.last".
       * "MyHPHOST:/":  1 filesets have a version with a higher
         revision number already installed.
ERROR:   "MyHPHOST:/":  The software dependencies for 1 products or
         filesets cannot be resolved.
       * The analysis phase failed for "MyHPHOST:/".
       * Analysis and Execution had errors.


ERROR:   More information may be found in the agent logfile using the
         command "swjob -a log MyHPHOST-0433 @ MyHPHOST:/".

=======  08/21/13 14:31:03 METDST  END swinstall SESSION
         (non-interactive) (jobid=MyHPHOST-0433)

root@MyHPHOST:/hroot# 

*** Failed becasue of dependencies. To overcomes this, evaluate the dependency condition and exclude it if possible


root@MyHPHOST:/hroot# swinstall -s MyHPHOST2:/var/opt/pkgs/depots/Rel.11.31/apps -x enforce_dependencies=false NMSAP





root@MyHPHOST:/hroot# swlist -l product | grep NMSAP
  NMSAP                 4.0            NetWorker Module for SAP with Oracle
root@MyHPHOST:/hroot#



Wednesday, October 10, 2012

FTP site command



UMASK for ftp can be set globally by adding the proper value for umask in the file /etc/ftpd/ftpaccess


But how can umask be used from a client system to be executed on the remote server instead of the global setting?

To send some commands from client to server where it can be executed.

For eg) To set UMASK for a user on the remote server, use 


ftp> site UMASK



SITE command can be used for a number of other operations as well as seen in the ftp help menu



ftp> site help

214-The following SITE commands are recognized (* =>'s unimplemented).
   UMASK           GROUP           INDEX           GROUPS
   IDLE            GPASS           EXEC            CHECKMETHOD
   CHMOD           NEWER           ALIAS           CHECKSUM
   HELP            MINFO           CDPATH
214 Direct comments to ftp-bugs@solaris1.
ftp>