Distributed command line utility(dcli) provides an option to execute the monitoring and administration commands on multiple servers simultaneously.In exadata database machine , you may need to create the griddisks on all the exadata storage cells frequently. Each time , you need to login to all the storage cells and create the griddisk manually.But dcli will make our life easier once you configured the all the storage cells on any one of the storage cell or on the database node. In this article ,we will see how to configure the dcli on multiple storage cells.
It’s good to configure the dcli on the database server. So that you no need to login to exadata storage cells for each grid disk creation/drop.
1. Login to the database server or any one of the exadata storage cell.Make sure all the exadata stroage cells has been added to the /etc/hosts file.
[root@uaexacell1 ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.2.50 uaexacell1 192.168.2.51 uaexacell2 192.168.2.52 uaexacell3 [root@uaexacell1 ~]#
2. Create the file with all the exadata storage cell .
[root@uaexacell1 ~]# cat << END >> exacells > uaexacell1 > uaexacell2 > uaexacell3 > END [root@uaexacell1 ~]# [root@uaexacell1 ~]# cat exacells uaexacell1 uaexacell2 uaexacell3 [root@uaexacell1 ~]#
3.Create the ssh key for the host.
[root@uaexacell1 ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 15:ac:fb:66:8b:5f:32:09:dd:b9:e7:ca:6c:ef:6b:b4 root@uaexacell1 [root@uaexacell1 ~]#
4.Execute the below command to make the password less login for all the hosts which we have added in exacells file. DCLI Utility configures the password less authentication across the nodes using ssh .
[root@uaexacell1 ~]# dcli -g exacells -k The authenticity of host 'uaexacell1 (192.168.2.50)' can't be established. RSA key fingerprint is e6:e9:4f:d1:a0:05:eb:38:d5:bf:5b:fb:2a:5f:2c:b7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'uaexacell1,192.168.2.50' (RSA) to the list of known hosts. celladmin@uaexacell1's password: celladmin@uaexacell2's password: celladmin@uaexacell3's password: uaexacell1: ssh key added uaexacell2: ssh key added uaexacell3: ssh key added [root@uaexacell1 ~]#
We have successfully configured the dcli utility on all the exadata storage cells. Now we can monitor & administrate cells nodes from the current host.
5.Let me check the status of the all exadata cells.
[root@uaexacell1 ~]# dcli -g exacells cellcli -e list cell uaexacell1: uaexacell1 online uaexacell2: uaexacell1 online uaexacell3: uaexacell1 online [root@uaexacell1 ~]#
6.Create the griddisk on all the exadata storage node using the dcli utility.
[root@uaexacell1 ~]# dcli -g exacells cellcli -e list celldisk where disktype=harddisk uaexacell1: CD_DISK01_uaexacell1 normal uaexacell1: CD_DISK02_uaexacell1 normal uaexacell1: CD_DISK03_uaexacell1 normal uaexacell1: CD_DISK04_uaexacell1 normal uaexacell1: CD_DISK05_uaexacell1 normal uaexacell1: CD_DISK06_uaexacell1 normal uaexacell1: CD_DISK07_uaexacell1 normal uaexacell1: CD_DISK08_uaexacell1 normal uaexacell1: CD_DISK09_uaexacell1 normal uaexacell1: CD_DISK10_uaexacell1 normal uaexacell1: CD_DISK11_uaexacell1 normal uaexacell1: CD_DISK12_uaexacell1 normal uaexacell1: CD_DISK13_uaexacell1 normal uaexacell2: CD_DISK01_uaexacell1 normal uaexacell2: CD_DISK02_uaexacell1 normal uaexacell2: CD_DISK03_uaexacell1 normal uaexacell2: CD_DISK04_uaexacell1 normal uaexacell2: CD_DISK05_uaexacell1 normal uaexacell2: CD_DISK06_uaexacell1 normal uaexacell2: CD_DISK07_uaexacell1 normal uaexacell2: CD_DISK08_uaexacell1 normal uaexacell2: CD_DISK09_uaexacell1 normal uaexacell2: CD_DISK10_uaexacell1 normal uaexacell2: CD_DISK11_uaexacell1 normal uaexacell2: CD_DISK12_uaexacell1 normal uaexacell2: CD_DISK13_uaexacell1 normal uaexacell3: CD_DISK01_uaexacell1 normal uaexacell3: CD_DISK02_uaexacell1 normal uaexacell3: CD_DISK03_uaexacell1 normal uaexacell3: CD_DISK04_uaexacell1 normal uaexacell3: CD_DISK05_uaexacell1 normal uaexacell3: CD_DISK06_uaexacell1 normal uaexacell3: CD_DISK07_uaexacell1 normal uaexacell3: CD_DISK08_uaexacell1 normal uaexacell3: CD_DISK09_uaexacell1 normal uaexacell3: CD_DISK10_uaexacell1 normal uaexacell3: CD_DISK11_uaexacell1 normal uaexacell3: CD_DISK12_uaexacell1 normal uaexacell3: CD_DISK13_uaexacell1 normal [root@uaexacell1 ~]# [root@uaexacell1 ~]# dcli -g exacells cellcli -e create griddisk HRDB celldisk=CD_DISK01_uaexacell1, size=100M uaexacell1: GridDisk HRDB successfully created uaexacell2: GridDisk HRDB successfully created uaexacell3: GridDisk HRDB successfully created [root@uaexacell1 ~]# [root@uaexacell1 ~]# dcli -g exacells cellcli -e list griddisk HRDB detail uaexacell1: name: HRDB uaexacell1: availableTo: uaexacell1: cachingPolicy: default uaexacell1: cellDisk: CD_DISK01_uaexacell1 uaexacell1: comment: uaexacell1: creationTime: 2014-11-17T15:46:43+05:30 uaexacell1: diskType: HardDisk uaexacell1: errorCount: 0 uaexacell1: id: 3bf213a3-dafc-41b7-b133-5580dd04c334 uaexacell1: offset: 48M uaexacell1: size: 96M uaexacell1: status: active uaexacell2: name: HRDB uaexacell2: availableTo: uaexacell2: cachingPolicy: default uaexacell2: cellDisk: CD_DISK01_uaexacell1 uaexacell2: comment: uaexacell2: creationTime: 2014-11-17T15:46:43+05:30 uaexacell2: diskType: HardDisk uaexacell2: errorCount: 0 uaexacell2: id: 21014da6-6e17-4ca1-a7dc-cc059bd75654 uaexacell2: offset: 48M uaexacell2: size: 96M uaexacell2: status: active uaexacell3: name: HRDB uaexacell3: availableTo: uaexacell3: cachingPolicy: default uaexacell3: cellDisk: CD_DISK01_uaexacell1 uaexacell3: comment: uaexacell3: creationTime: 2014-11-17T15:46:43+05:30 uaexacell3: diskType: HardDisk uaexacell3: errorCount: 0 uaexacell3: id: 3821ce2c-4376-4674-8cb4-6c8868b5b1f9 uaexacell3: offset: 48M uaexacell3: size: 96M uaexacell3: status: active [root@uaexacell1 ~]#
You can also use the dcli command without having the hosts file.
[root@uaexacell1 ~]# dcli -c uaexacell1,uaexacell2,uaexacell3 cellcli -e drop griddisk HRDB uaexacell1: GridDisk HRDB successfully dropped uaexacell2: GridDisk HRDB successfully dropped uaexacell3: GridDisk HRDB successfully dropped [root@uaexacell1 ~]#
Hope this article is informative to you .
Thank you for visiting UnixArena
saravanan says
Nice Article with clear explanation. Thanks