Monday, January 14, 2019

OCI―Knowing Block Volume Service Basics

Video 1.  OCI Level 100 - Block Volume (Demo starts at 27:00)

Oracle Cloud Infrastructure (OCI ) offers two main storage services:
  • Block Volume Service
    • Integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API)
    • Block storage operates at the raw storage device level and manages data as a set of numbered, fixed-size blocks using protocols such as iSCSI
    • Block Volume Service lets you dynamically provision and manage block storage volumes
    • Block Volume uses the Advanced Encryption Standard (AES) algorithm with 256 bit key for encryption
      • Data is encrypted at rest in both volumes and backups
    • You can create, attach, connect, and move volumes, as needed, to meet your storage and application requirements
      • Once attached and connected to an instance, you can use a volume like a regular hard drive
      • Volumes can also be disconnected and attached to another instance without the loss of data
      • Volumes are only accessible to instances in the same Availability Domain (AD
        • You cannot move a volume between availability domains or regions
        • However, block volume backups can be restored as new volumes to any availability domain within the same region they are stored
  • Object Storage Service 
    • See [1] for more details
In this article, we will cover Block Volume Service.  But, before we start, we will begin with a related OCI Storage Option―local NVMe SSD.

Figure 1.  OCI Storage 


Local NVMe SSD Storage


OCI provides a variety of instance configurations in both bare metal (BM) and virtual machine (VM) shapes. Each shape varies on multiple dimensions including memory, CPU cores, network bandwidth, and the option of local NVMe SSD storage found in Dense IO shapes.

NVMe SSD Devices are locally attached to some instance shapes in OCI.  It has the following features:
  • It can be used for workloads (e.g., Big Data, OLTP) requiring high storage performance 
  • Data are persisted during reboot or pause
  • These devices are not protected 
    • Customers are responsible to protect and manage the durability the data on these devices
    • A protected RAID array is the recommended way to protect against an NVMe device failure. There are three RAID levels that can be used for the majority of workloads:
      • RAID 1
        • Blocks mirrored
      • RAID 10
        • Blocks mirrored and striped
      • RAID 6
        • Blocks striped with dual parity across drives
  • OCI provides a service-level agreement (SLA) for NVMe performance

Block Volume Service


A common usage of Block Volume Service is to add storage capacity to an instance.  Block volumes provide you persistent and durable storage.  All volumes are automatically replicated for you, helping to protect against data loss.  Any data will remain intact until you reformat or delete the volume.  There are two types of volumes:
  • Block volume
    • A detachable block storage device for your data storage
  • Boot Volumes
    • Detachable system disks for your Compute instances
    • When you terminate an instance, you can keep the associated boot volume and use it to launch a new instance using a different instance type or shape
To use a block storage volume, you need to follow below four steps:
  1. Create a block storage volume through the console (see Figure 3) or the API 
  2. Attach the volume to an instance using a volume attachment (See Figure 2)
  3. Connect to the volume from your instance's guest OS using iSCSI 
  4. Mount the volume and use within your instance

Figure 2.  Attach Block Volume

Backup Policy (Options in Step 1)


The OCI Block Volume service provides you with the capability to perform volume backups automatically on a schedule and retain them based on the selected backup policy. Each backup policy has a set backup frequency and retention period.  This allows you to adhere to your data compliance and regulatory requirements.  See Overview of Block Volume Backups for more information.

When you create a new volume on OCI, you can select the appropriate backup policy at that time:
  • None
    • If your requirements change
      • You can adjust the schedule and retention period by selecting a different backup policy
      • You can also do manual backups
  • Bronze 
    • Monthly incremental backups
      • Run on the first day of the month. Incremental backups are retained for 12 months
    • Yearly full backup
      • Run yearly on January 1st. Full backups are retained for 5 years
  • Silver 
    • Weakly incremental backups
      • Run on Sunday.  Incremental backups are retained for 4 weeks
    • Monthly full backup
      • Run on the first day of the month and are retained for 12 months 
    • Yearly full backup
      • Run yearly on January 1st. Full backups are retained for 5 years
  • Gold 
    • Daily incremental backups
      • Incremental backups are retained for 7 days
    • Weakly incremental backups
      • Run on Sunday.  Incremental backups are retained for 5 weeks
    • Monthly full backup
      • Run on the first day of the month and are retained for 12 months 
    • Yearly full backup
      • Run yearly on January 1st. Full backups are retained for 5 years

iSCSI vs Paravirtualized (Options in Step 2)


At step 2, you can choose how to attach your block volume in two ways:
  • iSCSI
    • A TCP/IP-based standard used for communication between a volume and attached instance
    • Are the only option when connecting block volumes to 
      • Bare metal instances
      • VM instances based on Windows images published prior to February 2018
      • VM instances based on Linux images published prior to December 2017. 
  • Paravirtualized
    • A virtualized attachment available for VMs
    • Once you attach a volume using the paravirtualized attachment type, it is ready to use, you do not need to run any additional commands. 
    • However, due to the overhead of virtualization, this reduces the maximum IOPS performance for larger block volumes
Note that you should only attach Linux volumes to Linux instances and Windows volumes to Windows instances.

Step 3 and 4


You connect (step 3) or mount (step 4) block volumes differently based on below considerations:
  • Volume Attachment Type
    • Paravirtualized
      • The volumes are connected automatically
      • iSCSI
    • OS Type
      • Linux-Based Instances
        • On Linux operating systems, the order in which volumes are attached is non-deterministic, so it can change with each reboot
          • If you refer to a volume using the device name, such as /dev/sdb, and you have more than one non-root volume, you can't guarantee that the volume you intend to mount for a specific device name will be the volume mounted
        • If you want to mount automatically volumes on instance boot, you need to set some specific options in the /etc/fstab file, or the instance may fail to launch. This applies to both iSCSI and paravirtualized attachment types. 
        • Consistent Device Path
      • Windows-Based Instances

    Figure 3.  Create Block Volume


    References

    1. OCI―Knowing Object Storage Basics
    2. Protecting Data on NVMe Devices
    3. OCI―Knowing Identity and Access Management Basics (XML and More)
    4. Backing up a volume (OCI)
    5. Overview of Block Volume Backups (OCI)
      • Backups are encrypted and stored in the Object Storage Service, and can be restored as new volumes to any Availability Domain within the same region
    6. Connecting to Volumes With Consistent Device Paths (OCI)
    7. Cloning a Volume (OCI)
      • Cloning enables you to make a copy of an existing block volume without needing to go through the backup and restore process
    8. Block Volume Performance (OCI)
    9. Volume Groups (OCI)
    10. What is iSCSI?
    11. Oracle Linux Administrator's Guide for Release 7 - About iSCSI Storage
    12. Oracle Linux Administrator's Guide for Release 6 - About iSCSI Storage
    13. Troubleshooting iSCSI Configuration Problems
    14. iscsiadm Basics

    No comments:

    Post a Comment