Popular Posts

Jun 30, 2017

Solaris Storage Commands



Enable Multipathing for 3PAR storage disks in Solaris 10
Multipathing Using Solaris 10 StorEdge Traffic Manager - 3PAR Storage
Configure Third-Party Storage 3PAR Devices - Only with Solaris 10
Edit the file /kernel/drv/scsi_vhci.conf
Add the vendor ID and product ID entries.
Example:
device-type-scsi-options-list =
"VendorID1ProductID1", "symmetric-option",
"VendorID2ProductID2", "symmetric-option",
symmetric-option = 0x1000000;
Entry to enable Solaris I/O multipathing globally on all the 3PAR StoreServ Storage target ports:
device-type-scsi-options-list =
"VendorID1ProductID1", "symmetric-option",
"VendorID2ProductID2", "symmetric-option",
symmetric-option = 0x1000000;
After enabling multipathing, reboot the system.
         stmsboot –D fp -e
          Or
         # reboot -- -r
          Or
         ok> boot -r


Enabling SSTM/MPxIO Multipathing for Solaris 8 and 9
edit the /kernel/drv/scsi_vhci.conf

file by changing the mpxio-disable parameter to a value of no, and then reboot the host
         mpxio-disable="no";

Find Port-wise disk details in Solaris
         for hba in `fcinfo hba-port | grep WWN | awk '{ print $4 }'` ; do fcinfo remote-port -ls -p $hba >> /tmp/output ; done
                  
         
         

Jun 26, 2017

putty and scp tools in Windows PowerShell and .bat scripts

         
            - plink a command-line interface to the PuTTY back ends,
            - plink is used in windows powershell or .bat scripts to achieve the putty functionality.
                32-bit: DownLoad
                64-bit: DownLoad


            - pscp an SCP client, i.e. command-line secure file copy
            - pscp  is used in windows powershell or .bat scripts to achieve winscp functionality
                32-bit: DownLoad
                64-bit: DownLoad

1.   Example to execute a script in remote unix server from a windows machine using plink
             plink.exe -t -l judi -pw <password> 10.192.168.10 "/export/home/judi/health.sh >/dev/null 2>&1"

2.   Example to copy some log files from windows machine to a remote unix server using pscp
             pscp.exe -l judi -pw <password> D:\logs\$files 10.192.168.10:/export/home/judi/logs/

3.   Execute the powershell script via .bat
      The above two lines needs to be updated in execute.ps1 and execute.ps1 needs to be called in a .bat file using the below line
             C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe D:\Scripts\execute.ps1

$date= (Get-Date).ToString("ddMMyyyy")







~Judi~
putty in windows powershell script
winscp in windows powershell script
windows powershell scp

scp from powershell

Jun 22, 2017

Solaris user administration



1.     Create a user account in Solaris.
useradd -u 101 -g 200 -d /export/home/judi -m -s /usr/bin/ksh -c "Judi - Test User" Judi
-u : The  UID  of  the new user
-g : An  existing  group's  integer ID or character-string name
-d : Home directory for the user
-m : Create the Home directory for the user
-s : Shell for the user account
-c : Comment for the user account, Any text string

passwd judi; passwd -f judi

2.     Remove all secondary group for a user in solaris
             usermod -G "" testuser

passwd -x 91 -n 7 -w 28 oracle
-x : Max password age
-n : Minimum 7 days required to change password
-w : warn after 28 days


usermod -e 03/31/2017 oracle
- Automatically Account will expire on 31-Mar-2017


ovs-agent fails to start upon reboot on T7 sparc servers


Symptoms :-

                 - ovs-agent fails to start upon reboot on T7 servers
                 - The ovs-agent will be in maintenance state.
                 -  When the service ovm-ovs-config starts, the ilom couldn't communicate with the SP
                 -  From ldmd service logs we can see a problem with ilom interconnect. The connection is restore 1 minute later.
                 -  ilom interconnect seems started after one minute

JUDI-DEV-01# ldm ls-spconfig 
The requested operation could not be performed because the communication 
channel between the LDoms Manager and the system controller is down. 
The ILOM interconnect may be disabled or down (see ilomconfig(1M)). 
JUDI-DEV-01#

JUDI-DEV-01# svcs -xv 
svc:/ovm/ovs-config:default (Oracle VM Server Infrastructure) 
State: maintenance since Mar 17, 2017 10:10:30 AM BST 
Reason: Start method exited with $SMF_EXIT_ERR_FATAL. 
See: http://support.oracle.com/msg/SMF-8000-KS 
See: /var/svc/log/ovm-ovs-config:default.log 
Impact: 2 dependent services are not running: 
svc:/ovm/ovs-agent:default 
svc:/ovm/ovmwatch:default 
JUDI-DEV-01# 

JUDI-DEV-01# tail /var/svc/log/ovm-ovs-config:default.log 
reply = self._do_request('list-%s' % info, args) 
File "/usr/lib/python2.6/site-packages/agent/lib/ldoms/ldmxml.py", line 1845, in _do_request 
_check_reply(reply) 
File "/usr/lib/python2.6/site-packages/agent/lib/ldoms/ldmxml.py", line 2092, in _check_reply 
cmd_replies) 
agent.lib.ldoms.ldmxml.LDMError: failure 
command "list-spconfig": failure (failure: mdstore routine failed to load) 
INFO: The Oracle VM Agent configuration is not valid. 
ERROR: The server does not have a valid configuration to run the Oracle VM Agent. Run the 'ovs-agent-setup configure' command to configure the server. 
[ May 17 11:15:30 Method "start" exited with status 95. ] 
JUDI-DEV-01# 

Workaround :-
Immediate solution when this occurs is to clear the service
               # svcadm clear ovs-config 

Intermediate solution while awaiting integration is to modify the utils.py file with a retry entry:

1.      Goto
               cd /usr/lib/python2.6/site-packages/agent/setup/ldoms 

2.      Save a backup of utils.py
               # cp utils.py utils.py.orig 

3.      Edit utils.py and replace the fist occurance of the string "spconfig = ldm().list_spconfig()" with the retry entry below: (This should be line 58 of 256 )
               #spconfig = ldm().list_spconfig() 
               spconfig = ldm().list_spconfig(retry=20) 

4.      Remove the compiled file utils.pyc
               rm utils.pyc

5.      Reboot the server This will generate a new complied utils.pyc
               reboot

6.      Verify the ovs-config service is online (there may be a delay during transition to online)
               svcs -a | grep ovm



~Judi~

ovs-agent fails
ovs-config fails
ovmwatch fails
The ILOM interconnect may be disabled or down
Oracle Sparc iLOM commands 
Configure iLOM, Configure iLOM IP address; Configure user account in iLOM
OVM Backup
ovmm
backup oracle vm

install oracle vm manager

Jun 12, 2017

Oracle VM Manager 3.x: How to Recover from Data base corruption


APPLIES TO:

Impact Any type of activities like:

  • Upgrading the OVM Setup
  • Cloning Guest VMs
  • Unable to modify any parameter on a Guest VM
  • Unable to delete Guest VM
GOAL :

Repair corrupted Oracle VM database for OVM versions  3.0.x , 3.1.x and 3.2.x  Only,    
DO NOT USE THIS Support article for OVM versions 3.3x or higher
DO NOT USE THIS FOR  any versions of the Oracle Private Cloud Appliance - PCA.
There are two options to recover the Oracle OVM Manager DB  from an ObjectNotFoundException

    1. Restore DB (This is the Preferred Method)

  • Restoring the MYSQL Database
  • Restoring the Oracle Database
  • Validating the Database


    2. Regenerate DB (If  a Backup of the Oracle Manager DB is not available to Restore)

SOLUTION :

Oracle VM Diagnostic Capture

For diagnostic purposes, Oracle Support Services use a script called VMPInfo3 that automatically collects vital troubleshooting information from your Oracle VM environment. This script is installed when you install Oracle VM Manager and is located at
/u01/app/oracle/ovm-manager-3/ovm_shell/tools/vmpinfo/vmpinfo3.sh OR
/u01/app/oracle/ovm-manager-3/ovm_tools/support//vmpinfo3.sh on the Oracle VM Manager system.
./vmpinfo3.sh --username=[admin] --password=[passwd]
Please send /tmp/vmpinfo3-3.x.y.z-20130123-163252.tar.gz to Oracle OVM support

RESTORING A MYSQL DATABASE
Prior to restoring a MySql DB - delete the current one.
The Oracle VM manager services need to be shutdown.

#service ovmm stop 

Using ovm_upgrade.sh from /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin and the values from the .config file, delete the bad database.

#cd /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin 
#sh ovm_upgrade.sh --deletedb --dbuser=ovs --dbpass=<password> --dbhost=localhost --dbport=49500 --dbsid=ovs

Password is same as OVM Manager password. 

Look in your /etc/sysconfig/ovmm file for the value listed for "DBBACKUP". You should see something like this:

DBBACKUP=/u01/app/oracle/mysql/dbbackup 

That is the location on your system where MySQL is storing its backups. Please make note of this directory. Each backup is stored in a directory within the path defined by DBBACKUP. The backup directory is named AutoFullBackup-MMDDYYYY_hhmmss. Within the backup directory is a log file, named AutoBackup.log, containing information about the events that took place during the backup process. The backup directory contains a backup of the MySQL configuration file, a datadir directory containing the binary log for the database, a meta directory containing files specific to the MySQL Enterprise Backup process that was run at the time, and the actual MBI image file for the database that is backed up.

Only the 15 most recent backups are maintained within the DBBACKUP path. Manual backups, where the backup directory name is not prepended with AutoFullBackup, are ignored by the rotation. The trick in restoring the database is making sure that you have a good DB to restore, as your backups may also be corrupt.

To restore the database to one of the available backups, the manager and the database need to be shut down:

For example as the root user execute the following commands:

# service ovmm stop; service ovmm_mysql stop 

To initiate the restore, as the oracle user, use the RestoreDatabase.sh command located in the /u01/app/oracle/ovm-manager-3/ovm_tools/bin/

For example:

# su - oracle 
$ sh /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh AutoFullBackup-10222012_162543 
INFO: Expanding the backup image...
INFO: Applying logs to the backup snapshot...
INFO: Restoring the backup...
INFO: Success - Done!
INFO: Log of operations performed is available at:
/u01/app/oracle/mysql/dbbackup/AutoFullBackup-10172012_122920/Restore.log

after that start the services.

#service ovmm_mysql start 
#service ovmm start 



Oracle Knowledge Base:
KM Oracle VM: Error Message `No such object (level 1), cluster is null` ( Doc ID 2073727.1 )
KM Oracle VM Manager 3.x: How to Recover from Data base corruption including "ObjectNotFound Exception" Errors ( Doc ID 1555915.1 )



~judi~
Unable to modify any parameter on a Guest VM;
Unable to delete Guest VM;
Oracle VM Manager 3;
How to Recover from Data base corruption;
Oracle VM Manager 3.x: How to Recover from Data base corruption
Oracle OVM Manager DB  from an ObjectNotFoundException;
backup oracle vm
install oracle vm manager

Popular Posts