Professional Documents
Culture Documents
In general, when you add storage to a database deployment on Oracle Database Classic Cloud
Service, you want the storage to be permanent; that is, to remain attached and available until
the deployment is deleted. To add this kind of permanent storage, scale up the storage as
described in Scaling a Database Deployment.
However, you may sometimes want to add storage to a database deployment temporarily for
a short period of time, after which you want to detach and delete the storage.
Topics
To add temporary storage to a database deployment, you add a storage volume to a compute
node. First, you create a Compute Cloud Service storage volume and attach it to the compute
node. Then, while logged into the compute node you use Linux commands to partition,
format and mount the storage volume.
The storage you add by following these steps is “temporary” in that you can later unmount it
from the compute node and delete it. In all other ways it is “permanent”: it remains in
existence, even if you delete the database deployment to which it is attached, until you delete
it.
Note:
If the database deployment to which you attach this temporary storage is restarted or is
stopped and then started, the storage volume becomes detached from the compute node and
you must reattach it. For instructions, see Attaching a Storage Volume to an Instance in
Using Oracle Cloud Infrastructure Compute Classic. After reattaching the storage volume,
you must then connect to the compute node and remount it.
If the compute node is rebooted, such as when following the instructions in Rebooting a
Compute Node, the temporary storage becomes unmounted and you must remount it.
When adding a Compute Cloud Service storage volume as temporary storage, keep these
points in mind:
A compute node can have a maximum of ten storage volumes attached to it.
You can create a storage volume from 1 GB to 2048 GB in size, in increments of 1
GB.
1. Use the Create Storage Volume wizard in the Compute Cloud Service console to
create a storage volume.
Follow the instructions provided in Creating a Storage Volume in Using Oracle
Cloud Infrastructure Compute Classic, choosing storage/default as the value for
Storage Property.
2. Attach the storage volume to the Compute Cloud Service instance on which the
compute node is running by following the instructions in Attaching a Storage Volume
to an Instance in Using Oracle Cloud Infrastructure Compute Classic.
When you attach the storage volume, it is assigned a disk number. Note down this
disk number for later use.
For detailed instructions, see Connecting to a Compute Node Through Secure Shell
(SSH).
$ sudo -s
#
# ls /dev/xvd*
In the listing that is displayed, look for an entry of the form /dev/xvdLETTER, where LETTER
is the letter that is alphabetically one higher than the storage volume’s disk number.
For example, if the storage volume’s disk number is 6, you should look for the entry
/dev/xvdg because the letter “g” is the seventh letter of the alphabet.
Create a single, primary partition that occupies the entire storage volume by using the
fdisk command. For example:
# fdisk /dev/xvdg
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
disklabel
Building a new DOS disklabel with disk identifier 0xaa660f6f.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
In this example, note the use of the p command to print the partition table before writing the
table and exiting. Use this command and note down the name of the new partition as
displayed in the Device column.
Create a file system on the partition by using the mkfs command. For example:
# mkdir /u05
Mount the partition on the directory you just created by using the mount command. For
example:
Set the ownership and permissions of the mount-point directory appropriately by using
the chown and chmod commands. For example:
11. # exit
12. $
To delete temporary storage, you unmount the storage on the compute node and then detach
the storage volume from the Compute Cloud Service instance and delete it.
For detailed instructions, see Connecting to a Compute Node Through Secure Shell
(SSH).
$ sudo -s
#
Display mounted filesystems and confirm the mount point of your temporary storage
volume:
# df -hT
# umount /u05
Note:
# exit
exit
$ exit
For instructions, see Accessing Oracle Compute Cloud Service in Using Oracle Cloud
Infrastructure Compute Classic.
When you open the Oracle Compute Cloud Service console, the Instances page is displayed .
In the list of storage volumes, click the menu in the row for your temporary storage
volume and choose Detach from Instance and then confirm the action.
Refresh the page occasionally until the row for your temporary storage no longer shows
that it is attached.
From the menu in the row for your temporary storage volume, choose Delete and then
confirm the action.
The Oracle Compute Cloud service sets the status of the storage volume to Deleting and
begins deleting it.