Ceph

From Leo's Notes
Revision as of 18:13, 10 September 2019 by Leo (talk | contribs) (Initial content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 10 September 2019, at 18:13.

Ceph is an open source distributed storage system that provides object and block storage. Its key feature is the ability to replicate data across many different systems, allowing for the use of commodity components while maintaining reliable storage.


Introduction

Ceph has 3 main components:

  1. The Client, exposes a POSIX file system interface to a host or process. Performs file IO by communication to OSDs.
  2. The Cluster of OSDs, collectively stores all data and metadata
  3. The Metadata Server, manages namespace data (filenames, directories), consistency and coherence

Concepts

Some main concepts to keep in mind when dealing with Ceph are:

OSD
Object Storage Device
Ceph OSD
Ceph Object Storage Daemon, or ceph-osd handles object data including replication, recovery, rebalancing.
MDS
Metadata Server used by Ceph Filesystem on Ceph Block Devices.
CRUSH
Controlled Replication Under Scalable Hashing. A pseudo-random data distribution function that efficiently maps each Placement Group (PG) to an ordered list of OSDs upon which to store object replicas.

Client

The Ceph Client codebase runs entirely in userspace. Applications can make use of Ceph by link to a client library or accessing files through FUSE.

Ceph utilizes a range of striping strategies to map file data into a series of objects. Object names include additional metadata information such as the file inode and stripe number. Object replicas are assigned to OSDs using CRUSH.

When accessing a file, the MDS translates the filename to the file inode and the data's corresponding objects are looked up on the appropriate OSD.

Cluster of OSDs

At a high level, a cluster of OSDs provide a single logical object store for clients and metadata servers. This cluster transparently handles the responsibility of data migration, replication, failure detection, and failure recovery.


Notes

Linux 2.6.34 supports RBD (Rados Block Device), a client/driver that supports block device mounts to cephfs