Book Image

Mastering Ceph - Second Edition

By : Nick Fisk
Book Image

Mastering Ceph - Second Edition

By: Nick Fisk

Overview of this book

Ceph is an open source distributed storage system that is scalable to Exabyte deployments. This second edition of Mastering Ceph takes you a step closer to becoming an expert on Ceph. You’ll get started by understanding the design goals and planning steps that should be undertaken to ensure successful deployments. In the next sections, you’ll be guided through setting up and deploying the Ceph cluster with the help of orchestration tools. This will allow you to witness Ceph’s scalability, erasure coding (data protective) mechanism, and automated data backup features on multiple servers. You’ll then discover more about the key areas of Ceph including BlueStore, erasure coding and cache tiering with the help of examples. Next, you’ll also learn some of the ways to export Ceph into non-native environments and understand some of the pitfalls that you may encounter. The book features a section on tuning that will take you through the process of optimizing both Ceph and its supporting infrastructure. You’ll also learn to develop applications, which use Librados and distributed computations with shared object classes. Toward the concluding chapters, you’ll learn to troubleshoot issues and handle various scenarios where Ceph is not likely to recover on its own. By the end of this book, you’ll be able to master storage management with Ceph and generate solutions for managing your infrastructure.
Table of Contents (18 chapters)
Free Chapter
1
Section 1: Planning And Deployment
6
Section 2: Operating and Tuning
13
Section 3: Troubleshooting and Recovery

Lost objects and inactive PGs

This section of the chapter will cover the scenario where a number of OSDs have gone offline in a short period of time, leaving some objects with no valid replica copies. It's important to note that there is a difference between an object that has no remaining copies and an object that has a remaining copy, but it is known that another copy has had more recent writes. The latter is normally seen when running the cluster with min_size set to 1.

To demonstrate how to recover an object that has an out-of-date copy of data, let's perform a series of steps to break the cluster:

  1. Set min_size to 1; hopefully by the end of this example, you will see why you don't ever want to do this in real life:
sudo ceph osd pool set rbd min_size 1

The following screenshot is the output for the preceding command:

  1. Create a test object that we will make...