Wednesday, January 1, 2020

Resize Boot Volume Size and Partition size in Oracle Cloud Instance

7:27 AM Posted by Dilli Raj Maharjan , No comments



Sometimes we might need to resize Boot Volume to add additional partition or expand the existing partitions in Oracle cloud instance. Following are the detail step by step guide to increase Boot Volume and expand existing partition. In example below I have resized Boot Volume of Orcl1 instance from 47GB to 52GB.

Following are the steps to be followed.


1. Stop the instance, if it is running.

Check current disk space details with df -h linux command.

Existing partitions on running instance.


Click on Navigation Menu >> Compute >> Instance



Instance list will be displayed. Click on desired instance to stop.



Instance details will be displayed. Click on Stop button to stop instance.



A message will be popped up. Click on OK to stop instance.



2. Detach boot volume

Click on Boot Volume under Compute section.



Boot Volumes will be displayed. Click on required Boot Volumes. In my case I am resizing Orcl1 so I have clicked Orcl1 (Boot Volume)



Once Boot Volume Name is clicked, Boot Volume details will be displayed as below.



On the left bottom corner Click on Attached Instances under Resources section.
 

Attached instances list will be displayed. Click on menu(3 vertical dots at the right).



Click on Detach from Instance to detach Boot Volume from the Instance.


A confirmation message will be popped up. Click on Detach to detach Boot Volume from Instance.



Boot Volume detaching in progress..



Once Boot Volume is detached from the instance list of Instance will shows No Items as below.



3. Resize Boot Volume

Click on Resize Button of Boot Volume detail page.



Resize Boot Volume window will be displayed. Enter new Boot Volume size. New Size should be greater than existing size and less than 32TB. In my case I have set it to 52GB.



Once Resize button is clicked the Boot Volume status will be AVAILABLE.



Click on Navigation Menu. Click on Compute >> Boot Volume to view new size of Boot Volume.



On Boot Volume list page new Boot Volume size will be displayed.



4. Attach boot volume to another instance to expand partition. For creating new partition with the new increment on size jump to Step 5 and 6.



Click on Attached Instance under Resources section.


Click on Attach to Instance button to attach Boot Volume to Instance.



Select attachment type. Click on Instance name and select desired instance on which Boot Volume need to be attached. In our case we are attaching Boot Volume of Orcl1 instance to another Instance Orcl2.



A popped up message will be displayed. Click on Close to close message window.



Attaching Boot Volume in progress...













Once Boot Volume is attached, status of Boot Volume will be Attached.














Click on menu(3 vertical dots) at the right hand. Click on iSCSI Commands & Information.
Click on Copy to copy iSCSI attach commands.



Execute iSCSI command inside Orcl2 instance.



Execute lsblk command to list all block devices and its deails.



Use parted command to remove existing partition and create new partition with new size. I have noted the start value and used while creating new partition. Used 100% to use entire free disk to new partition.



Executed print command to display current partition. Execute quit command to exit from parted prompt.












Click on iSCSI Commands & Information to copy iSCSI command to deattach iSCSI.



Copy iSCSI detach commands.


Execute iSCSI commands to detach the disk from instance.



Verify disk has been detached and ready to detach from Cloud Console.



Detach Boot Volume from Orcl2 instance.



A poped up message will be displayed. Click on Detach.


Detaching from Orcl2 in progress...



Once Detach is completed there will be no instance left.


5. Attach Boot Volume to Orcl1 instance.

Under resource section of Instance detail page click on Boot Volume.


On the right of the Boot Volume page click on menu(3 horizontal dots)


Click on Attach to attach Boot Volume to Instance Orcl1.

Click on OK to confirm attaching Boot Volume to Orcl1 Instance.



Boot Volume Attaching in progress.

Boot Volume attached successfully.


6. Start Instance with new Boot Volume size.

Once Boot Volume is attached successfully, click on Start in Instance page.


Click on OK to confirm Start



Login to the instance and we can notice new size of partition.

Tuesday, July 25, 2017

Uninstall Oracle Enterprise Manager 13c Cloud Control

3:58 AM Posted by Dilli Raj Maharjan , No comments

Uninstall Oracle Enterprise Manager 13c Cloud control.  


Change directory to OMS_HOME/sysman and copy install directory to staging location. I used staging directory as /ssd.





Execute EMDeinstall.pl from the staging location. Use following command to begin uninstall.
Syntax:
$OMS_HOME/perl/bin/perl <STG_DIR>/EMDeinstall.pl -mwHome $OMS_HOME -stageLOC <STG_DIR>
Example:
/ssd/oracle/Middleware/perl/bin/perl /ssd/install/EMDeinstall.pl -mwHome /ssd/oracle/Middleware -stageLoc /ssd/install

Please provide sys password, sysman password, admin server password to begin deinstall.






Deinstall on progress #####.







Deinstall on progress ##########.  Deinstallation process may take more than 30 mins. So please keep patience. 


 Oracle Enterprise Manager deinstall completed.






Friday, June 30, 2017

Create MySQL Instance on MySQL Cloud Service

6:15 AM Posted by Dilli Raj Maharjan , No comments




Open Browser and Type URL: https://cloud.oracle.com. Once the page is opened click on Sign In.



 Once Click on Sign In. Following is the landing page. Select the Data Center.


Select appropriate Data Center and click on My Service.



Type the Identity Domain and Click on Go.


Type the username and password and Click on Sign In.


Once you login to Oracle Public Cloud Click on Create Instance on the dashboard.



The Create Instance window will be displayed. Click on MySQL Cloud Service.



Welcome screen will be appeared. You have option to Watch MySQL instance related videos by Clicking Watch Video or Click on Go to Console button for console.



Since I have not created any MySQL instances, there is no MySQL Instance. On Console Window, Click on Create Service to Create MySQL Instance Service.


Choose Appropriate Service Name, Description, Region and Metering Frequency and Click on Next.



On Detail configuration page, provide details as the Compute Shape, SSH Key, Size, root Credentials.




If we choose to configure MySQL Enterprise Monitor option to Yes, then Following details need to be provided: Manager User, Password, Agent user, Agent Password.  In my case I have disabled this option.


Similarly Backup destination can be defined as Both Cloud and Disk Storage. For Cloud we need to provide the container ID and its credential. I have disabled this option too.

Confirmation Page will be appeared before the database creation. Click on Create to start MySQL Instance creation.


Instance Creation on progress

Click on Instance name to view the Service Details.

Once MySQL service is created, we can login to the instance as user opc using ssh.


Once Instance is created we need to create Access Rules so that MySQL Database service can be used publicly. Click on the Menu icon and Click on Access Rules.






On Access Rules page, Click on Action menu on the right of the rule. In following snapshot, Rule ora_p2admin_mysql is disabled, that means MySQL Database hosted on this instance cannot be accessed from public network.



Since the rule is disabled, we cannot connect MySQL database instance from public network. I try to connect from my ec2 instance but failed.


Once you click on the menu of the rule, Click on Enable to enable the rule.

Enable Access Rule pop up window will be displayed for confirmation. Click on Enable to enable the Access rule.



Now we can notice the Access rule has been enabled. 



We can connect MySQL instance from the public network, create table and insert data.




If we need to connect MySQL database locally we need to install MySQL Client. Use yum install mysql to install MySQL client.