You are previewing Ceph Cookbook.
O'Reilly logo
Ceph Cookbook

Book Description

Over 100 effective recipes to help you design, implement, and manage the software-defined and massively scalable Ceph storage system

About This Book

  • Implement a Ceph cluster successfully and gain deep insights into its best practices

  • Harness the abilities of experienced storage administrators and architects, and run your own software-defined storage system

  • This comprehensive, step-by-step guide will show you how to build and manage Ceph storage in production environment

  • Who This Book Is For

    This book is aimed at storage and cloud system engineers, system administrators, and technical architects who are interested in building software-defined storage solutions to power their cloud and virtual infrastructure. If you have basic knowledge of GNU/Linux and storage systems, with no experience of software defined storage solutions and Ceph, but eager to learn this book is for you.

    What You Will Learn

  • Understand, install, configure, and manage the Ceph storage system

  • Get to grips with performance tuning and benchmarking, and gain practical tips to run Ceph in production

  • Integrate Ceph with OpenStack Cinder, Glance, and nova components

  • Deep dive into Ceph object storage, including s3, swift, and keystone integration

  • Build a Dropbox-like file sync and share service and Ceph federated gateway setup

  • Gain hands-on experience with Calamari and VSM for cluster monitoring

  • Familiarize yourself with Ceph operations such as maintenance, monitoring, and troubleshooting

  • Understand advanced topics including erasure coding, CRUSH map, cache pool, and system maintenance

  • In Detail

    Ceph is a unified, distributed storage system designed for excellent performance, reliability, and scalability. This cutting-edge technology has been transforming the storage industry, and is evolving rapidly as a leader in software-defined storage space, extending full support to cloud platforms such as Openstack and Cloudstack, including virtualization platforms. It is the most popular storage backend for Openstack, public, and private clouds, so is the first choice for a storage solution. Ceph is backed by RedHat and is developed by a thriving open source community of individual developers as well as several companies across the globe.

    This book takes you from a basic knowledge of Ceph to an expert understanding of the most advanced features, walking you through building up a production-grade Ceph storage cluster and helping you develop all the skills you need to plan, deploy, and effectively manage your Ceph cluster. Beginning with the basics, you’ll create a Ceph cluster, followed by block, object, and file storage provisioning. Next, you’ll get a step-by-step tutorial on integrating it with OpenStack and building a Dropbox-like object storage solution. We’ll also take a look at federated architecture and CephFS, and you’ll dive into Calamari and VSM for monitoring the Ceph environment. You’ll develop expert knowledge on troubleshooting and benchmarking your Ceph storage cluster. Finally, you’ll get to grips with the best practices to operate Ceph in a production environment.

    Style and approach

    This step-by-step guide is filled with practical tutorials, making complex scenarios easy to understand.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. Ceph Cookbook
      1. Table of Contents
      2. Ceph Cookbook
      3. Credits
      4. Foreword
      5. About the Author
      6. About the Reviewers
      7. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why Subscribe?
      8. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      9. 1. Ceph – Introduction and Beyond
        1. Introduction
          1. Ceph Releases
        2. Ceph – the beginning of a new era
          1. Software Defined Storage (SDS)
          2. Cloud storage
          3. Unified next generation storage architecture
        3. RAID – the end of an era
          1. RAID rebuilds are painful
          2. RAID spare disks increases TCO
          3. RAID can be expensive and hardware dependent
          4. The growing RAID group is a challenge
          5. The RAID reliability model is no longer promising
        4. Ceph – the architectural overview
        5. Planning the Ceph deployment
        6. Setting up a virtual infrastructure
          1. Getting ready
          2. How to do it…
        7. Installing and configuring Ceph
          1. Creating Ceph cluster on ceph-node1
          2. How to do it…
        8. Scaling up your Ceph cluster
          1. How to do it…
        9. Using Ceph cluster with a hands-on approach
          1. How to do it…
      10. 2. Working with Ceph Block Device
        1. Introduction
        2. Working with Ceph Block Device
        3. Configuring Ceph client
          1. How to do it…
        4. Creating Ceph Block Device
          1. How to do it…
        5. Mapping Ceph Block Device
          1. How to do it…
        6. Ceph RBD resizing
          1. How to do it…
        7. Working with RBD snapshots
          1. How to do it…
        8. Working with RBD Clones
          1. How to do it…
        9. A quick look at OpenStack
        10. Ceph – the best match for OpenStack
        11. Setting up OpenStack
          1. How to do it…
        12. Configuring OpenStack as Ceph clients
          1. How to do it…
        13. Configuring Glance for Ceph backend
          1. How to do it…
        14. Configuring Cinder for Ceph backend
          1. How to do it…
        15. Configuring Nova to attach Ceph RBD
          1. How to do it…
        16. Configuring Nova to boot instances from Ceph RBD
          1. How to do it…
      11. 3. Working with Ceph Object Storage
        1. Introduction
        2. Understanding Ceph object storage
        3. RADOS Gateway standard setup, installation, and configuration
          1. Setting up the RADOS Gateway node
          2. How to do it…
          3. Installing the RADOS Gateway
          4. How to do it…
          5. Configuring RADOS Gateway
          6. How to do it…
        4. Creating the radosgw user
          1. How to do it…
          2. See also…
        5. Accessing Ceph object storage using S3 API
          1. How to do it…
          2. Configuring DNS
          3. Configuring the s3cmd client
        6. Accessing Ceph object storage using the Swift API
          1. How to do it
          2. See also…
        7. Integrating RADOS Gateway with OpenStack Keystone
          1. How to do it…
        8. Configuring Ceph federated gateways
          1. How to do it…
        9. Testing the radosgw federated configuration
          1. How to do it…
        10. Building file sync and share service using RGW
          1. Getting ready…
          2. How to do it…
          3. See also…
      12. 4. Working with the Ceph Filesystem
        1. Introduction
        2. Understanding Ceph Filesystem and MDS
        3. Deploying Ceph MDS
          1. How to do it…
        4. Accessing CephFS via kernel driver
          1. How to do it…
        5. Accessing CephFS via FUSE client
          1. How to do it…
        6. Exporting Ceph Filesystem as NFS
          1. How to do it…
        7. ceph-dokan – CephFS for Windows clients
          1. How to do it…
        8. CephFS a drop-in replacement for HDFS
      13. 5. Monitoring Ceph Clusters using Calamari
        1. Introduction
        2. Ceph cluster monitoring – the classic way
        3. Monitoring Ceph clusters
          1. How to do it…
            1. Checking the cluster's health
            2. Monitoring cluster events
            3. The cluster utilization statistics
            4. Checking the cluster's status
            5. The cluster authentication entries
          2. Monitoring Ceph MON
          3. How to do it…
            1. Checking the MON status
            2. Checking the MON quorum status
          4. Monitoring Ceph OSDs
          5. How to do it…
            1. OSD tree view
            2. OSD statistics
            3. Checking the crush map
            4. Monitoring PGs
          6. Monitoring Ceph MDS
          7. How to do it…
        4. Introducing Ceph Calamari
        5. Building Calamari server packages
          1. How to do it…
        6. Building Calamari client packages
          1. How to do it…
        7. Setting up Calamari master server
          1. How to do it…
        8. Adding Ceph nodes to Calamari
          1. How to do it…
        9. Monitoring Ceph clusters from the Calamari dashboard
        10. Troubleshooting Calamari
          1. How to do it…
      14. 6. Operating and Managing a Ceph Cluster
        1. Introduction
        2. Understanding Ceph service management
        3. Managing the cluster configuration file
          1. How to do it…
            1. Adding monitor nodes to the Ceph configuration file
            2. Adding an MDS node to the Ceph configuration file
            3. Adding OSD nodes to the Ceph configuration file
        4. Running Ceph with SYSVINIT
          1. Starting and stopping all daemons
          2. How to do it…
          3. Starting and stopping all daemons by type
          4. How to do it…
            1. Starting daemons by type
            2. Stopping daemons by type
          5. Starting and stopping a specific daemon
          6. How to do it…
            1. Starting a specific daemon
            2. Stopping a specific daemon
        5. Running Ceph as a service
          1. Starting and stopping all daemons
          2. How to do it…
          3. Starting and stopping all daemons by type
          4. How to do it…
            1. Starting daemons by type
            2. Stopping daemons by type
          5. Starting and stopping a specific daemon
          6. How to do it…
            1. Starting a specific daemon
            2. Stopping a specific daemon
        6. Scale-up versus scale-out
        7. Scaling out your Ceph cluster
          1. Adding the Ceph OSD
          2. How to do it…
          3. Adding the Ceph MON
          4. How to do it...
          5. Adding the Ceph RGW
        8. Scaling down your Ceph cluster
          1. Removing the Ceph OSD
          2. How to do it…
          3. Removing Ceph MON
          4. How to do it…
        9. Replacing a failed disk in the Ceph cluster
          1. How to do it…
        10. Upgrading your Ceph cluster
          1. How to do it…
        11. Maintaining a Ceph cluster
          1. How to do it…
          2. How it works…
      15. 7. Ceph under the Hood
        1. Introduction
        2. Ceph scalability and high availability
        3. Understanding the CRUSH mechanism
        4. CRUSH map internals
          1. How to do it…
          2. How it works…
        5. Ceph cluster map
        6. High availability monitors
        7. Ceph authentication and authorization
          1. Ceph authentication
          2. Ceph authorization
          3. How to do it…
        8. Ceph dynamic cluster management
        9. Ceph placement group
          1. How to do it…
        10. Placement group states
        11. Creating Ceph pools on specific OSDs
          1. How to do it…
      16. 8. Production Planning and Performance Tuning for Ceph
        1. Introduction
        2. The dynamics of capacity, performance, and cost
        3. Choosing the hardware and software components for Ceph
          1. Processor
          2. Memory
          3. Network
          4. Disk
          5. Ceph OSD Journal partition
          6. Ceph OSD Data partition
          7. Operating System
          8. OSD Filesystem
        4. Ceph recommendation and performance tuning
          1. Global cluster tuning
          2. Monitor tuning
          3. OSD tuning
            1. OSD General Settings
            2. OSD Journal settings
            3. OSD Filestore settings
            4. OSD Recovery settings
            5. OSD Backfilling settings
            6. OSD scrubbing settings
          4. Client tuning
          5. Operating System tuning
        5. Ceph erasure coding
          1. Erasure code plugin
        6. Creating an erasure coded pool
          1. How to do it…
        7. Ceph cache tiering
          1. Writeback mode
          2. Read-only mode
        8. Creating a pool for cache tiering
          1. How to do it…
          2. See also…
        9. Creating a cache tier
          1. How to do it…
        10. Configuring a cache tier
          1. How to do it…
        11. Testing a cache tier
          1. How to do it…
      17. 9. The Virtual Storage Manager for Ceph
        1. Introduction
        2. Understanding the VSM architecture
          1. The VSM Controller
          2. The VSM Agent
        3. Setting up the VSM environment
          1. How to do it…
        4. Getting ready for VSM
          1. How to do it…
        5. Installing VSM
          1. How to do it…
        6. Creating a Ceph cluster using VSM
          1. How to do it…
        7. Exploring the VSM dashboard
        8. Upgrading the Ceph cluster using VSM
          1. How to do it…
        9. VSM roadmap
        10. VSM resources
      18. 10. More on Ceph
        1. Introduction
        2. Benchmarking the Ceph cluster
        3. Disk performance baseline
          1. Single disk write performance
          2. How to do it…
          3. Multiple disk write performance
          4. How to do it…
          5. Single disk read performance
          6. How to do it…
          7. Multiple disk read performance
          8. How to do it…
          9. Results
        4. Baseline network performance
          1. How to do it…
          2. See also…
        5. Ceph RADOS bench
          1. How to do it…
          2. How it works…
        6. RADOS load-gen
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Benchmarking the Ceph block device
          1. Ceph rbd bench-write
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also…
        8. Benchmarking Ceph RBD using FIO
          1. How to do it…
          2. See also…
        9. Ceph admin socket
          1. How to do it…
        10. Using the ceph tell command
          1. How to do it…
          2. How it works…
        11. Ceph REST API
          1. How to do it…
        12. Profiling Ceph memory
          1. How to do it…
        13. Deploying Ceph using Ansible
          1. Getting ready
          2. How to do it…
          3. There's more…
        14. The ceph-objectstore tool
          1. How to do it…
          2. How it works…
      19. Index