Tuesday, 16 January 2018

Step 10 - Oracle DBCS : Create Additional OS Users On Oracle Cloud Compute Node

When a Oracle Database Cloud deployment is created, it creates following 3 OS users:
  1. opc: This user is authorized to login to compute and execute root commands. It can use sudo -s command to switch to root.
  2. root: This user is not authorized to login to the compute node. To perform operations that requires root user access, connect to the compute node as opc user and use the sudo command.
  3. oracle: This user is authorized to login to the compute node and execute user level commands but not root commands.

If you want you can create additional operating system users to login to the compute node. The new user can perform OS standard operations, such as Install, configuring and running applicaitons. You can provide sudo access to this user to execute sudo commands.

In this article we will demonstrate how to create additions OS users and grant the sudo permissions to execute sudo commands.

Steps to create additional OS users on Oracle Cloud Compute Node


  • Login to the Oracle Cloud Compute Node 
Open PuTTY session on your desktop and enter Compute Node IP address


  • On the left pane, expand "SSH" and select "Auth". On the right pane, click on "Browse" button. Select the Private Key that matches the Public Key for your Deployment. Click "Open"



  • Enter login as "opc". This will connect you to the compute node without password. Switch to root by executing "sudo -s" command. Confirm that you are switched to root by executing "id" command.



  • Use the "useradd" command to create new user. Here we are creating a new OS user by name "nsmuser"



  • Now create the ".ssh" directory and "authorized_keys" file as shown below.



  • Copy the SSH Public key value from your desktop



  • Paste the SSH public key value to the "authorized_key" file. Save and exit the file



  • Verify the file is created and the contents of the file



  • Add the new user to the allowed users list under "sshd_config" file. Open the "sshd_config" file



  • Add the new user "nsmuser" to the the "Allowusers" line as show below. Save and exit the file



  • Verify the file is modified



  • Chage the ownership and permissions of ".ssh" directory as show below. Restart the sshd daemon so the changes made to "sshd_config" can take affect.



  • Add the new user "nsmuser" to the "sudoers" file allow root access. Open the "sudoers" file as shown below



  • Add the line to the sudoers file as shown below



  • Verify that the new user is added to the sudoers file



  • Login to the Compute node using new user created above. Open PuTTY session and enter the Compute Node IP address, select the private key that matches the Public Key for your Deployment



  • Login as "nsmuser". Execute "sudo -s" to switch to root user



Conclusion

In this article we have learned about cloud database deployment OS users, how to create additional OS user and grant sudoers permissions to execute sudo commands.

Monday, 15 January 2018

Step 9 - Oracle DBCS : Manage Network Security

Network access to the Compute Node associated with Oracle Database Cloud Service is primarily provided by SSH connections on port 22. By default SSH port 22 is opened to allow access to the tools, utilities and other resources on the Compute Node associated with the Oracle Database Cloud Services. You can use SSH client software such as PuTTY on Windows to establish a secure connection and log in as "opc" or "oracle" user.

To access network protocols and services on a compute node by using a port other than port 22, require additional configuration:
  • Enable network access to the port: Use the Oracle Database Cloud Service console to enable access to a port on a compute node.
  • Create an SSH tunnel to the port: Create SSH tunnel enables you to access a specific compute node port by using an SSH connection as the transport mechanism.

To provide network access to the compute node, the following Oracle Compute Cloud Service networking resources are created:
  • A permanent IP reservation named ipreservation is created and associated with the Compute Cloud Service instance (VM).
  • A security list named ora_db is created and associated with the compute node. 
  • The following security applications (port specifications) are created so that they can be used in security rules to enable access to specific ports on the compute node:
    • ora_dbconsole provides TCP access using port 1158
    • ora_dbexpress provides TCP access using port 5500
    • ora_dblistener provides TCP access using the listener port that you specified when you created the database deployment (default 1521)
    • ora_http provides TCP access using port 80
    • ora_httpssl provides TCP access using port 443
  • The following rules are created when a database deployment is created. They are set to disabled by default:
    • ora_p2_ssh: Controls access to port 22 and this port is used by SSH client to connect to the compute node. 
    • ora_p2_dbconsole: Controls access to port 1158 and this port is used by Enterprise Manager 11g Database Control.
    • ora_p2_dbexpress: Controls access to port 5500 and this port is used by Enterprise Manager Database Express 12c.
    • ora_p2_dblistener: Controls access to port 1521 and this port is used by SQL*Net.
    • ora_p2_http: Controls access to port 80 and this port is used for HTTP connections.
    • ora_p2_httpssl: Controls access to port 443 and this port is used for HTTPS connections, including Oracle REST Data Services (ORDS), Oracle Application Express (APEX), and Oracle DBaaS Monitor.

Oracle Database Cloud Service uses access rules to provide secure network access to database deployments. You can use the Oracle Database Cloud Service console to perform network access operations such as enabling and disabling access rules and creating new access rules. 

You can create an access rule to enable ports not associated with a predefined rule, or to restrict access to ports to only permit connections from specific IP addresses. The security list is used in security rules to enable access to specific security applications (port specifications) on the compute node.

In this article we will demonstrate how to create custom Security List and Rules to enable access to specific security applications (VNC application and port range 5901 - 5905) on the compute node.

  • Open a web browser and enter the URL you received in the Welcome email to login to Oracle Cloud Account

https://myservices-xxxxx-xxxxxxxxxxef4b21bb7ee3b2cf4123d1.console.oraclecloud.com/mycloud/faces/dashboard.jspx

  • Enter your username and password


  • On the home page, Click "Menu" under "Compute Classic" Cloud Service as shown below


  • Click "Open Service Console"


  • Click on "Network"


  • Expand "Shared Network"


  • Click "Security Applications" and then "Create Security Application"


  • Enter a Security Application Name, Port Type, Port Range Start, Port Range End and a Description and click Create. In our scenario we are enabling access to VNC application on the ports between 5901 and 5905


  • Make sure the Security Application is created by searching it


  • Click "Security Lists" and then "Create Security List"


  • Enter Security List Name and leave Inbound Policy and Outbound Policy to DEFAULT value and click Create


  • Make sure the Security List is created by searching it


  • Click "Security Rules" and then "Create Security Rule"


  • Enter the details as show below:

Name: Any desired meaningful name
Status: Enabled to enable the rule
Security Application: we create above
Source: Security IP List -> public-internet
Destination: select security list created above from drop down 
Click Create

  • Make sure the Security Rule is created by searching it


  • Click "Instances"


  • Select your Instance and scroll down


  • Click "Add Security List"


  • Select "Security List" create above from the drop down list


  • Make sure the Security List added to your Instance


  • Open VNC on your desktop/Laptop and enter the IP address of your Database Deployment


  • Enter VNC password used at the time of starting VNC server software on the compute node


  • Enter Oracle user password to connect to the Compute node


  • We are now connected to the compute node using VNC





Conclusion

In this article we have learned how to create custom Security List and Rules to enable access to specific security applications (VNC application and port range 5901 - to 5905) on the compute node. Oracle Compute Cloud Service networking create resources to provide network access to the compute node.


Thursday, 11 January 2018

Oracle Exadata Deployment Assistance (oedacli) Command Line Interface

Starting with Oracle ESS version 18c and OEDA August 2017 release Oracle introduced a new feature OEDA command-line (oedacli). The new OEDA command line interface allows you to update an existing es.xml file. These updates are called Actions and an action is a single atomic task. 


OEDA command-line interface (oedacli) can help you with various Exadata life cycle management tasks, such as:

  • Add node to or remove node from a Virtual Cluster on Exadata
  • Add database home to or remove database home from physical cluster
  • Add or remove Storage cell
  • Resize Oracle ASM disk groups
  • Add or remove additional Databases
  • Add or remove additional database homes to an Oracle VM cluster

Software requirement:

  • OEDA, August 2017 release

You can operate oedacli in 2 mode:

  • Edit mode
  • Deploy mode

Using OEDACLI utility
oedacli utility can be used for various routine tasks on Exadata Database Machine.


Prerequisites

  • OEDA August 2017 release or later
  • Original OEDA configuration XML file used for deployment
  • Use default password for root, oracle and grid users on the compute nodes in cluster


To start the oedacli navigate to the directoy containing the oeda software.
# cd /u01/app/oracle/software/oeda
# unzip p26964044_181000_Linux-x86-64.zip
# cd linux-64
# ./oedacli





For more details read the OEDA Command-Line interface at:
http://docs.oracle.com/cd/E80920_01/DBMIN/exadata-deployment-assistant.htm#DBMIN-GUID-CCACB268-C707-4897-8C1C-0F3568FA456C

  • To Load an original OEDA xml Configuration file 

[root@dm01db01 linux-x64]# ./oedacli


oedacli> LOAD FILE name=/u01/app/oracle/software/oeda/Netsoftmate-dm01.xml

 SUCCESS - file loaded OK
 Customer : Netsoftamte - QED -QA -IND


  • To List xmlactions

oedacli> list xmlactions
 There are no actions in this XML file

  • To Display help using oedacli

[root@dm01db01 linux-x64]# ./oedacli
oedacli> help
 HELP [topic]
   Available Objects:
 ACFSVOLUME
        ADD ACFSVOLUME
        ALTER ACFSVOLUME
        DELETE ACFSVOLUME
        LIST ACFSVOLUMES
 CELL
        CLONE CELL
        DELETE CELL
        LIST CELLS
 CLUSTER
        ALTER CLUSTER
        UPGRADE CLUSTER
        LIST CLUSTERS
 DISKGROUP
        ADD DISKGROUP
        ALTER DISKGROUP
        ALTER DISKGROUPS
        DELETE DISKGROUP
        LIST DISKGROUPS
 DATABASE
        ADD DATABASE
        ALTER DATABASE
        DELETE DATABASE
        LIST DATABASES
 DATABASEHOME
        ADD DATABASEHOME
        ALTER DATABASEHOME
        CLONE DATABASEHOME
        DELETE DATABASEHOME
        LIST DATABASEHOMES
 DOM0
        LIST DOM0S
 ES
        ALTER ES
 GUEST
        CLONE GUEST
        DELETE GUEST
        LIST GUESTS
 ILOM
        ALTER ILOM
        LIST ILOMS
 MACHINE
        ALTER MACHINE
        LIST MACHINES
 NETWORK
        ADD NETWORK
        ALTER NETWORK
        DELETE NETWORK
        LIST NETWORKS
 SCAN
        ADD SCAN
        ALTER SCAN
        DELETE SCAN
        LIST SCANS
 SWITCH
        ALTER SWITCH
        LIST SWITCHES
 VIP
        ADD VIP
        ALTER VIP
        DELETE VIP
        LIST VIPS
 CLI COMMANDS
        LOAD FILE
        SAVE FILE
        SAVE FILES
        DELETE XMLACTION
        LIST XMLACTIONS
        SAVE ACTION
        MERGE ACTIONS
        DEPLOY ACTIONS


  • To Display help add database

oedacli> help add database
 Usage:
 ADD DATABASE
  BLOCKSIZE = <blocksize> |
  CHARSET = <characterset> |
  DATADG = <datadg> |
  DBLANG = <dblang> |
  DBNAME = <dbname> |
  DBTEMPLATE = <dbtemplate> |
  DBTYPE = <dbtype> |
  HOSTNAMES = <hostnames> |
  RECODG = <recodg>
 WHERE
  DBHOMEID = <databasehomeid> |
  CLUSTERNUMBER = <clusternumber> DBHOMELOC = <databasehomelocation> |
  CLUSTERNAME = <clustername>  DBHOMELOC = <databasehomelocation> |
  CLUSTERID = <clusterid>  DBHOMELOC = <databasehomelocation> |
  CLUSTERNUMBER = <clusternumber> CDBNAME = <containerdbname>
  CLUSTERNAME = <clusternumber> CDBNAME = <containerdbname>
  CLUSTERID = <clusternumber> CDBNAME = <containerdbname>


 Purpose:

   Adds a database or a CDB or a PDB to an existing CDB
 Arguments:
   <blocksize>    :  Default: 8192,  not required for PDB
   <characterset> :  Default: AL32UTF8,  not required for PDB
   <datadg>       : *The DATA diskgroup, not required for PDB
   <dblang>       :  Default: all_langs, not required for PDB
   <dbname>       : *Database name
   <dbtemplate>   :  Default: ADMIN, otherwise ADMIN or DW, not required for PDB
   <dbtype>       :  Default: normal DB, otherwise CDB or PDB
   <hostnames>    :  Default:  list of nodes from db home
   <recodg>       : *The RECO diskgroup, not required for PDB
 Where:
   <databasehomeid>       : The es id for the databasehome
   <clusternumber>        : The cluster number in the es xml, starting at 1
   <clustername>          : The name of the cluster
   <clusterid>            : The es xml id of the cluster
   <databasehomelocation> : The path for the target database home
   <containerdbname>      : The database name for the container - only  required when DBTYPE is PDB
 Comments: * indicates a mandatory parameter

  • To Display help add ASM Diskgroup

oedacli> help add diskgroup
 Usage:
 ADD DISKGROUP
   ACFSNAME = <acfsname>
   ACFSPATH = <acfspath>
   ACFSSIZE = <acfssize>
   CELLLIST = '<cellist>'
  *DISKGROUPNAME = <diskgroupname>
  *DISKGROUPSIZE = <diskgroupsize>
   OCRVOTE = <ocrvote>
   QUORUMDISK = <quorumdisk>
  *REDUNDANCY = <redundancy>
  *SLICESIZE = <slicesize>
   SPARSE = <sparse>
   SPARSEVIRTUALSIZE = <sparsevirtualsize>
   TYPE = <diskgrouptype>
   [DATABASENAME = <databasename>]
 WHERE
  CLUSTERNAME = <clustername> |
  CLUSTERNUMBER = <clusternumber> |
  CLUSTERID = <clusterid>


 Purpose:

   Adds a diskgroup
 Arguments:
   <acfsname>          : The name of the acfs volume on this diskgroup
   <acfspath>          : The path for the acfs filesystem
   <acfssize>          : The size of the acfs volume
   <cellist>           : A comma separated list of cells for this diskgroup, the list enclosed in '
   <diskgroupname>     : The new name for the diskgroup
   <ocrvote>           : true if this diskgroup will host the ocrvote for clusterwear
   <quorumdisk>        : true if this diskgroup will require quorum
   <redundancy>        : Redundancy for this diskgroup : NORMAL or HIGH
   <diskgroupsize>     : The size of the diskgroup, specify in G or T. Only slice or diskgroup size, not both
   <slicesize>         : The slice size on disk for each griddisk for this diskgroup
   <sparse>            : true if this diskgroup  has sparse enabled
   <sparsevirtualsize> : The sparsevirtual size
   <type>              : Diskgroup type, DATA, RECO, DBFS or OTHER, default is other. If you want the database to be built using this diskgrouptype must be set to DATA or RECO
   <databasename>      : If type is DATA or RECO, the dbname of the target database
 Where:
   <clusternumber> : The cluster number in the es xml, starting at 1
   <clustername>   : The name of the cluster
   <clusterid>     : The es xml id of the cluster
 Comments: * indicates a mandatory field
oedacli>


Conclusion:



In this article we have learned about new OEDA command-line (oedacli) utility. The new OEDA command line interface to update an existing es.xml file. These updates are called Actions and an action is a single atomic task. 


Monday, 8 January 2018

Oracle Database Appliance Odacli & Odaadmcli Utilities

Oracle Database Appliance consists of two physical servers (Node 0 and Node 1), a storage shelf and optionally an additional storage shelf. The two independent physical servers are interconnected and direct attached to SAS and SSD storage.

ODA is basically a 2-node RAC cluster database system running Oracle Linux operating (OEL), Oracle Database Enterprise Edition, Oracle Grid Infrastructure (Clusterware and ASM). All these together provides the Oracle Database high availability running on ODA.

In 2016, Oracle added 3 new models to expand Oracle Database Appliance portfolio. These 3 new models are:

  • Oracle Database Appliance X6-2S (single-instance database)
  • Oracle Database Appliance X6-2M (single-instance database)
  • Oracle Database Appliance X6-2L (single-instance database)
The High Available ODA x6-2 is now known as X6-2 HA which consists of 2 nodes and a storage shelf and optionally an additional storage shelf.

Courtesy Oracle

The Oracle Database Appliance X6-2 model family offers the lowest hardware price for an Oracle Engineered System. Combined with flexible Oracle Database software licensing, the Oracle Database Appliance X6-2 model family brings Oracle Engineered Systems to within reach of every organization.


In October 2017, Oracle announced Oracle Database Appliance X7-2 (Small, Medium and HA). ODA X7-2 comes with more computing resources compared with X6-2 Models.

  • Oracle Database Appliance X7-2S (single-instance database)
  • Oracle Database Appliance X7-2M (single-instance database)
  • Oracle Database Appliance X7-2 HA
Courtesy Oracle

Note: With ODA x7-2, looks like the ODA Large configuration is discontinued.

In this article we will demonstrate several different odacli and odaadmcli commands along with output that can be used to manage and administer an Oracle Database Appliance Small, Medium and Large models.


ODACLI: It is used for Hardware and administrative tasks on the Oracle Database Appliance, Example: Hardware monitoring and Storage Configuration


ODAADMICLI: It is used for everyday task on the Oracle Database Appliance, Example: Database Creation, Patches and upgrades, Job creation and manage and so on


ODACLI Commands

  • To display list of commands and options that can be used with odacli  execute the following command
[root@odanode1 ~]# odacli -h
odacli <command> <options>
Commands list (use --help option for help on any command):
        appliance:
                create-appliance
                describe-appliance
        asr:
                configure-asr
                delete-asr
                describe-asr
                test-asr
                update-asr
        component:
                describe-component
        cpucore:
                describe-cpucore
                list-cpucores
                update-cpucore
        credential:
                set-credential
        database:
                create-database
                delete-database
                describe-database
                list-databases
                register-database
        dbhome:
                create-dbhome
                delete-dbhome
                describe-dbhome
                list-dbhomes
                update-dbhome
        dbstorage:
                create-dbstorage
                delete-dbstorage
                describe-dbstorage
                list-dbstorages
        dcsagent:
                update-dcsagent
        job:
                describe-job
                list-jobs
        latestpatch:
                describe-latestpatch
        network:
                create-network
                delete-network
                describe-network
                list-networks
                update-network
        networkinterface:
                describe-networkinterface
                list-networkinterfaces
        repository:
                update-repository
        server:
                update-server
     
  • To describe ODA execute the following command
[root@odanode1 ~]# odacli describe-appliance

Appliance Information

----------------------------------------------------------------
                     ID: 9aef262c-xxxx-xxxx-xxxx-0d877c03d762
               Platform: ODA
        Data Disk Count: 2
         CPU Core Count: 10
                Created: May 23, 2017 3:08:03 AM CST

System Information

----------------------------------------------------------------
                   Name: odanode
            Domain Name: netsoftmate.com
              Time Zone: Asia/Pacific
             DB Edition: EE
            DNS Servers: 10.1.1.1
            NTP Servers: ntp1.netsoftmate.com

Disk Group Information

----------------------------------------------------------------
DG Name                   Redundancy                Percentage
------------------------- ------------------------- ------------
Data                      Normal                    80
Reco                      Normal                    20


 Options:

    --details, -d
       Detail Info

  • To describe ODA in details execute the following command
[root@odanode1 ~]# odacli describe-appliance -d

Appliance Information

----------------------------------------------------------------
                     ID: 9aef262c-xxxx-xxxx-xxxx-0d877c03d762
               Platform: ODA
        Data Disk Count: 2
         CPU Core Count: 10
                Created: May 23, 2017 3:08:03 AM CST

System Information

----------------------------------------------------------------
                   Name: odanode
            Domain Name: netsoftmate.com
              Time Zone: Asia/Pacific
             DB Edition: EE
            DNS Servers: 10.1.1.1
            NTP Servers: ntp1.netsoftmate.com

Disk Group Information

----------------------------------------------------------------
DG Name                   Redundancy                Percentage
------------------------- ------------------------- ------------
Data                      Normal                    80
Reco                      Normal                    20

DcsCli Details

----------------------------------------------------------------
                Version: 12.1.2.10-SNAPSHOT
            BuildNumber: jenkins-ol-dcs-cli-release-13
              GitNumber: f91373b8574e383e033301d82b8424115350d065
              BuildTime: null

DcsAgent Details

----------------------------------------------------------------
                Version: 12.1.2.10-SNAPSHOT
            BuildNumber: jenkins-ol-dcs-agent-release-31
              GitNumber: fb8b1776013457d4d80d7acac3ad96fa5ca52327
              BuildTime: null

  • To list ASR details execute the following command
[root@odanode1 ~]# odacli describe-asr

ASR details

----------------------------------------------------------------
                     ID: b8606dd5-99b4-xxxx-aabd-be8cd422754c
                   Name: ASR
               ASR Type: Internal
External ASR Manager IP :
               UserName: john.smith@example.com
        ProxyServerName: www-proxy.example.com
              ProxyPort: 80
          ProxyUserName:
            SnmpVersion: V3
                  State: Configured
                Created: May 23, 2017 3:08:03 AM CST
                Updated: May 23, 2017 3:42:43 AM CST

Options :

--json, -j
  json output

  • To list CPU Cores execute the following command
[root@odanode1 ~]# odacli list-cpucores

Node  Cores  Modified                       Job Status

----- ------ ------------------------------ ---------------
0     10     May 23, 2017 10:58:52 AM CST   Configured

  Options:
    --json, -j

       json output

  • To list all the job configured and to check their status execute the following command
[root@odanode1 ~]# odacli list-jobs

ID                                       Description                                                                 Created                             Status

---------------------------------------- --------------------------------------------------------------------------- ----------------------------------- ----------
65b60824-cb18-4fec-bdec-baf7e440efc9     Provisioning service creation                                               May 23, 2017 3:08:03 AM CST         Success
74d38c8e-98aa-4ff3-9b04-ef96bdfd35bd     Database service deletion with db name: demodb1 with id : c0cdc82d-02e5-4980-9952-36b6d4adf28a May 23, 2017 4:01:02 PM CST         Success
26de75bb-e525-4356-9828-6056d55b5f56     Database Home OraDB12102_home1 Deletion with id 8f5944b1-e953-4c78-89f4-ba4daa8110ca May 23, 2017 4:04:59 PM CST         Success

  Options:

    --json, -j

       json output
         
  • To list the patches for all the ODA components execute the following command
[root@odanode1 ~]# odacli describe-latestpatch

componentType   availableVersion

--------------- --------------------
gi              12.1.0.2.170117
db              11.2.0.4.161018
db              12.1.0.2.170117
oak             12.1.2.10.0
ilom            3.2.8.24.r114611
os              6.8
bios            38070000

Options :
    --json, -j
       json output

  • To list all the network details execute the following command
[root@odanode1 ~]# odacli list-networks

ID                                       Name                 NIC        IP Address         Subnet Mask        Gateway

---------------------------------------- -------------------- ---------- ------------------ ------------------ ------------------
49976a55-4e1a-440a-94c3-289b69d9afcc     Private-network      priv0      192.168.16.24      255.255.255.240
219953e6-3473-46f9-b21b-53e89bc8cf49     Public-network       btbond1.198 10.10.10.18      255.255.255.0      10.1.1.2

  • To list all the network interfaces execute the following command
[root@odanode1 ~]# odacli list-networkinterfaces

ID                                       Name                 NIC           Type

---------------------------------------- -------------------- ------------- ----------
724e42a6-c9f7-xxxx-9e34-7b0952f8e3e1     btbond1              btbond1       Bond
543aba2a-0cb0-xxxx-b23a-3f035aa401c0     btbond1.198          btbond1.198   Bond
18933aa5-b02d-xxxx-a31b-5ad988d6396b     em1                  em1           Physical
ce059f61-7529-xxxx-9cd4-ef94fdd3ec54     em2                  em2           Physical
2622ea10-508a-xxxx-86a8-351fe0a58e6f     p3p1                 p3p1          Physical
8ddd6b36-ff32-xxxx-9d1f-a90c14216bf7     p3p2                 p3p2          Physical
f03a424e-8c7e-xxxx-901f-3b81f9642cfa     sfpbond1             sfpbond1      Bond



ODAADMCLI Commands

  • To display list of commands and options that can be used with odaadmcli execute the following command
[root@odanode1 ~]# odaadmcli -h
Usage:  odaadmcli <command> <object> [<options>]
        commands: show|manage|stordiag|power|expand
        objects : disk|diskgroup|controller|server|processor|memory|iraid|power|cooling|network|storage|fs|raidsyncstatus|env_hw

Usage:  odaadmcli show       - Shows disk, diskgroup, controller, server, processor, memory, iraid, power, cooling, network, storage, fs, raidsyncstatus, env_hw

        odaadmcli manage     - Manages the OAK repository, diagcollect etc.,
        odaadmcli stordiag   - Run storage diagnostic tool on this Node
        odaadmcli power      - Power on|off|status disk
        odaadmcli expand     - Expand storage

  • To display list of commands and options that can be used with odaadmcli show execute the following command
[root@odanode1 ~]# odaadmcli show -h
Usage:
odaadmcli show {disk|diskgroup|fs|raidsyncstatus|controller|storage|env_hw|server|processor|memory|iraid|power|cooling|network} [<options>]
where:
        disk                     - About the disk
        diskgroup                - ASM disk group
        fs                       - Filesystem
        controller               - Controller
        storage                  - All storage components
        env_hw                   - Environment and Hardware information
        server                   - Details of server sub-system
        processor                - Details of processor sub-system
        memory                   - Details of memory sub-system
        iraid                    - Details of internal RAIDs sub-system
        power                    - Details of power supply sub-system
        cooling                  - Details of cooling sub-system
        network                  - Details of network sub-system
        raidsyncstatus           - RAID sync status information
For detailed help on each command and object and its options use:
odaadmcli <command> <object> -h

  • To list local disk on compute node execute the following command
[root@odanode1 ~]# odaadmcli show disk
        NAME            PATH            TYPE            STATE           STATE_DETAILS

        pd_00           /dev/nvme0n1    NVD             ONLINE          Good

        pd_01           /dev/nvme1n1    NVD             ONLINE          Good

  • To list all shared disk execute the following command
[root@odanode1 ~]# odaadmcli show disk -shared
        NAME            PATH            TYPE            STATE           STATE_DETAILS

        pd_00           /dev/nvme0n1    NVD             ONLINE          Good

        pd_01           /dev/nvme1n1    NVD             ONLINE          Good

  • To list ASM Disk Groups execute the following command 
[root@odanode1 ~]# odaadmcli show diskgroup
DiskGroups
----------
DATA
RECO

  • To list details of an ASM Disk Group execute the following command
[root@odanode1 ~]# odaadmcli show diskgroup DATA
        ASM_DISK        PATH                                            DISK            STATE           STATE_DETAILS

        data_00         /dev/NVD_S00_S2LHNA0HC05601p1                   pd_00           ONLINE          Good

        data_01         /dev/NVD_S01_S2LHNA0HC05809p1                   pd_01           ONLINE          Good


[root@odanode1 ~]# odaadmcli show diskgroup RECO

        ASM_DISK        PATH                                            DISK            STATE           STATE_DETAILS

        reco_00         /dev/NVD_S00_S2LHNA0HC05601p2                   pd_00           ONLINE          Good

        reco_01         /dev/NVD_S01_S2LHNA0HC05809p2                   pd_01           ONLINE          Good

  • To list file system details execute the following command
[root@odanode1 ~]# odaadmcli show fs
      Type     Total Space      Free Space  Total DG Space   Free DG Space  Diskgroup Mount Point
      ext3          30109M          13215M               -               -            /
      ext3            476M            405M               -               -            /boot
      ext3          60347M          43274M               -               -            /opt
      ext3         302252M         235296M               -               -            /u01
      acfs           5120M           5071M        4894016M          70220M       DATA /opt/oracle/dcs/commonstore
      acfs        2406400M        1699624M        4894016M          70220M       DATA /u02/app/oracle/oradata/datastore
      acfs         306176M         292685M        1231176M          14372M       RECO /u01/app/oracle/fast_recovery_area/datastore
      acfs         302080M         294707M        1231176M          14372M       RECO /u01/app/oracle/oradata/datastore

  • To list storage details execute the following command
[root@odanode1 ~]# odaadmcli show storage
==== BEGIN STORAGE DUMP ========
Host Description: Oracle Corporation:ORACLE SERVER X6-2
Total number of controllers: 2
        Id          = 0
        Pci Slot    = 10
        Serial Num  = xxxxxxxxxx
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYABR3Q
        strId       = nvme:19:00.00
        Pci Address = 19:00.0

        Id          = 1

        Pci Slot    = 11
        Serial Num  = xxxxxxxxxxx
        Vendor      = Samsung
        Model       = MS1PC2DD3ORA3.2T
        FwVers      = KPYABR3Q
        strId       = nvme:1b:00.00
        Pci Address = 1b:00.0

Total number of expanders: 0

Total number of PDs: 2
        /dev/nvme0n1    Samsung           NVD 3200gb slot:  0  pci : 19
        /dev/nvme1n1    Samsung           NVD 3200gb slot:  1  pci : 1b
==== END STORAGE DUMP =========

  • To ODA hardware details execute the following command
[root@odanode1 ~]# odaadmcli show env_hw
BM ODA X6-2 Small

  • To list ODA server details execute the following command
[root@odanode1 ~]# odaadmcli show server

        Power State              : On

        Open Problems            : 0
        Model                    : ODA X6-2S
        Type                     : Rack Mount
        Part Number              : ODA X6-2S
        Serial Number            : xxxxxxxxx
        Primary OS               : Not Available
        ILOM Address             : 10.10.10.11
        ILOM MAC Address         : 00:10:E0:BF:1C:38
        Description              : Oracle Database Appliance X6-2 Small xxxxxxx
        Locator Light            : Off
        Actual Power Consumption : 135 watts
        Ambient Temperature      : 27.000 degree C
        Open Problems Report     : System is healthy

  • To check processor status the following command
[root@odanode1 ~]# odaadmcli show processor

        NAME  HEALTH HEALTH_DETAILS PART_NO. LOCATION   MODEL                         MAX_CLK_SPEED TOTAL_CORES ENABLED_CORES


        CPU_0 OK     -              060F     P0 (CPU 0) Intel(R) Xeon(R) CPU E5-2630  2.200 GHz       10        NA

       
  • To check Memory status execute the following command
[root@odanode1 ~]# odaadmcli show memory

        NAME    HEALTH HEALTH_DETAILS PART_NO.         SERIAL_NO.         LOCATION MANUFACTURER MEMORY_SIZE CURR_CLK_SPEED ECC_Errors


        DIMM_0  OK     -              3A4K40BB1-CRC    00CE02164433E98884 P0/D0    Samsung      32 GB       2400 MHz       0

        DIMM_11 OK     -              3A4K40BB1-CRC    00CE02164433E986FB P0/D1    Samsung      32 GB       2400 MHz       0
        DIMM_3  OK     -              3A4K40BB1-CRC    00CE02164433E9863B P0/D3    Samsung      32 GB       2400 MHz       0
        DIMM_8  OK     -              3A4K40BB1-CRC    00CE02164433E98689 P0/D8    Samsung      32 GB       2400 MHz       0

  • To check raid status execute the following command
[root@odanode1 ~]# odaadmcli show iraid

        NAME     CTRL# PRODUCT                  SERIAL_NO     BIOS_VER                      FW_VER         VDISK_TYPE   VDISK_STATE  PDISK_MODEL         EID:SLT  PDISK_STATE SIZE  


CV_MODEL CV_STATE CV_TEMP

        IR_0_0_0 0     LSI MegaRAID 9361-8i     SV62214495    6.17.04.2_4.16.08.00_0x06060A 4.230.40-3739  RAID1        Optl         MS4SC2JH2ORA480G    252:0    Onln        446.102 GB

CVPM02   Optimal  27C
        IR_0_0_1 0     LSI MegaRAID 9361-8i     SV62214495    6.17.04.2_4.16.08.00_0x06060A 4.230.40-3739  RAID1        Optl         MS4SC2JH2ORA480G    252:1    Onln        446.102 GB
CVPM02   Optimal  27C
       
  • To check power status execute the following command
[root@odanode1 ~]# odaadmcli show power

        NAME            HEALTH HEALTH_DETAILS PART_NO. SERIAL_NO.         LOCATION INPUT_POWER OUTPUT_POWER INLET_TEMP      EXHAUST_TEMP


        Power_Supply_0  OK     -              7079395  476856Z+1644CE006L PS0      Present     60 watts     27.000 degree C 33.812 degree C

        Power_Supply_1  OK     -              7079395  476856Z+1644CE000A PS1      Present     56 watts     27.000 degree C 32.938 degree C

  • To check network status execute the following command
[root@odanode1 ~]# odaadmcli show network

        NAME           HEALTH HEALTH_DETAILS LOCATION PART_NO MANUFACTURER MAC_ADDRESS        LINK_DETECTED DIE_TEMP


        Ethernet_NIC_0 OK     -              NET0     X540    INTEL        00:10:E0:BF:1C:34  yes (em1)     61.250 degree C

        Ethernet_NIC_1 OK     -              NET1     X540    INTEL        00:10:E0:BF:1C:35  yes (em2)     61.250 degree C
        Ethernet_NIC_2 -      -              NET2     X540    INTEL        90:E2:BA:D9:7D:B9  no (p3p2)     -
        Ethernet_NIC_3 -      -              NET3     X540    INTEL        90:E2:BA:D9:7D:B8  no (p3p1)     -



Conclusion


In this article we have learned about Oracle Database Appliance X6-2 and X7-2 model family. Also we have learned how to use the odacli and odaadmcli command line utilities to manage and administer an Oracle Database Appliance.  odacli is used for Hardware and administrative tasks on the Oracle Database Appliance, Example: Hardware monitoring and Storage Configuration whereas odaadmcli is used for everyday task on the Oracle Database Appliance, Example: Database Creation, Patches and upgrades, Job creation and manage and so on.