Archive

Archive for May, 2011

Add VLAN into LDM vswitch (primary-vsw1)

May 31, 2011 Leave a comment

1. Login control domain

2. List current primary domain setting to show

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,100                1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 1                         1500

3. Add VLAN 199

# ldm set-vswitch vid=2,199,100 primary-vsw1

4. Set guest vivmdb vnet1 in VLAN 199

# ldm set-vnet pvid=999 vid=199 vswitch=primary-vsw1 vnet1 vivmdb

5. Verify the setting of VLAN

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,199,100            1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 999  199                  1500 <– this shows vnet1 of vivmdb set to VLAN199

6. Plumb VLAN Connect (vsw199001)  at primary domain

# ifconfig vsw199001 172.31.199.1/24 up

7. Login guest domain vivmdb

# telnet localhost 5004

8. Plumb VLAN interface (vnet199001) at guest domain

# ifconfig vnet199001 plumb
# ifconfig vnet199001 172.31.199.3/24 up
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.77.193 netmask ffffff00 broadcast 192.168.77.255
ether 0:14:4f:f9:2d:4c
vnet199001: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
inet 172.31.199.3 netmask ffffff00 broadcast 172.31.199.255
ether 0:14:4f:f8:d8:7f

# ping 172.31.199.1
172.31.199.1 is alive

 

Advertisements
Categories: LDom

Modifying current VIP configuration

May 30, 2011 Leave a comment

The current VIP configuration are stored in OCR (Oracle Cluster Registry). There are four parameters, which are VIP hostname, VIP IP address, VIP subnet mask and interface name, to be modified. The following is an example to show mofity VIP interface name. The details refer to support.oracle.com [ID 276434.1]

We are going to change VIP interface from vnet1 to vnet100001 since we vlan interface is used.

1. Check current VIP configuration currently

$ srvctl config nodeapps -n tvmdb01 -a
VIP exists.: /tvmdb01-vip/172.31.10.102/255.255.0.0/vnet1

These outputs show that:
The VIP Hostname is ‘tvmdb01-vip’
The VIP IP address is ‘172.31.10.102’
The VIP subnet mask is ‘255.255.0.0’
The Interface Name used by the VIP is called ‘vnet1’

2.  Stop Instance, asm and nodeapps

$ srvctl stop instance -d tdb -i tdb1
$ srvctl stop asm -n tvmdb01
$ srvctl stop nodeapps -n tvmdb01

3. Unplumb vnet1 and plumb vnet100001 in OS

4. Bring the vnet100001 interface with the IP of vnet1 in OS

5.  Super to root and modify the VIP interface

su – root
source /export/home/oracle/.profile
# srvctl modify nodeapps -n tvmdb01 -A 172.31.10.102/255.255.255.0/vnet100001
# srvctl config nodeapps -n tvmdb01 -a
VIP exists.: /tvmdb01-vip/172.31.10.102/255.255.255.0/vnet100001 <– this is changed

6. Startup nodeapps, asm and instances

Categories: clusterware

CRS-0215: Could not start resource ‘ora.tvmdb02.LISTENER_TVMDB02.lsnr’.

May 30, 2011 Leave a comment

Symptoms

When starting nodeapps of cluster nodes, it returned the messages below

$ srvctl start nodeapps -n tvmdb02
tvmdb02:ora.tvmdb02.vip:checkIf: Default gateway is not defined (host=tvmdb02)
tvmdb02:ora.tvmdb02.vip:Interface vnet100001 checked failed (host=tvmdb02)
tvmdb02:ora.tvmdb02.vip:Failed to start VIP 172.31.10.103 (host=tvmdb02)
tvmdb02:ora.tvmdb02.vip:checkIf: Default gateway is not defined (host=tvmdb02)
tvmdb02:ora.tvmdb02.vip:Interface vnet100001 checked failed (host=tvmdb02)
tvmdb02:ora.tvmdb02.vip:Failed to start VIP 172.31.10.103 (host=tvmdb02)
CRS-0215: Could not start resource ‘ora.tvmdb02.LISTENER_TVMDB02.lsnr’.

Checking system default gateway, the default gateway was missing

$ netstat -nr
Routing Table: IPv4
Destination           Gateway           Flags  Ref     Use     Interface
——————– ——————– —– —– ———- ———
10.0.0.0             10.1.2.201           U         1        130 vnet2
172.31.10.0          172.31.10.101        U         1         17 vnet100001
192.168.77.0         192.168.77.221       U         1          2 vnet0
127.0.0.1            127.0.0.1            UH       28    3831355 lo0

Fix

Adding the default gateway to the system by root

#  route add default 172.31.10.254

Restart the nodeapps successfully

$  srvctl start nodeapps -n tvmdb02

Categories: clusterware

show snapshot dependency between master and slave

May 25, 2011 Leave a comment

–qmlogs.sql
–RUN AT MASTER SITE
COL LOG_OWNER FORMAT A8
COL OWNER FORMAT A10
COL MASTER FORMAT A25
COL NAME FORMAT A32
COL LOG_TABLE FORMAT A30
COL SNAPSHOT_SITE FORMAT A24
SELECT UNIQUE
*
FROM
((SELECT
OWNER
,NAME
,SNAPSHOT_SITE
,CAN_USE_LOG
,REFRESH_METHOD
, LOG_OWNER
,LOG_TABLE
,ROWIDS
,PRIMARY_KEY
,CURRENT_SNAPSHOTS
,A.SNAPSHOT_ID SID
FROM user_snapshot_logs A
, user_REGISTERED_SNAPSHOTS B
WHERE B.SNAPSHOT_ID = A.SNAPSHOT_ID(+)
)
UNION
(SELECT
OWNER
,NAME
,SNAPSHOT_SITE
,CAN_USE_LOG
,REFRESH_METHOD
, LOG_OWNER
,LOG_TABLE
,ROWIDS
,PRIMARY_KEY
,CURRENT_SNAPSHOTS
,A.SNAPSHOT_ID SID
FROM user_snapshot_logs A
, user_REGISTERED_SNAPSHOTS B
WHERE A.SNAPSHOT_ID = B.SNAPSHOT_ID(+))
ORDER BY 1,2,3)
/

Categories: SQL

ORA-01180: can not create datafile 1

May 11, 2011 Leave a comment

Symptoms

I moved the backup sets  from a production 10g database into a development server for restoration. I could restore spfile and control files. Once  I started the database in mount mode and restore database. It returned the following errors.

creating datafile fno=1 name=/u01/oradata/videv/system01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/10/2011 22:32:23
ORA-01180: can not create datafile 1
ORA-01110: data file 1: ‘/u01/oradata/videv/system01.dbf’

Fix

Then I cataloged the backup sets, it worked as the following

RMAN> catalog start with ‘/u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat’;

using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat

List of Files Unknown to the Database
=====================================
File Name: /u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files…
cataloging done

List of Cataloged Files
=======================
File Name: /u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat

RMAN> restore database;

Starting restore at 10-MAY-11
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=2193 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/videv/system01.dbf
restoring datafile 00002 to /u01/oradata/videv/undotbs01.dbf
restoring datafile 00003 to /u01/oradata/videv/sysaux01.dbf
restoring datafile 00004 to /u01/oradata/videv/users01.dbf
restoring datafile 00005 to /u01/oradata/videv/vi_tbs_dat01_01.dbf
restoring datafile 00006 to /u01/oradata/videv/vi_tbs_dat02_01.dbf
restoring datafile 00007 to /u01/oradata/videv/vi_tbs_dat03_01.dbf
restoring datafile 00008 to /u01/oradata/videv/vi_tbs_idx01_01.dbf
restoring datafile 00009 to /u01/oradata/videv/vi_tbs_idx02_01.dbf
restoring datafile 00010 to /u01/oradata/videv/vi_tbs_idx03_01.dbf
channel ORA_DISK_1: reading from backup piece /u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat

channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/oracle/instance/bkup_VIDEV_3509_1_750301226.dat tag=TAG20110505T010026
channel ORA_DISK_1: restore complete, elapsed time: 00:09:09
Finished restore at 10-MAY-11

Categories: RMAN