EXADATA: How to configure ssh for current user on a list of nodes?

APPLIES TO:

Oracle Exadata Storage Server Software – Version 11.2.1.2.0 and later.

GOAL

Customer needs steps to configure ssh on exadata.

SOLUTION

Run the following on a db node, and follow the prompts.
/opt/oracle.SupportTools/onecommand/setssh-Linux.sh -h /opt.oracle.SupportTools/onecommand/all_nodelist_group
This will configure passwordless ssh for current user for the list of nodes specified in all_nodelist_group.

 

If the utility is missing, it can be extracted from a current download of the onecommand utility

see Document : 888828.1 – Exadata Database Machine and Exadata Storage Server Supported Versions

 

/opt.oracle.SupportTools/onecommand/all_nodelist_group —you may need to create a file with the host entries for which you need SSH.

Example;

IBSWITCH_GROUP –Keep the ibswitches in that file and pass in that command.

[root@exa01dbadm01 ~]# cd /opt/oracle.SupportTools/onecommand/
[root@exa01dbadm01 onecommand]# vi IBSWITCH_GROUP
exa01sw-iba01
exa01sw-ibb01

[root@exa01dbadm01 onecommand]#chmod 775  IBSWITCH_GROUP 

[root@exa01dbadm01 onecommand]# ./setssh-Linux.sh -s -p  PassWord -n N -h IBSWITCH_GROUP
[root@exa01dbadm01 onecommand]# cat IBSWITCH_GROUP
exa01sw-iba01
exa01sw-ibb01
[root@exa01dbadm01 onecommand]# ssh exa01sw-iba01
Last login: Sat Oct 14 15:39:56 2017 from exa01dbadm01.omsan.com.tr
You are now logged in to the root shell.
It is recommended to use ILOM shell instead of root shell.
All usage should be restricted to documented commands and documented
config files.
To view the list of documented commands, use “help” at linux prompt.
[root@exa01sw-iba01 ~]#

For different user from root (for example oracle user)

EXADATA passwordless SSH login not working for oracle user

i. Login to the oracle account:
# su – oracle

ii. Create a dcli group file listing the nodes in the Oracle Cluster.

iii. Run the setup ssh script (this assumes the oracle password on all servers in the dbs_group list is set to “welcome””
$./setssh-Linux.sh -s -p welcome1 -n N -h dbs_group

Source:Oracle support note(Doc ID 1923785.1)

 

Advertisements

ORA-15032, ORA-15040, ORA-15042 Error on Oracle ASM

ERROR:Try to mount the disk group on ASM

SQL> alter diskgroup RECOc1 mount;

alter diskgroup RECOc1 mount

*

ERROR at line 1:

ORA-15032: not all alterations performed

ORA-15040: diskgroup is incomplete

ORA-15042: ASM disk “2” is missing from group number “2”

Check  Alert Log:

Wed Feb 15 15:32:15 2017
NOTE: Disk RECOC1_0000 in mode 0x7f marked for de-assignment
NOTE: Disk RECOC1_0001 in mode 0x7f marked for de-assignment
ERROR: diskgroup RECOC1 was not mounted
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk “2” is missing from group number “2”

 

SOLUTION:

All transactions must be done by root user.

1-Scan and find RECOC1 disks with scripts;

/etc/init.d/oracleasm querydisk -d `/etc/init.d/oracleasm listdisks -d` | \

cut -f2,10,11 -d” ” | \

perl -pe ‘s/”(.*)”.*\[(.*), *(.*)\]/$1 $2 $3/g;’ | \

while read v_asmdisk v_minor v_major

do

v_device=`ls -la /dev | grep ” $v_minor, *$v_major ” | awk ‘{print $10}’`

echo “ASM disk $v_asmdisk based on /dev/$v_device [$v_minor, $v_major]”

done

2-Remove RECOC* found disks

/etc/init.d/oracleasm deletedisk RECOC1

/etc/init.d/oracleasm deletedisk RECOC2

/etc/init.d/oracleasm deletedisk RECOC3

3-Add re-create RECOC* disks

oracleasm createdisk RECOC1 /dev/sdd1;

oracleasm createdisk RECOC2 /dev/sdh1;

oracleasm createdisk RECOC3 /dev/sdj1;

ora-15032

if flashback on, you have to off it on your oracle database and use the grid user for below processes.

  1. On GUI–>open asmca—>Disk Group Name:RECOC1  select 3  disks to add diskgroup
  2. check your alert log again.

SUCCESS: diskgroup RECOC1 was mounted
Wed Feb 15 15:46:30 2017
SUCCESS: CREATE DISKGROUP RECOC1 EXTERNAL REDUNDANCY DISK ‘/dev/oracleasm/disks/RECOC1’ SIZE 102398M ,
‘/dev/oracleasm/disks/RECOC2’ SIZE 1048570M ,
‘/dev/oracleasm/disks/RECOC3’ SIZE 511993M ATTRIBUTE ‘compatible.asm’=’12.1.0.0.0′,’au_size’=’1M’ /* ASMCA */
Wed Feb 15 15:46:30 2017

 

ORA-28221 REPLACE not specified

Database Version: Oracle 11g
User status:expired(grace)

PROBLEM:

Password complexity is enabled with custom function.I’m trying to change the password of my user and I’m getting this error.

SQL> alter user omerfrkbzkrt identified by new_password;
ORA-28221 REPLACE not specified

SOLUTION:

SQL> alter user omerfrkbzkrt identified by new_password replace old_password;

Reference: http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_4003.htm#SQLRF53632

 

Oracle ASM commands on Linux

 

grid

  1. Automatic Storage Management (ASM) commands
    1. Start asm daemon and create ASM disk
      1. /usr/sbin/oracleasm init
      2. fdisk /dev/sdb
        1. n –>create new disk
        2. p —>primary partition
        3. w —>save conf.
      3. oracleasm createdisk DATA /dev/sdb1
      4. oracleasm listdisks
    2.  Change  grid user:
      1.  [root@exa01dbadm01 ~]# su – grid
        [grid@exa01dbadm01 ~]$ asmcmd
        ASMCMD> ls -l
        State Type Rebal Name
        MOUNTED NORMAL N DATAC1/
        MOUNTED NORMAL N DBFS_DG/
        MOUNTED NORMAL N RECOC1/
        ASMCMD> lsdg
        State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
        MOUNTED NORMAL N 512 4096 4194304 14315520 10306736 1192960 4556888 0 N DATA1/
        MOUNTED NORMAL N 512 4096 4194304 207648 197960 34608 81676 0 Y DBFS/
        MOUNTED NORMAL N 512 4096 4194304 2665536 1009240 222128 393556 0 N RECO/
        ASMCMD> pwd
        +ASMCMD> cd RECO
        ASMCMD> pwd
        +RECOC
        ASMCMD>
    3. ASMCMD Key Commands
      COMMAND DESCRIPTION
      cd Change directory
      cp Copy file
      du Disk space used by a directory and its subdirectories
      exit Exit the utility
      find Locate the path for all occurrences of the specified filename
      help Displays command assistance
      ls List the contents of a directory
      lsct List info about ASM clients
      lsdg List all disk groups and their attributes
      lsdsk List all physical disks visible to ASM
      md_backup Create a backup of the mounted diskgroups
      md_restore Restore the diskgroups from a backup
      mkalias Create an alias for a system generated filename
      mkdir Create directory
      pwd Print working directory (i.e. list current directory location)
      remap Repair a range of blocks on a disk
      rm Remove (i.e. delete) the specified files or directories
      rmalias Remove (i.e. delete) the specified alias