Archive

Archive for April, 2011

Change LDom Guest to non auto boot

April 14, 2011 Leave a comment

1. Change the auto-boot? to false

# ldm set-variable “auto-boot?=false” testvmdb

2. Restart the guest

# ldm stop testvmdb
LDom testvmdb stopped
# ldm start testvmdb
LDom testvmdb started

3. Check guest status

# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      4     4224M    2.1%  127d
gsvmdb01         active     -n—-  5000    4     6G        83%  13d 5h 58m
sgvmdb01         active     -n—-  5002    4     8G       3.8%  49d 38m
testvmdb         active     -t—-  5001    4     4G        25%  4s
tvmdb01          active     -n—-  5003    4     4G       2.6%  42d 1h 7m

4. Login  the guest

# telnet localhost 5001
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “testvmdb” in group “testvmdb” ….
Press ~? for control options ..

{0} ok

Categories: LDom

Mount iso image on Solaris

April 14, 2011 Leave a comment

1. Create a loopback device file with lofiadm

# lofiadm -a /export/home/oracle/sol-10-u9-ga-sparc-dvd.iso
/dev/lofi/1 <– this loopback device will be created

2. Mount the loopback device to /mnt

# mount -F hsfs -o ro /dev/lofi/1 /mnt

3. Check the files

# cd /mnt

# ls -al
total 55
dr-xr-xr-x   2 root     sys         4096 Aug 12  2010 .
drwxr-xr-x  28 root     root         512 Dec  1 18:54 ..
-r–r–r–   1 root     root          68 Mar  2  2010 .cdtoc
drwxr-xr-x   5 root     root        2048 Aug 12  2010 .install
lrwxrwxrwx   1 root     root          33 Aug 12  2010 .install_config -> ./Solaris_10/Misc/.install_config
-r–r–r–   1 root     root         439 Mar  2  2010 .slicemapfile
-r–r–r–   1 root     root          21 Apr  9  2010 .volume.inf
-r–r–r–   1 root     root          28 Aug 12  2010 .volume.inf.1
-r–r–r–   1 root     root          28 Aug 12  2010 .volume.inf.2
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.3
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.4
-r–r–r–   1 root     root          23 Aug 12  2010 .volume.inf.5
-r–r–r–   1 root     root        7625 May 27  2010 Copyright
-r–r–r–   1 root     root        1797 Jul 22  2010 GPL_LGPL_Source_Offer.txt
drwxr-xr-x   7 root     root        2048 Aug 12  2010 Solaris_10
drwxr-xr-x   2 root     root        2048 Aug 12  2010 boot
-rwxr-xr-x   1 root     root         257 Aug 12  2010 installer
drwxr-xr-x   5 root     root        2048 Aug 12  2010 platform

Categories: Solaris Admin

RMAN-06207: WARNING: 20 objects could not be deleted for DISK channel(s)

April 8, 2011 Leave a comment

Symptoms

RMAN-06207: WARNING: 20 objects could not be deleted for DISK channel(s) due RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status RMAN-06210: List of Mismatched objects RMAN-06211: ========================== RMAN-06212: Object Type Filename/Handle RMAN-06213: ————— ————————————————— RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4710_1_746949640.dat RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4711_1_746949640.dat RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4712_1_746951040.dat RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4713_1_746951067.dat RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4714_1_746952417.datRMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4715_1_746952475.dat RMAN-06214: Backup Piece /rcdb/oracle/bkup/viqa/bkup_VI_4716_1_746953824.dat

Cause

This was caused by removing the backupset in OS before, so RMAN reported mismatched status due to the backupsets were missing.

Fix Procedures

Do crosscheck the missing backupsets to update RMAN catalog. The following is example

RMAN>  CROSSCHECK  backupset;

using channel ORA_DISK_1
using channel ORA_DISK_2
crosschecked backup piece: found to be ‘AVAILABLE’
backup piece handle=/rcdb/oracle/bkup/viqa/bkup_VI_4863_1_747834472.dat recid=4850 stamp=747834474
crosschecked backup piece: found to be ‘AVAILABLE’
backup piece handle=/rcdb/oracle/bkup/viqa/bkup_VI_4862_1_747834472.dat recid=4851 stamp=747834474
crosschecked backup piece: found to be ‘AVAILABLE’
backup piece handle=/rcdb/oracle/bkup/viqa/bkup_VI_4864_1_747836002.dat recid=4852 stamp=747836004
crosschecked backup piece: found to be ‘AVAILABLE’

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
using channel ORA_DISK_2
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
——————– —— —————— ——————–
Backup Set           4706   28-MAR-11
Backup Piece       4706   28-MAR-11          /rcdb/oracle/bkup/viqa/bkup_VI_4710_1_746949640.dat
Backup Set           4707   28-MAR-11
Backup Piece       4707   28-MAR-11          /rcdb/oracle/bkup/viqa/bkup_VI_4711_1_746949640.dat
Backup Set           4708   28-MAR-11
Backup Piece       4708   28-MAR-11          /rcdb/oracle/bkup/viqa/bkup_VI_4712_1_746951040.dat
Backup Set           4709   28-MAR-11

Categories: RMAN, Uncategorized Tags:

Examples to use oracleasm

April 1, 2011 Leave a comment

Example 1. Check oracleasm if it is load
[root@vmrac1 ~]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes

Example 2. When you have create new asmdisk on one of cluster node, you need to scan disks on other nodes
At Node 1
=========
[root@vmrac1 ~]# oracleasm createdisk DATA1 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@vmrac1 ~]#  oracleasm createdisk DATA2 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@vmrac1 ~]# oracleasm listdisks
DATA1
DATA2

At Node 2
=========
[root@vmrac2 ~]# oracleasm listdisks
(There are no ASM disks)

[root@vmrac2 ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
Instantiating disk “DATA1”
Instantiating disk “DATA2”

Example 3. Determine if a disk belongs to Oracle ASMlib
[root@vmrac1 ~]# oracleasm querydisk /dev/sde1
Device “/dev/sde1” is marked an ASM disk with the label “DATA2” <– this belongs to ASMLIB
[root@vmrac1 ~]# oracleasm querydisk /dev/sdb1
Device “/dev/sdb1” is not marked as an ASM disk <– this does’nt belong to ASMLIB

Example 4. Check ASM Disk Group device path name

[root@wcsvmuatdb01 oracle]# oracleasm querydisk -p VOTEDISK1
Disk “VOTEDISK1″ is a valid ASM disk
/dev/sdc1: LABEL=”VOTEDISK1″ TYPE=”oracleasm”

 

Example 5. Rename ASM Disk

[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK1 OCRVOTEDISK1
Instantiating disk “OCRVOTEDISK1”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK1”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK2 OCRVOTEDISK2
Instantiating disk “OCRVOTEDISK2”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK2”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f VOTEDISK3 OCRVOTEDISK3
Instantiating disk “OCRVOTEDISK3”: done
Writing disk header: done
Removing old ASM disk “VOTEDISK3”: done
[root@wcsvmuatdb01 oracle]# oracleasm renamedisk -f DATADISK1 DBDATADISK1
Instantiating disk “DBDATADISK1”: done
Writing disk header: done
Removing old ASM disk “DATADISK1”: done
[root@wcsvmuatdb01 oracle]# oracleasm listdisks
DBDATADISK1
OCRVOTEDISK1
OCRVOTEDISK2
OCRVOTEDISK3

 

Example 5. Re-instantiating ASM Disks at another of RAC nodes after renaming disks

[root@wcsvmuatdb02 opt]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Cleaning disk “DATADISK1”
Cleaning disk “VOTEDISK1”
Cleaning disk “VOTEDISK2”
Cleaning disk “VOTEDISK3”
Scanning system for ASM disks…
Instantiating disk “DBDATADISK1”
Instantiating disk “OCRVOTEDISK1”
Instantiating disk “OCRVOTEDISK2”
Instantiating disk “OCRVOTEDISK3”

 

Categories: ASM

Can’t create oracleasm disks

April 1, 2011 Leave a comment

1. I want to create oracleasm disk as the following. It returns “Unable to label device”

[root@vmrac1 ~]# oracleasm createdisk DATA2 /dev/sde1
Writing disk header: failed
Unable to label device “/dev/sde1”

2. Check the partition type, it is Extend. Then I change it to primary

[root@vmrac1 ~]# fdisk /dev/sde

Device Boot      Start         End      Blocks   Id  System
/dev/sde1              10        1295    10329795    5  Extended <– Extended

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               5        1295    10369957+  83  Linux <– Change to primary partition

3. Create the oracleasm disk again
[root@vmrac1 ~]#  oracleasm createdisk DATA2 /dev/sde1
Writing disk header: done
Instantiating disk: done

Therefore, the partitions must be set to primary partition, while extend partitions are not supported by oracleasm.

Categories: ASM