Week 10

Storage and Persistence (Cinder)

OPS3 - Virtualization and Cloud Infrastructure

1. The Hierarchy of Cloud Storage

1.1 Ephemeral vs. Persistent Storage

Section 1 Checkpoint

Summary:

Reflection:

2. Block Storage Architecture (Cinder)

2.1 The Driver Model

Just as Nova utilizes virtualization drivers to interact with various CPU architectures, Cinder employs a Volume Driver architecture to communicate with diverse storage backends.

Figure 1: Cinder Architecture - The Cinder Scheduler selects the backend, and the Volume Driver translates API calls into storage commands

2.2 The Attachment Process (iSCSI/RBD)

The mechanism for attaching a volume to an instance involves a coordinated handshake between services.

Figure 2: The Attachment Handshake - How Nova and Cinder coordinate to plug a remote disk into a running VM

2.3 Deep Dive: Storage Backends

Cinder operates as an abstraction layer, capable of interfacing with a diverse array of storage backends. In private cloud environments, the two most prevalent technologies serve as excellent examples of this flexibility: the Network File System (NFS) and the Ceph distributed storage cluster.

2.3.1 NFS (Network File System)

2.3.2 Ceph (The Gold Standard)

Implementation Note: In production, Ceph is the preferred backend because it decouples storage from compute hardware entirely, allowing indefinite scaling.

2.3.3 Configuring Cinder with Ceph

Note: This assumes a Ceph cluster is already running. To learn how to build one from scratch, see the Optional Ceph Setup Guide.

To configure OpenStack Cinder to use a Ceph cluster as its backend, the administrator must edit the cinder.conf file on the Controller node. The process involves three key steps: installing the client libraries, authenticating, and defining the driver.

1. Install Ceph Client: The Cinder service requires the python libraries to communicate with the Ceph public network.

2. Authentication (Keyring): OpenStack acts as a client "user" to the Ceph cluster. You must copy the authentication keyring from the Ceph Monitor node to the Cinder node.

3. Driver Configuration (/etc/cinder/cinder.conf): Define a new backend section (e.g., [ceph]) and reference it in the enabled_backends list.

2.3.4 Configuring Cinder with NFS

For smaller deployments or lab environments, NFS is a common backend. It requires a dedicated text file to list the shares and a specific driver configuration.

1. Create Shares File: Create a text file (e.g., /etc/cinder/nfs_shares) and list your NFS exports, one per line.

2. Set Permissions: Ensure the Cinder user can read this file.

3. Driver Configuration (/etc/cinder/cinder.conf):

Section 2 Checkpoint

Summary:

Reflection:

3. Data Safety Strategies

3.1 Snapshots (The Time Machine)

3.2 Backups (The Disaster Plan)

To mitigate the risk of physical hardware failure, Backups provide a complete disaster recovery solution.

Figure 3: Block vs Object Storage - Cinder Backups move data from expensive, fast Block Storage to cheap, durable Object Storage (Swift/S3)

3.3 Architecting Redundancy: Public vs. Private

Section 3 Checkpoint

Summary:

Reflection:

4. Operations Cookbook (Nebula Inc.)

4.1 Creating a Volume

We begin by provisioning a specific persistent volume for our database. This is analogous to purchasing a physical hard drive; initially, it exists as an unattached operational resource within the storage inventory.

4.2 Attaching the Volume

Once created, the volume must be physically connected to the compute instance. This command mimics the act of plugging a USB drive or SAS cable into a running server.

4.3 Formatting and Mounting (Guest OS)

It is important to remember that Cinder delivers a raw block device (e.g., /dev/vdb) without any file system. The administrator must log into the Guest OS to format the disk and mount it for use effectively transferring responsibility from the "Cloud Provider" to the "OS Administrator".

4.4 Snapshotting

Before executing any destructive changes or updates to the database, standard procedure dictates creating a snapshot to preserve the current state.

Section 4 Checkpoint

Summary:

Reflection:

5. Industry Comparison: Storage

7. Summary and Next Steps

Preparing for Week 11

Next week, we stop clicking buttons manually. We will introduce Automation and APIs. We will learn how to deploy this entire infrastructure using code (Bash/Python) and configuration scripts (Cloud-Init), moving from "Pets" to "Cattle" effectively.

Checklist:

8. Additional Resources

9. Lab Exercises

Summary

Review the key concepts covered in this week's material

Questions?