Friday, September 25, 2015

OVM Local Disk Tips


OVM Local Disk Tips


You must have at least two physical disks in your OVM server. Two partitons on
one disk will not work. OVM Server will claim the entire first disk for
installation. You can then use the second disk as local storage, if, and only if,
the second disk is completely blank. If there are any partitions of any type on
the second disk, it will not be recognized under OVM as a local disk.

Local disks are not supported by Oracle. Using local disks for anything other
than basic and preliminary learning of how to work with OVM with a limited
hardware inventory such as a couple of laptops or desktops, is a very bad idea.

Verify all partions are removed from 2nd non-OS local disk on OVM Server.
$ fdisk -l

On Ubuntu Linux, use sudo to prefix each command, as in:
$ sudo fdisk -l
(enter root password)

If your first disk is /dev/sda and your second disk is /dev/sdb,
use fdisk to remove all partitions on the second disk, /dev/sdb.
$ fdisk /dev/sdb
p(rint)
d(elete partition) 1, d 2, d 3, etc.
w(rite)
q(uit)

multipathd needs to be running on your OVM Server, even if no
multipath storage exists on the system.
     # chkconfig --list multipathd
     # chkconfig multipathd on
     # chkconfig --list multipathd
     # service multipathd restart

verify multipathd lists the local storage on your OVM Server.
     # multipath -ll
     # multipath -ll -v[1..3] (Verying levels of detail)

verify storage discovery works
     # storage_discover --infoDumpType=disk_XML

I run OVMM (OVM Manager) on a laptop with 4GB of RAM as a VirtualBox VM. Slow
but functional. YMMV.

On the OVMM OS (physical OS or VM), ensure iptables are disabled.
     # chkconfig --list iptables
     # chkconfig iptables off
     # chkconfig --list iptables
# service iptables stop

Rescan the Physical Disks on the OVM Server from OVMM.

Create repository on local disk per Appendix C of OVM Quick Start Guide.
Happy learning.


"Create repository on local disk per Appendix C of OVM Quick Start Guide."

That only used to be true. It got dropped in the 3.0.3 version of the doc. To find Appendix C, you must look in an older version of the guide, ovm3-quick-start-guide-wp-516656.pdf, at: http://www.oracle.com/technetwork/server-storage/vm/ovm3-quick-start-guide-wp-516656.pdf

"Local disks are not supported by Oracle"
Untrue. See above mentioned doc.



I found all that was necessary is to partition your local array in your RAID controller into two or more virtual disks (BEFORE installing the VM Server.). 
Only present one of the virtual disks to the VM Server install. The other(s) will then be available to use as local storage within the VM Manager.
Of course the first time through the server setup I got it wrong... but that's history now...


Hello.. I've tried multiple times too, to get the local disks to be discovered, but having no luck.

Hardware.. IBM x346 server.. 2 x 73gb drives (mirror)... 4 x 146gb drives (raid 5).

Install OVM Server 3.0.3 server and it installs to /dev/sba no problem... It trys to install the / to the /dev/sdb, but I remove it and put it back on /dev/sba, so that nothing but Free Space is showing for /dev/sdb.

After it's all installed/rebooted, etc.. I go to the OVM Mgr (3.0.3 build 240) server and discover the new box.
It sees the oelvmibm02 server. I'm able to add it to the ibm-pool, and when I discover Physical Disks.. nothing shows.

I've ensured that iptables is OFF for the vm mgr server.

I've looked at the multipathd service on VM Svr.. it's running.
However, when I issue the command multipath -ll 
here is what I get:
DM multipath kernel driver not loaded

I've reinstalled OVM Svr 3.0.3 multiple times on this box, with different configuration trying to get it to recognize the 2nd array so I can have a repository, but nothing seems to work.

Any ideas on what to try next? I'm all open for suggestions.

don't know if this affected others on this list but this one caused me to not see local disk

6.4.3. Local SAS Hard Disks Not Supported for Storage
If you use an Oracle VM Server with local SAS hard disks installed, empty disks of this type are not discovered in Oracle VM Manager and therefore cannot be used as local storage. This is caused by the fact that local SAS disks are not associated with a (local) storage array. SAS hard disks can therefore only be used for installing Oracle VM Server on them; they cannot be used for storage repositories, server pool file systems or raw LUNs as virtual machine disks.

Thursday, September 17, 2015

Oracle Applications Requiring a 32bit Client

Oracle Applications Requiring a 32bit Client

Description

Oracle 11g 64-bit installations no longer include the 32-bit libraries, therefore a seperate installation and patching process must be performed if you want access to 32bit libraries.

Fix

1. Download the 32bit client from OTN
  • linux_11gR2_client.zip : 642,016,988 bytes; cksum - 1997033971
2. Configure the DISPLAY variable, if not already set.
3. Start X-server, if not already running.
4. Unset the ORACLE_SIDORACLE_HOME and TNS_ADMIN
  • unset ORACLE_SID
  • unset ORACLE_HOME
  • unset TNS_ADMIN
5. Start the installer.
  • cd /u01/app/oracle/SOFTWARE/client
  • ./runInstaller
6. Follow the instructions as demonstrated in the Example 32-bit Install section below.
7. Patch the 32-bit software home with any relevant CPU or PSU patches

Wednesday, September 16, 2015

How to disable autostart for some particular CRS resource

How to disable autostart for some particular CRS resource

posted May 25, 2009, 8:02 AM by Lalit Verma   [ updated Dec 11, 2009, 12:37 AM ]
[oracle@rc1.myrac.com] # . setcrs

[oracle@rc1.myrac.com] # env | grep ORA

ORACLE_SID=rdb1
ORACLE_BASE=/u01/app/oracle/product
ORACLE_HOME=/u01/app/oracle/product/crs

[oracle@rc1.myrac.com] # cst
HA Resource                                   Target     State
-----------                                   ------     -----
ora.rc1.ASM1.asm                              ONLINE     ONLINE on rc1
ora.rc1.LISTENER_DB_RC1.lsnr                  ONLINE     ONLINE on rc1
ora.rc1.LISTENER_RC1.lsnr                     ONLINE     ONLINE on rc1
ora.rc1.gsd                                   ONLINE     ONLINE on rc1
ora.rc1.ons                                   ONLINE     ONLINE on rc1
ora.rc1.vip                                   ONLINE     ONLINE on rc1
ora.rc2.ASM2.asm                              ONLINE     ONLINE on rc2
ora.rc2.LISTENER_DB_RC2.lsnr                  ONLINE     ONLINE on rc2
ora.rc2.LISTENER_RC2.lsnr                     ONLINE     ONLINE on rc2
ora.rc2.gsd                                   ONLINE     ONLINE on rc2
ora.rc2.ons                                   ONLINE     ONLINE on rc2
ora.rc2.vip                                   ONLINE     ONLINE on rc2
ora.rdb.db                                    ONLINE     ONLINE on rc1
ora.rdb.rdb1.inst                             ONLINE     ONLINE on rc1
ora.rdb.rdb2.inst                             ONLINE     ONLINE on rc2
ora.rdb.serv1.cs                              ONLINE     ONLINE on rc1
ora.rdb.serv1.rdb1.srv                        ONLINE     ONLINE on rc1

[oracle@rc1.myrac.com] # crs_stat -p ora.rc1.LISTENER_DB_RC1.lsnr
NAME=ora.rc1.LISTENER_DB_RC1.lsnr
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/db/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for listener on node
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=rc1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.rc1.vip
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=

As you saw above the -p switch is uesd to list properties of particular CRS resource. CRS uses profiles for its resources for any change to be implemented, the next time it will be started. These profiles are under $ORA_CRS_HOME/crs/public

[oracle@rc1.myrac.com] # cd $ORA_CRS_HOME/crs/public
[oracle@rc1.myrac.com] # pwd
/u01/app/oracle/product/crs/crs/public
[oracle@rc1.myrac.com] # ls -ltr
total 8
-rwxr-x--- 1 oracle oinstall 3396 Aug  3  2004 action_scr.scr
-rw-r----- 1 oracle oinstall  820 May 12 19:27 ora.rc1.LISTENER_RC1.lsnr.cap


Now let us modify the resource ora.rc1.LISTENER_DB_RC1.lsnr so that it would not be restarted automatically.

(A)    Create the Profile for ora.rc1.LISTENER_DB_RC1.lsnr under $ORA_CRS_HOME/crs/public

[oracle@rc1.myrac.com] #  crs_stat -p ora.rc1.LISTENER_DB_RC1.lsnr >$ORA_CRS_HOME/crs/public/
ora.rc1.LISTENER_DB_RC1.lsnr.cap

[oracle@rc1.myrac.com] # crs_stat -p ora.rc1.LISTENER_DB_RC1.lsnr > $ORA_CRS_HOME/crs/public/ora.rc1.LISTENER_DB_RC1.lsnr.cap
[oracle@rc1.myrac.com] # cd $ORA_CRS_HOME/crs/public/
[oracle@rc1.myrac.com] # ls -ltr
total 12
-rwxr-x--- 1 oracle oinstall 3396 Aug  3  2004 action_scr.scr
-rw-r----- 1 oracle oinstall  820 May 12 19:27 ora.rc1.LISTENER_RC1.lsnr.cap
-rw-r--r-- 1 oracle oinstall  822 May 25 20:36 ora.rc1.LISTENER_DB_RC1.lsnr.cap

[oracle@rc1.myrac.com] # cat ora.rc1.LISTENER_DB_RC1.lsnr.cap
NAME=ora.rc1.LISTENER_DB_RC1.lsnr
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/db/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for listener on node
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=rc1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.rc1.vip
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=

(B)    vi  $ORA_CRS_HOME/crs/public/ora.rc1.LISTENER_DB_RC1.lsnr.cap

Modify 
"AUTO_START=1" to "AUTO_START=2"  and "RESTART_ATTEMPTS=5" to "RESTART_ATTEMPTS=0"


(C)    Register the configuration changes done on STEP (B) in the resource profile.   

    [oracle@rc1.myrac.com] # crs_register -u ora.rc1.LISTENER_DB_RC1.lsnr


So next time when CRS will try to make this resource up, it will see the profile and will skip this resource and will not start it automatically as we just disabled the autostart and reduced the RESTART_ATTEMPTS by CRS to start this resource to 0.

Tuesday, September 15, 2015

Server Control Utility (SRVCTL)

Server Control Utility (SRVCTL)

To manage the RAC environment, first build a configuration profile and optionally save it. The configuration can be built by commands such as add and setenv. It is a good practice to build configuration profiles and export them to ASCII files.
SRVCTL syntax has the following components:
> srvctl verb noun options
Where:
srvctl is the SRVCTL command.
verb is an action word such as start, stop, or remove.
noun is an object upon which SRVCTL performs the action verb, such as a database or instance. Alternatively, abbreviations can be used, which in this case are db and inst respectively.
options extends the use of preceding verb-noun combinations.
To see the online command syntax and options for each SRVCTL command, enter:
> srvctl verb noun -h

Table 8.9 shows the common SRVCTL verbs.
VERB
DESCRIPTION
add
Add a database or instance.
config
Lists the configuration for the database or instance.
Getenv
Lists the environment variables in the SRVM configuration.
Modify
Modifies the instance configuration.
remove
Removes the database or instance.
Setenv
Sets the environment variable in the SRVM configuration.
Start
Starts the database or instance.
Status
Status of the database or instance.
Stop
Stops the database or instance.
Unsetenv
Sets the environment variable in the SRVM configuration to unspecified
Table 8.9: Common SRVCTL verbs

Table 8.10 shows the common srvctl nouns.
NOUN
ABBREVIATION
DESCRIPTION
database
db
Operation refers to objects for the database.
asm
asm
To add, configure, enable, start, obtain the status of, stop, disable, and remove ASM instances.
instance
Inst
Operation refers to objects for the instances.
nodeapps
no abbreviation
To add, configure, modify, manage environment variables for, start, obtain the status of, stop, and remove node applications.
Service
serv
To add, configure, modify, manage environment variables for, enable, start, obtain the status of, relocate, disable, stop, and remove services from your cluster database.
Table 8.10: Common SRVCTL nouns

Table 8.11 shows the common srvctl command options.
OPTION
MEANING
-d
Database name
-h
Print Usage
-i
Comma-separated list of instance names
-n
Node names or comma-separated node list
Table 8.11: Common SRVCTL command options

Some commonly used commands will be examined next.
srvctl add

This command adds configuration information for the database or for named instances.  Command specific actions for add command:
OPTION
MEANING
-n
Node name that will support an instance.
-o
$ORACLE_HOME to locate lsnrctl (node option) and oracle binaries (other options)
-s
SPFILE name
-m
Database domain name, in the form ?us.domain.com?

For example, to add a new database:
> srvctl add database -d racdb -o /app/oracle/product/920
To add named instances to a database:
> srvctl add instance -d racdb -i rac1 -n mynode1
> srvctl add instance -d racdb -i rac2 -n mynode2
> srvctl add instance -d racdb -i rac3 -n mynode3

srvctl config
This command displays a list of configured databases. The syntax is:
srvctl config database -d database_name
For example, to display configured databases:
> srvctl  config database -d RACDB
Gives the output:
mynode1 RACDB1 /app/oracle/product/dbms/920
mynode2 RACDB2 /app/oracle/product/dbms/920
srvctl getenv
This command displays values for the environment from the SRVM configuration file. The syntax is:
> srvctl getenv database -d database_name [-t name] 
> srvctl getenv instance -d database_name
  -i instance_name [-t name]
For example, to list all environment variables for a database:
> srvctl getenv database ?d racdb
srvctl setenv
This command sets values for the environment in the SRVM configuration file. The syntax is:
> srvctl setenv database -d database_name
  -t name=value [,name=value,?]
srvctl setenv instance -d database_name
   [-i instance_name] -t name=value [,name=value,?]
For example, to set list all environment variables for a database:
> srvctl setenv database -d mydb -t LANG=en
srvctl start
This command starts the database, all or named instances, and all listeners associated with the database. The syntax is:
> srvctl start database -d database_name
  [-o start_options]  [-c connect_string]
> srvctl start instance -d database_name -i instance_name
  [,insta_name-list] [-o start_options] [-c connect_string]
Command-Specific Options for srvctl start
OPTION
MEANING
-o
Options passed directly to startup command in SQL*Plus including PFILE.
-c
Connect string for connecting to the Oracle instance using SQL*Plus.
For example, to start the database and all enabled instances:
> srvctl start database -d mydb
To start specified instances:
> srvctl start instance -d racdb -i racdb1, racdb3
srvctl status
This command displays the status of the database and instance. The syntax is:
> srvctl status database -d database_name 
> srvctl status instance -d database_name
-i instance_name [,instance_name-list]
For example, to get the current status of two instances:
> srvctl  status instance -d RAC -i racdb1, racdb2
Gives the output:
  Instance RACDB1 is running on node mynode1
  Instance RACDB2 is not running on node mynode1
srvctl stop
This command stops the database and all or named instances. The syntax is:
> srvctl stop database -d database_name
  [-o stop_options] [-c connect_string] 
> srvctl stop instance -d database_name
  -i instance_name [,instance_name_list]
  [-o stop_options][-c connect_string]
For example, to stop the database all instances:
> srvctl stop database -d RACDB
To stop named instances:
> srvctl stop instance -d RACDB -i racdb1
Use the srvconfig command to export/import the SRVM configuration information. The following is an example of how to export the contents of the configuration information to the text file:
> srvconfig -exp file_name
To import the configuration information from the text file named to the configuration repository for the RAC, use the command:
> srvconfig -imp file_name

Tuesday, September 1, 2015

How to install the latest patch in HP-UX 11.31

How to install the latest patch in HP-UX 11.31

1)How to see existing patch installed?

2)Where we can download the latest patch from?

3)How to install?

4)How to revert if any thing goes wrong?

5)Do we need to restart the server after updating patch?

> 1)How to see existing patch installed?

# swlist

> 2)Where we can download the latest patch from?

There is no one "latest patch" but you can find individual patches and/or standard bundles here:

http://www.itrc.hp.com/service/patch/mainPage.do

You can/should also learn about and how to use the Software Assistant Tool (SWA):

www.hp.com/go/swa

3)How to install?

You use :

# swinstall -x autoreboot=true -x patch_match_target=true -s /patches/swdepot \*

4)How to revert if any thing goes wrong?

By default, a rollback image of the predecessor software is kept. TO remove a patch, you use 'swremove' to remove and restore the previous incarnation.

5)Do we need to restart the server after updating patch?

If kernel (PHKL_) or networking patches are applied (PHNE_) then a reboot will be required. This will be automatic if you use the 'swinstall' commandline example above.

You should read:

http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01919407/c01919407.pdf

http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c01976045/c01976045.pdf

  How to Change Instance Type & Security Group of EC2 in AWS By David Taylor Updated April 29, 2023 EC2 stands for Elastic Compute Cloud...