Scaling is one of the great benefits of the Cloud: scale up when there’s a peak in workload, scale down when it’s quiet. And scaling the PaaS databases, like the autonomous database in Oracle Cloud, is just one click away, and very easy to perform. But vertical scaling (more CPU/memory on 1 VM) in IaaS, without breaking the application, needs more attention. As I understand, this will be the main new feature in Q1 2020.

Till then, you need to perform a few steps. In this post, I will describe an upscale of a VM with OEM13c in it. WebLogic and database are included in the VM.In a former post I created an OEM13c through the marketplace app.

In the real world, it’s more than likely that you need more CPUs or more memory. In other words, you need a change of the instance-size. To understand how this change works in Oracle cloud, you need to know what elements are involved. In a picture:

image

Explanation:

– The marketplace app created an instance of a certain size, and gave it a private IP address and name.

– A boot volume and blockvolume was also created and attached to this instance.

– I created a reserved public IP-address and also attached this to the instance.

 

The following steps should be taken for a scale-operation. It looks like a lot, but when you get the hang of it, it’s relatively easy to do.

1. Memorize the private ip-address and name of the instance

2. Stop all software

3. Stop the instance

4. Detach blockstorage

5. Terminate the instance (!) without deleting the boot volume

6. Create instance with the old boot volume, and with the old ip and name

7. Attach blockstorage

8. Mount the blockstorage

9. Attach public ip-addres

10. Start the instance

1. private ip-address and name

When checking this in Linux it looks like this:

[opc@emcc ~]$ cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

10.0.1.9 oem13c6.sub11011401051.oemvcn.oraclevcn.com oem13c6

10.0.1.9 emcc.marketplace.com emcc

Although not necessary, I want to know some information about the disks (just in case….).

[root@oem13c6 opc]# lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sdb 8:16 0 400G 0 disk

└─sdb1 8:17 0 400G 0 part /u01

sda 8:0 0 46.6G 0 disk

├─sda2 8:2 0 8G 0 part [SWAP]

├─sda3 8:3 0 38.4G 0 part /

└─sda1 8:1 0 200M 0 part /boot/efi

 

[root@oem13c6 opc]# blkid

/dev/sdb1: UUID=”0eb2f372-ee1d-47e4-bf56-5ce8110a0f21″ TYPE=”xfs” PARTUUID=”57e88af4-f877-4757-b05b-6c25a2df7b8d”

/dev/sda1: SEC_TYPE=”msdos” UUID=”4EAE-E92C” TYPE=”vfat” PARTLABEL=”EFI System Partition” PARTUUID=”4c374dd7-f879-407c-ac2e-0154e586c082″

/dev/sda2: UUID=”ec49f02f-cbd9-4890-88d3-fee99c70e661″ TYPE=”swap” PARTUUID=”d023a973-8ef5-4526-b793-f6756fa6a3c6″

/dev/sda3: UUID=”915fbdd1-9aba-4b6d-8714-5c28f1c31d77″ TYPE=”xfs” PARTUUID=”e0fedb5c-f09f-4a3f-9d75-c68f6b86e30a”

 

[root@oem13c6 opc]# cat /etc/fstab

#

# /etc/fstab

# Created by anaconda on Thu Aug 15 02:35:23 2019

#

# Accessible filesystems, by reference, are maintained under ‘/dev/disk’

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

UUID=915fbdd1-9aba-4b6d-8714-5c28f1c31d77 / xfs defaults,_netdev,_netdev 0 0

UUID=4EAE-E92C /boot/efi vfat defaults,uid=0,gid=0,umask=0077,shortname=winnt,_netdev,_netdev,x-initrd.mount 0 0

UUID=ec49f02f-cbd9-4890-88d3-fee99c70e661 swap swap defaults,_netdev,x-initrd.mount 0 0

######################################

## ORACLE CLOUD INFRASTRUCTURE CUSTOMERS

##

## If you are adding an iSCSI remote block volume to this file you MUST

## include the ‘_netdev’ mount option or your instance will become

## unavailable after the next reboot.

## SCSI device names are not stable across reboots; please use the device UUID instead of /dev path.

##

## Example:

## UUID=”94c5aade-8bb1-4d55-ad0c-388bb8aa716a” /data1 xfs defaults,noatime,_netdev 0 2

##

## More information:

## https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/connectingtoavolume.htm

UUID=0eb2f372-ee1d-47e4-bf56-5ce8110a0f21 /u01 xfs defaults,_netdev,nofail 0 2

 

2. Stop all software

# Sudo su oracle

[oracle@emcc opc]$ cd /home/oracle

[oracle@emcc ~]$ ls

oradiag_oracle start_agent.sh start_db.sh stop_agent.sh stop_db.sh

README.FIRST start_all.sh start_oms.sh stop_all.sh stop_oms.sh

[oracle@emcc ~]$ ./stop_all.sh

Stopping EM: Oracle Management Server, Oracle Management Agent and Oracle Database ………

The command completed successfully

3. Stop the instance

Go to the instance and stop it.

4. Detach the blockstorage

It’s probably preferable to unmount the storage first. However, because the software and instance have been stopped, and the UUID of the boot and blockstorage won’t change, it should be safe to detach the blockstorage right away.

clip_image004[8]

When you want to detach the block volume you will get the commands to unmount the disks first.

clip_image006[8]

clip_image008[8]

5. Terminate the instance without deleting the boot volume

clip_image010[6]

Important: Don’t delete the attached Boot Volume!

clip_image012[6]

In this phase we have no instance, but all kind of loose stuff:

image

6. Create instance with the old boot volume, and with the old ip and name

Choose ‘create instance’ and in ‘choose operating system or image source’ choose the bootvolume you wish to attach to the instance.

clip_image016[6]

Pick the new size:

clip_image018[6]

Do not assign a public IP address.

clip_image020[6]

And the most import part, in the ‘Advanced options’, the private ip-address and emcc (without the addition of marketplace.com).

clip_image022[6]

Create the instance.

clip_image024[6]

When created, the status is ‘running’.

At that moment we’ve got the following situation. An instance with some loose ends.

image

7. Attach the block-storage

clip_image028[6]

clip_image030[6]

Now we have to mount the block storage.

8. Mount the block-storage

Choose the three dots, and get the mount option-commands to run.

clip_image032[6]

clip_image034[6]

Copy and paste the commands, run as root:

[opc@emcc ~]$ sudo -s

[root@emcc opc]# sudo iscsiadm -m node -o new -T iqn.2015-12.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c -p 169.254.2.2:3260

o iscsiadm -m node -o uNew iSCSI node [tcp:[hw=,ip=,net_if=,iscsi_if=default] 169.254.2.2,3260,-1 iqn.2015-12.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c] added

[root@emcc opc]# sudo iscsiadm -m node -o update -T iqn.2015-12.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c -n node.startup -v automatic

2.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c -p 169.254.2.2:32[root@emcc opc]# sudo iscsiadm -m node -T iqn.201:3260 -l.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c -p 169.254.2.2

Logging in to [iface: default, target: iqn.2015-12.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c, portal: 169.254.2.2,3260] (multiple)

Login to [iface: default, target: iqn.2015-12.com.oracleiaas:a13f913b-38aa-4350-90f3-6f4185ef283c, portal: 169.254.2.2,3260] successful.

9. Attach the public ip-address

clip_image036[6]

No loose ends anymore

image

10. Start the software as oracle

[oracle@emcc ~]$ ./start_all.sh

Starting EM: Oracle Database, Oracle Management Server and Oracle Management Agent …..

Starting the Oracle Database and network listener

…….

Starting the Oracle Management Server …..

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.

Starting Oracle Management Server…

WebTier Successfully Started

Oracle Management Server Successfully Started

Oracle Management Server is Up

JVMD Engine is Up

Starting BI Publisher Server …

BI Publisher Server Successfully Started

BI Publisher Server is Up

Starting the Oracle Management Agent …..

Oracle Enterprise Manager Cloud Control 13c Release 3

Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.

Starting agent …………………………………………. started.

Is it working again? Yes, it does!

clip_image039[6]

Regardz..