12 Days of #Cloud: Cloning #DBaaS Instance

12 Days of #Cloud: Day 8

It is very easy to stand up a new DBaaS instance as a replica or clone of an existing instance. In this demo, I am going to create a new instance as a copy of CLDB4ACED DBaaS instance.

First, need to create a snapshot using the DBaaS instance menu. Periodic snapshots as a backup may be a good idea too.

Choose the instance where you want to create the snapshot, and go to the Administration tile where you can see Patches, Snapshots, and Backups. Click on the “Create Snapshot”.

Provide a name for the snapshot and an optional description.

There is no outage to the source database while the snapshot is happening, but the warning says that the instance is in “backup mode”.

In the alert log, found the following messages when the snapshot was created.

The snapshot got created in few minutes (about 3 in my case).

And, just for reference, these are the file systems and sizes when the snapshot was taken.

Let’s use this snapshot to build a new DBaaS instance.

Choose the snapshot menu item “Create Database Clone”.

Provide information similar to when creating a new #DBaaS instance. You cannot change the “Subscription Type” and “Software Edition”. They inherit the qualities of the snapshot.

Provide instance details on the next screen. The items inside the red boxes only are updatable (which is obvious).

The next screen shows the summary.

In few minutes, the DBaaS instance is ready. And the file systems and mount points are exactly same as in the source. The new database is up and running, with the same PDBs as in the source.

After the cloned instance was successfully created, notice the “Linked Clones” item shows 1. Earlier no clones were linked to the snapshot.

Since a database is linked to this snapshot, I will not be able to delete this snapshot.

When my cloned instance purpose is satisfied, there is no need to keep the instance running and pay Oracle. Let me delete the instance and snapshot. I can always create a new one if the need arises again in future.

Go to “Oracle Database Cloud Services” menu and delete the instance.

The instance status changed to “Terminating” and after a few minutes the instance disappeared.

Now I can delete the snapshot as well.

If there is an issue on a DBaaS instance, it is very easy to make a copy of the DBaaS instance using snapshot and perform the troubleshooting in the cloned instance until the fix is tested and confirmed.

Happy cloning!

 

12 Days of #Cloud: Adding Storage to #DBaaS Node

12 Days of #Cloud: Day 7

There are three types of storage expansion possible on Oracle #DBaaS instance.

1. Increase Default File Systems

Increasing the default file systems that hold data files (/u02), FRA and backup (/u03) is easy.  These file systems can be increased by using the menu item “Scale Up / Down Service” and choosing the appropriate file system to extend. Below example shows extending the backup file system.

No other file systems can be increased easily. To increase a storage volume, you need to create a new volume, copy contents from old to new, and remove the old.

2. Creating New Storage Volume

In the above screen (Scale up / down Service), you can choose the first option of “Create New Storage Volume”. Specify a size in GB and click the confirm (Yes, Scale Up/Down Service) button.

The DBaaS Monitor Console (OS Storage) shows the storage is available on the node.

Also, view details in the Oracle Compute Cloud Services, Storage section.

#DBaaS service assigns the next available device and volume number.

File system is updated in /etc/fstab as well, so when VM is rebooted, the storage you just added is automatically mounted.

Notice that, though we added a new storage volume that has nothing to do with the running database, DBaaS service did take an outage on the environment and rebooted the node.

A note from Oracle documentation: Looks like an unnecessary limitation.

3. Attaching New Storage Volume from Compute Cloud

This is similar to #2, but more manual steps. Used Oracle documentation as a reference to do these steps.

Choose Oracle Compute Cloud Service and click on the “Create Storage Volume” button.

Pick a name and size for the storage volume, and the type of storage.

Once the storage volume is created, attach the storage to a DBaaS VM.

Choose the instance where the volume need to be attached to.

Storage is attached to the DBaaS host.

But the storage is not visible on the Linux VM as it is not mounted. Before mounting the storage, there are few steps to complete. The new storage added is /dev/xvdg.

A note from Oracle Documentation.