Learning Ceph Sample Chapter
Learning Ceph Sample Chapter
ee
Sa
pl
Learning Ceph
Datait's a simple word that stores the past, present, and future of the entire universe,
and it's the most critical element of any system that exists today. We live in an era
of technology that is generating enormous amount of data each second, and with time,
this data growth will be unimaginable. However, how do we store this ever-growing
data such that it remains secure, reliable, and future ready? This book is about one
of the storage technology game-changers that will redefine the future of storage.
Ceph is an open source technology that is leading the way in providing software-defined
storage. Ceph is an excellent package of reliability, unified nature, and robustness. It is
more complete and economic than any other storage solution present today. Ceph has
developed its own entire new way of storing data; it's distributed, massively scalable,
with no single point of failure, and the best part is that it runs on commodity hardware,
which makes it amazingly economic. It will give you power to break the knots of
expensive vendor lock-in solutions and switch to enterprise-grade open source
technology for all your storage needs.
Ceph has been enriched with enterprise-class features such as high degree of reliability,
robustness, scalability, erasure coding, cache tiering, and many more. The maturity that
Ceph has gained over the period of a decade makes it stand out in a crowd and lead the
way to storage. It is the technology of today and the future; unified Ceph storage system
is the solution for whatever requirements you have for data storage. Ceph is truly unified,
that is, it has files, blocks, and objects in a single storage system; this makes Ceph
extremely flexible and adaptable to all your data needs. It is the answer to all the data
storage problems you have.
Cloud computing is the next paradigm shift, and a storage system such as Ceph is the
most essential component of the cloud infrastructure. Ceph has its big footprint in the
cloud storage area. It has been a leading open source software-defined storage choice
for cloud platforms such as OpenStack and CloudStack. These cloud platforms leverage
the features of Ceph and deliver robust, scalable, and exabyte-level public or private
cloud infrastructures. In addition to this, virtualization platforms such as KVM and
libvirt support Ceph big time, and support from proprietary virtualization solutions
such as VMware and HyperV is on the way.
Ceph is surely the next big thing in the storage industry, which is backed by Inktank,
now a part of Red Hat. Ceph has an amazing community presence and quick
development cycles, making it more reliable a couple of times a year. Though
Ceph is purely open source, one can enjoy enterprise-support subscriptions from
Red Hat and their partner ecosystem, which is an advantage.
An overview of Ceph
An overview of Ceph
Ceph is an open source project, which provides software-defined, unified storage
solutions. Ceph is a distributed storage system which is massively scalable and
high-performing without any single point of failure. From the roots, it has been
designed to be highly scalable, up to exabyte level and beyond while running on
general-purpose commodity hardware.
Ceph is getting most of the buzz in the storage industry due to its open, scalable,
and distributed nature. Today, public, private, and hybrid cloud models are the
dominant strategies for the purpose of providing massive infrastructure, and Ceph is
getting popular in becoming a cloud storage solution. Commodity hardware is what
the cloud is dependent on, and Ceph makes the best use of this commodity hardware
to provide you with an enterprise-grade, robust, and highly reliable storage system.
Ceph has been raised and nourished with an architectural philosophy which
includes the following features:
[8]
Chapter 1
In late 2007, Ceph was getting mature and was waiting to get incubated. At this point,
DreamHost, a Los-Angeles-based web hosting and domain registrar company entered
the picture. DreamHost incubated Ceph from 2007 to 2011. During this period, Ceph
was gaining its shape; the existing components were made more stable and reliable,
various new features were implemented, and future roadmaps were designed. Here,
the Ceph project became bona fide with enterprise options and roadmaps. During
this time, several developers started contributing to the Ceph project; some of them
were Yehuda Sadeh, Weinraub, Gregory Farnum, Josh Durgin, Samuel Just, Wido den
Hollander, and Loc Dachary, who joined the Ceph bandwagon.
In April 2012, Sage Weil founded a new company, Inktank, which was funded by
DreamHost. Inktank was formed to enable the widespread adoption of Ceph's
professional services and support. Inktank is the company behind Ceph whose main
objective is to provide expertise, processes, tools, and support to their enterprisesubscription customers, enabling them to effectively adopt and manage Ceph storage
systems. Sage was the CTO and Founder of Inktank. In 2013, Inktank raised $13.5
million in funding. On April 30, 2014, Red Hat, Inc.the world's leading provider of
open source solutionsagreed to acquire Inktank for approximately $175 million in
cash. Some of the customers of Inktank include Cisco, CERN, and Deutsche Telekom,
and its partners include Dell and Alcatel-Lucent, all of which will now become the
customers and partners of Red Hat for Ceph's software-defined storage solution.
For more information, please visit www.inktank.com.
The term Ceph is a common nickname given to pet octopuses; Ceph can be
considered as a short form for Cephalopod, which belongs to the mollusk family
of marine animals. Ceph has octopuses as its mascot, which represents Ceph's
parallel behavior to octopuses.
The word Inktank is somewhat related to cephalopods. Fishermen sometimes
refer to cephalopods as inkfish due to their ability to squirt ink. This explains how
cephalopods (Ceph) have some relation with inkfish (Inktank). Likewise, Ceph and
Inktank have a lot of things in common. You can consider Inktank to be a thinktank
for Ceph.
Sage Weil is one of the cofounders of DreamHost.
[9]
Ceph releases
During late 2007, when the Ceph project started, it was first incubated at DreamHost.
On May 7, 2008, Sage released Ceph v0.2, and after this, its development stages
evolved quickly. The time between new releases became short and Ceph now has
new version updates every next month. On July 3, 2012, Sage announced a major
release with the code name Argonaut (v0.48). The following are the major releases of
Ceph, including Long Term Support (LTS) releases. For more information, please
visit https://ceph.com/category/releases/.
Ceph release name
Released in
Argonaut
v0.48 (LTS)
July 3, 2012
Bobtail
v0.56 (LTS)
January 1, 2013
Cuttlefish
v0.61
May 7, 2013
Dumpling
v0.67 (LTS)
Emperor
v0.72
November 9, 2013
Firefly
v0.80 (LTS)
May 2014
Giant
v0.87
(Future release)
[ 10 ]
Chapter 1
Ceph fits exactly in this gap; its unified, distributed, cost-effective, and scalable
nature is the potential solution to today's and the future's data storage needs.
The open source Linux community had foreseen Ceph's potential long back in
2008, and they had added support for Ceph in the mainline Linux kernel. This
has been a milestone for Ceph as there is no other competitor to join it there.
Ceph has been rapidly evolving in this space to bridge this gap of a true cloud
storage backend. It is grabbing center stage with every major open source cloud
platform such as OpenStack, CloudStack, and OpenNebula. In addition to this,
Ceph has built partnerships with Canonical, Red Hat, and SUSE, the giants in Linux
space. These companies are favoring big time to Cephthe distributed, reliable, and
scalable storage clusters for their Linux and cloud software distributions. Ceph is
working closely with these Linux giants to provide a reliable multifeatured storage
backend for their cloud platforms.
Public and private clouds are gaining a lot of momentum due to the OpenStack
project. OpenStack has proven itself as an end-to-end cloud solution. It has its internal
core storage components named Swift, which provides object-based storage, and
Nova-Volume, also known as Cinder, which provides block storage volumes to VMs.
Unlike Swift, which is limited only to object storage, Ceph is a unified storage solution
of block, file, and object storage, and thus benefits OpenStack by providing multiple
storage types from a single storage cluster. So, you can easily and efficiently manage
storage for your OpenStack cloud. The OpenStack and Ceph communities have been
working together for many years to develop a fully supported Ceph storage backend
for the OpenStack cloud. Starting with Folsom, which is the sixth major release of
OpenStack, Ceph has been fully integrated with it. The Ceph developers ensured
that Ceph works well with the latest version of OpenStack, and at the same time,
contribute to new features as well as bug fixes. OpenStack utilizes one of the most
demanding feature of Ceph, the RADOS block device (RBD), through its cinder and
glance components. Ceph RBD helps OpenStack in rapid provisioning of hundreds
of virtual machine instances by providing snapshotted-cloned volume, which are
thin-provisioned, and hence less space hungry and ultra quick.
Cloud platforms with Ceph as a storage backend provide the much needed flexibility
to service providers to build Storage-as-a-Service and Infrastructure-as-a-Service
solutions, which they cannot achieve from other traditional enterprise storage
solutions, as they are not designed to fulfill cloud needs. Using Ceph as a backend
for cloud platforms, service providers can offer low-cost cloud services to their
customers. Ceph enables them to offer relatively low storage prices with enterprise
features compared to other storage providers such as Amazon.
Dell, SUSE, and Canonical offer and support deployment and configuration
management tools such as Dell Crowbar and Juju for automated and easy
deployment of Ceph storage for their OpenStack cloud solutions. Other
configuration management tools such as Puppet, Chef, SaltStack, and Ansible are
quite popular for automated Ceph deployment. Each of these tools has its open
source, readymade Ceph modules that can be easily used for Ceph deployment.
In a distributed environment such as Cloud, every component must scale. These
configuration management tools are essential to quickly scale up your infrastructure.
[ 12 ]
Chapter 1
Ceph is now fully compatible with these tools, allowing customers to deploy and
extend a Ceph cluster instantly.
Starting with the OpenStack Folsom release, the nova-volume
component has become cinder; however, nova-volume commands
still work with OpenStack.
[ 13 ]
Rather than managing blocks and files underneath, Ceph manages objects and
supports block- and file-based storage on top of it. If you think of a traditional
file-based storage system, files are addressed via the file path, and in a similar
way, objects in Ceph are addressed by a unique identifier, and are stored in a flat
addressed space. Objects provide limitless scaling with increased performance by
eliminating metadata operations. Ceph uses an algorithm to dynamically compute
where the object should be stored and retrieved from.
[ 14 ]
Chapter 1
CRUSH makes Ceph self managing and self healing. In the event of component
failure in a failure zone, CRUSH senses which component has failed and determines
the effect of this failure on the cluster. Without any administrative intervention,
CRUSH does self managing and self healing by performing a recovery operation for
the data lost due to failure. CRUSH regenerates the data from the replica copies that
the cluster maintains. At every point in time, the cluster will have more than one
copy of data that will be distributed across the cluster.
Using CRUSH, we can design a highly reliable storage infrastructure with no single
point of failure. It makes Ceph a highly scalable and reliable storage system, which is
future ready.
[ 15 ]
[ 16 ]
Chapter 1
[ 17 ]
The Ceph block device provides full support to cloud platforms such as
OpenStack, CloudStack, as well as others. It has been proven successful and
feature-rich for these cloud platforms. In OpenStack, you can use the Ceph block
device with the cinder (block) and glance (imaging) components; by doing this, you
can spin 1,000s of VMs in very little time, taking advantage of the copy-on-write
feature of the Ceph block storage.
[ 18 ]
Chapter 1
In addition to this, clients can make use of third-party open source programs such
as Ganesha for NFS and Samba for SMB/CIFS. These programs interact with
libcephfs to store user's data to a reliable and distributed Ceph storage cluster.
CephFS can also be used as a replacement for Apache Hadoop File System (HDFS).
It also makes use of the libcephfs component to store data to the Ceph cluster. For
its seamless implementation, the Ceph community provides the required CephFS
Java interface for Hadoop and Hadoop plugins. The libcephfs and librados
components are very flexible and you can even build your custom program that
interacts with it and stores data to the underlying Ceph storage cluster.
CephFS is the only component of the Ceph storage system, which is not
production-ready at the time of writing this book. It has been improving at a very
high pace and is expected to be production-ready very soon. Currently, it's quite
popular in the testing and development environment, and has been evolved with
enterprise-demanding features such as dynamic rebalancing and a subdirectory
snapshot. The following diagram shows various ways in which CephFS can be used:
The RADOS gateway provides a RESTful interface to the user application to store
data on the Ceph storage cluster. The RADOS gateway interfaces are:
Admin API: This is also known as the management API or native API,
which can be used directly in the application to gain access to the storage
system for management purposes
To access Ceph's object storage system, you can also bypass the RADOS gateway
layer, thus making accessibility more flexible and quicker. The librados software
libraries allow user applications to directly access Ceph object storage via C, C++,
Java, Python, and PHP. Ceph object storage has multisite capabilities; that is, it
provides solutions for disaster recovery. Multisite object storage configuration can
be achieved by RADOS or by federated gateways. The following diagram shows
different API systems that can be used with Ceph:
Chapter 1
However, Ceph is getting tremendous feedback and gaining popularity, leaving other
open source as well as proprietary storage solutions behind. The following are some
open source storage solutions in competition with Ceph. We will briefly discuss the
shortcomings of these storage solutions, which have been addressed in Ceph.
GPFS
General Parallel File System (GPFS) is a distributed filesystem, developed and
owned by IBM. This is a proprietary and closed source storage system, which makes
it less attractive and difficult to adapt. The licensing and support cost after storage
hardware makes it very expensive. Moreover, it has a very limited set of storage
interfaces; it provides neither block storage nor RESTful access to the storage system,
so this is very restrictive deal. Even the maximum data replication is limited to
only three copies, which reduces system reliability in the event of more than one
simultaneous failure.
iRODS
iRODS stands for Integrated Rule-Oriented Data System, which is an open source
data-management software released under a 3-clause BSD license. iRods is not a
highly reliable storage system as its iCAT metadata server is SPOF (single point
of failure) and it does not provide true HA. Moreover, it has a very limited set
of storage interfaces; it neither provides block storage nor RESTful access to the
storage system, thus making it very restrictive. It's more suitable to store a small
quantity of big files rather than both small and big files. iRods works in a traditional
way, maintaining an index of the physical location, which is associated with the
filename. The problem arises with multiple clients' request for the file location from
the metadata server, applying more computing pressure on the metadata server,
resulting in dependency on a single machine and performance bottlenecks.
HDFS
HDFS is a distributed scalable filesystem written in Java for the Hadoop framework.
HDFS is not a fully POSIX-compliant filesystem and does not support block storage,
thus making it less usable than Ceph. The reliability of HDFS is a question for
discussion as it's not a highly available filesystem. The single NameNode in HDFS
is the primary reason for its single point of failure and performance bottleneck
problems. It's more suitable to store a small quantity of big files rather than both
small and big files.
[ 21 ]
Lustre
Lustre is a parallel-distributed filesystem driven by the open source community and is
available under GNU General Public License. In Lustre, a single server is responsible
to store and manage metadata. Thus, the I/O request from the client is totally
dependent on single server's computing power, which is quite low for an enterpriselevel consumption. Like iRODS and HDFS, Lustre is suitable to store a small quantity
of big files rather than both small and big files. Similar to iRODS, Lustre manages an
index file that maintains physical addresses mapped with filenames, which makes its
architecture traditional and prone to performance bottlenecks. Lustre does not have
any mechanism for node failure detection and correction. In the event of node failure,
clients have to connect to another node themselves.
Gluster
GlusterFS was originally developed by Gluster, which was then bought by Red
Hat in 2011. GlusterFS is a scale-out network-attached filesystem. In Gluster,
administrators have to determine which placement strategy to use to store data
replica on different geographical racks. Gluster does not provide block access,
filesystem, and remote replication as its intrinsic functions; rather, it provides
these features as add-ons.
Ceph
If we make a comparison between Ceph and other storage solutions available today,
Ceph clearly stands out of the crowd due to its feature set. It has been developed to
overcome the limitations of existing storage systems, and it has proved to be an ideal
replacement for old and expensive proprietary storage systems. It's an open source,
software-defined storage solution on top of any commodity hardware, which makes
it an economic storage solution. Ceph provides a variety of interfaces for the clients
to connect to a Ceph cluster, thus increasing flexibility for clients. For data protection,
Ceph does not rely on RAID technology as it's getting limited due to various reasons
mentioned earlier in this chapter. Rather, it uses replication and erasure coding,
which have been proved to be better solutions than RAID.
Every component of Ceph is reliable and supports high availability. If you configure
Ceph components by keeping redundancy in mind, we can confidently say that Ceph
does not have any single point of failure, which is a major challenge for other storage
solutions available today. One of the biggest advantages of Ceph is its unified nature,
where it provides out-of-the-box block, file, and object storage solutions, while other
storage systems are still incapable of providing such features. Ceph is suitable to store
both small as well as big files without any performance glitch.
[ 22 ]
Chapter 1
Ceph is a distributed storage system; clients can perform quick transactions using
Ceph. It does not follow the traditional method of storing data, that is, maintaining
metadata that is tied to a physical location and filename; rather, it introduces a new
mechanism, which allows clients to dynamically calculate data location required
by them. This gives a boost in performance for the client, as they no longer need to
wait to get data locations and contents from the central metadata server. Moreover,
the data placement inside the Ceph cluster is absolutely transparent and automatic;
neither the client nor the administrators have to bother about data placement on a
different failure zone. Ceph's intelligent system takes care of it.
Ceph is designed to self heal and self manage. In the event of disaster, when other
storage systems cannot provide reliability against multiple failures, Ceph stands rock
solid. Ceph detects and corrects failure at every failure zone such as a disk, node,
network, rack, data center row, data center, and even different geographies. Ceph
tries to manage the situation automatically and heal it wherever possible without
data outage. Other storage solutions can only provide reliability up to disk or at
node failure.
When it comes to a comparison, these are just a few features of Ceph to steal the
show and stand out from the crowd.
Summary
Ceph is an open source software-defined storage solution that runs on commodity
hardware, thus enabling enterprises to get rid of expensive, restrictive, proprietary
storage systems. It provides a unified, distributed, highly scalable, and reliable object
storage solution, which is much needed for today's and the future's unstructured
data needs. The world's storage need is exploding, so we need a storage system
that is scalable to the multiexabyte level without affecting data reliability and
performance. Ceph is future proof, and provides a solution to all these data
problems. Ceph is in demand for being a true cloud storage solution with support
for almost every cloud platform. From every perspective, Ceph is a great storage
solution available today.
[ 23 ]
www.PacktPub.com
Stay Connected: