Archive for October 2009

How to add an additional disk drive to your backup storage

I adeed new SCSI hard drive. It’s third so the namin convention is sdc

[root@centos53 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@centos53 ~]# cat /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
[root@centos53 ~]# mkfs -t ext3 /dev/sdc1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1048576 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@centos53 ~]# mkdir /backup
[root@centos53 ~]# mount -t ext3 /dev/sdc1 /backup/
[root@centos53 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              11G  8.6G  1.1G  89% /
tmpfs                 442M     0  442M   0% /dev/shm
/dev/sdc1             7.9G  147M  7.4G   2% /backup
[root@centos53 ~]#

Enter the drive into the fstab file so that it is recognized and mounted upon system boot.

[root@centos53 ~]# vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/dev/sdc1               /backup                 ext3    defaults        0 0

Regards,

Tom

ORA-29701: unable to connect to Cluster Manager

Hi, today I wanted to start my test server and I got an error above.
It happend when I have changed IP address and hostname.

[oracle@centos53 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Sun Oct 11 13:51:27 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-29701: unable to connect to Cluster Manager

But solution is quite easy on linux:
Login as root and run commnad below.

[root@centos53 ~]# cd /u01/app/oracle/product/11.1.0/asm/bin/
[root@centos53 bin]# ./localconfig delete
Stopping Cluster Synchronization Services.
Unable to communicate with the Cluster Synchronization Services daemon.
Shutdown has begun. The daemons should exit soon.
Cleaning up Network socket directories
[root@centos53 bin]# ./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Configuration for local CSS has been initialized

Cleaning up Network socket directories
Setting up Network socket directories
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process…
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
centos53
Cluster Synchronization Services is active on all the nodes.
Oracle CSS service is installed and running under init(1M)

As Oracle user:
SQL> startup
ASM instance started

Total System Global Area  284565504 bytes
Fixed Size                  1299428 bytes
Variable Size             258100252 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> exit

Regards,

Tom

How to clear alerts in Grid control

Hi,

in my grid control still left old alerts on the first page. This alerts are obsolete and should be deleted automatically but isnt so I looked for any solution. Oracle forum
And there is.

1) connect as user SYSMAN to repository database and select you alert.

-you can use ths general query
SELECT * from MGMT_CURRENT_SEVERITY;

or specific for one target

select t.target_name,t.target_type,collection_timestamp,message,
‘exec em_severity.delete_current_severity(”’ ||t.target_guid || ”’,”’ ||metric_guid || ”’,”’ ||key_value || ”’)’ em_severity
from mgmt_targets t inner join mgmt_current_severity s on t.target_guid = s.target_guid
where target_name like ‘&target’;

TARGET_NAME
——————————————————————————–
TARGET_TYPE
—————————————————————-
COLLECTION_TIMESTA
——————
MESSAGE
——————————————————————————–
EM_SEVERITY
——————————————————————————–
dottk.taloha.tk
oracle_database
05-OCT-09

TARGET_NAME
——————————————————————————–
TARGET_TYPE
—————————————————————-
COLLECTION_TIMESTA
——————
MESSAGE
——————————————————————————–
EM_SEVERITY
——————————————————————————–
Snapshot Too Old Error detected: SQL ID 7nsy3bq9wp2hv, Snapshot SCN 0×0002.3d5b1
87c, Recent SCN 0×0002.3d5e6b21, Undo Tablespace UNDOTBS1, Current Undo Retentio
n 6093.

TARGET_NAME
——————————————————————————–
TARGET_TYPE
—————————————————————-
COLLECTION_TIMESTA
——————
MESSAGE
——————————————————————————–
EM_SEVERITY
——————————————————————————–
exec em_severity.delete_current_severity(’7EF58D39E522C52FE009EECEB83B2AED’,'109
613CA182F59DA38A43D8C1E79E7AB’,'UNDOTBS1′)

and now you can delete the messages (example)

exec em_severity.delete_current_severity(’7EF58D39E522C52FE009EECEB83B2AED’,'109613CA182F59DA38A43D8C1E79E7AB’,'UNDOTBS1′)

Regards,

Tom

TOPlist