<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Storage Cluster on Digi Hunch</title><link>https://www.digihunch.com/tag/storage-cluster/</link><description>Recent content in Storage Cluster on Digi Hunch</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Tue, 08 Apr 2025 14:28:12 -0400</lastBuildDate><atom:link href="https://www.digihunch.com/tag/storage-cluster/index.xml" rel="self" type="application/rss+xml"/><item><title>Intro to Ceph storage</title><link>https://www.digihunch.com/2022/07/intro-to-ceph-storage/</link><pubDate>Thu, 21 Jul 2022 18:55:00 -0400</pubDate><guid>https://www.digihunch.com/2022/07/intro-to-ceph-storage/</guid><description>&lt;img src="https://www.digihunch.com/wp-content/uploads/2025/04/feature-ceph.webp" alt="Featured image of post Intro to Ceph storage" /&gt;&lt;p class="wp-block-paragraph"&gt;Ceph is a unified, distributed storage system designed for excellent performance, reliability and scalability. In this post, I will introduce Ceph and explain how it stands out from traditional enterprise storage technology. &lt;/p&gt;&#10;&lt;h2 class="wp-block-heading" id="h-software-defined-storage"&gt;Software defined storage&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;In the realm of enterprise storage, I discussed &lt;a href="https://www.digihunch.com/2020/07/emc-productlines/"&gt;PowerScale (Isilon)&lt;/a&gt; from Dell EMC, and touched on &lt;a href="https://www.digihunch.com/2021/09/file-storage-vs-object-storage/"&gt;ONTAP&lt;/a&gt; by NetApp as an alternative. These solutions usually include both enterprise grade hardware, and the software layer that manages those expensive hardware. As the competition with cloud storage arises, those vendors start to decouple the software layer from the hardware to sell them separately. As a result, clients have the options to use commodity hardware. On the other hand, the software layer is built to be more accommodative to different hardware options. Eventually, the software layer evolves into Software Defined Storage (SDS) with the purpose of supporting cheaper storage hardware.&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;This table shows the full solution offering and SDS offering from NetApp and Dell EMC:&lt;/p&gt;&#10;&lt;figure class="wp-block-table is-style-regular"&gt;&lt;table class="has-black-color has-cyan-bluish-gray-background-color has-text-color has-background has-fixed-layout"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Full solution offering&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;SDS offering&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;NetApp&lt;/td&gt;&lt;td&gt;&lt;a href="https://docs.netapp.com/ontap-9/index.jsp"&gt;ONTAP&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="https://docs.netapp.com/us-en/ontap-select/index.html"&gt;ONTAP Select&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;EMC&lt;/td&gt;&lt;td&gt;PowerScale&lt;/td&gt;&lt;td&gt;PowerFlex&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;It is not easy to make a proprietary SDS appliance support commodity hardware. For example, PowerFlex currently supports (and bundles with) DELL&amp;#8217;s commodity hardware only. It is most likely an involuntary move. Then, why would these commercial providers even be motivated to support a broader range of hardware by moving to SDS? It is because they face fierce competition from open-source SDS technologies, which were born to support commodity hardware. In this family of technologies, Ceph is a rising star. This family also includes other technologies such as Gluster and HDFS.&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Note that the performance of a storage based on SDS still has to do with the underlying hardware. Therefore, comparing Ceph storage with PowerScale is apple to orange, without identical storage hardware. Now that we decoupled SDS and hardware, let&amp;#8217;s take a look at two important aspects of SDS: the distributed technology to manage hardware, and the interface it provides to storage clients.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Distributed storage&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The reason to use an SDS layer to manage hardware in a distributed architecture is for better scalability and high availability. The soul of this SDS layer is the ability to manage distributed system. However, a distributed storage introduces problems of its own, such as coordinating consistency. Different storage technologies have their own way to tackle these problems. For example, with PowerScale, OneFS has its own Group Management Protocol. Ceph uses CRUSH for data distribution. GlusterFS uses DHT(Distributed Hash Table) Translator. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Storage architects usually do not need to know these technologies in detail. It is not the intention of this post to cover the details of any distributed technology in any of the storage options above. However, storage architects needs to know supported API very well.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Access API&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The supported access API of a storage system determines its compatibility with client systems. One good example is NFS for file storage, which defines the protocol for file share without defining the underlying implementation. Most GNU/Linux distributions come with nfsd (NFS server) which exports directories on XFS or ext4 FS as a file share with NFS protocol. In order to transfer data over network, NFS uses RPC, a request-response protocol. With object storage, S3 is a widespread protocol. Below is a list of storage implementations and their supported access API:&lt;/p&gt;&#10;&lt;ul class="wp-block-list"&gt;&#10;&lt;li&gt;Ceph supports librados, S3, Swift and FUSE&lt;/li&gt;&#10;&lt;li&gt;GlusterFS supports SMB, NFS, FUSE,&lt;/li&gt;&#10;&lt;li&gt;PowerScale supports NFS, SMB/CIFS, HDFS, Object, POSIX&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p class="wp-block-paragraph"&gt;CephFS is distributed file system built on top of Ceph RADOS. It is also a client-server architecture. A Ceph Client, via &lt;a href="https://docs.ceph.com/en/latest/rados/api/librados/"&gt;librados&lt;/a&gt;, interacts directly with OSDs to store and retrieve data. In order to interact with OSDs, the client app must invoke librados and connect to a Ceph Monitor. For compatibility, CephFS namespaces can be export over NFS protocol using &lt;a href="https://docs.ceph.com/en/latest/rados/api/librados-intro/"&gt;NFS-Ganesha&lt;/a&gt; NFS server.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Ceph Architecture&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Ceph is a high-performance, distributed storage platform. It provides object storage, block storage and distributed file system, all backed by a single, reliable storage cluster running on commodity server hardware. A Ceph Storage Cluster consists of Ceph Nodes on a network. A Ceph Storage cluster requires at least one Ceph monitor (ceph-mon), Ceph Manager (ceph-mgr) and Ceph OSDs (ceph-osd). For file system clients, it also requires Ceph Metadata Server (MDS, ceph-mds) to allow user to execute basic commands on POSIX file system (e.g. ls, find)&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Under the hood, Ceph stores data as objects within logical storage pools. Using the&amp;nbsp;&lt;a href="https://docs.ceph.com/en/latest/glossary/#term-CRUSH"&gt;CRUSH&lt;/a&gt;&amp;nbsp;algorithm, Ceph calculates which placement group (PG) should contain the object, and which OSD should store the placement group. The CRUSH algorithm enables the Ceph Storage Cluster to scale, rebalance, and recover dynamically.&lt;/p&gt;&#10;&lt;figure class="wp-block-image size-full"&gt;&lt;img loading="lazy" decoding="async" width="689" height="483" src="https://www.digihunch.com/wp-content/uploads/2022/06/image-11.png" alt="" class="wp-image-5585"/&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Ceph is based on RADOS (reliable autonomic distributed object store), a self-healing system that distributes and replicates data across nodes. It then layers CephFS (a distributed file system), block storage service (RADOS Block Device or RBD), and s3-compatible object storage (RADOS Gateway or RGW) on top of RADOS. For a better description, refer to &lt;a href="https://ubuntu.com/ceph/what-is-ceph"&gt;this&lt;/a&gt; page. The chart above shows how Ceph interacts with different kinds of client. For CephFS, the client can interact with the file system via metadata daemon, as illustrated below. This diagram looks similar to the diagram for &lt;a href="https://www.digihunch.com/2020/07/nfs-network-file-system-and-rpc-remote-procedure-call/"&gt;NFS&lt;/a&gt;.&lt;/p&gt;&#10;&lt;figure class="wp-block-image size-full"&gt;&lt;img loading="lazy" decoding="async" width="883" height="706" src="https://www.digihunch.com/wp-content/uploads/2022/06/image-12.png" alt="" class="wp-image-5586"/&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;In a RADOS cluster, each server runs some daemons (i.e. OSD, MON or MDS). &lt;/p&gt;&#10;&lt;div class="wp-block-image"&gt;&#10;&lt;figure class="aligncenter size-full"&gt;&lt;img loading="lazy" decoding="async" width="736" height="317" src="https://www.digihunch.com/wp-content/uploads/2022/09/ceph.png" alt="" class="wp-image-7275"/&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;p class="wp-block-paragraph"&gt;When an I/O request occurs, it needs to be mapped to the specific OSD that keeps the storage units. Here is an illustration of the mapping:&lt;/p&gt;&#10;&lt;div class="wp-block-image"&gt;&#10;&lt;figure class="aligncenter size-full"&gt;&lt;img loading="lazy" decoding="async" width="603" height="338" src="https://www.digihunch.com/wp-content/uploads/2022/09/io-path.png" alt="" class="wp-image-7277"/&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;p class="wp-block-paragraph"&gt;As typically observed in distributed system, there is quite some communication overhead to serve a file.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Ceph Cluster Installation&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Installing a VM-based Ceph cluster is no trivial effort and there are several methods. The recommended method is &lt;a href="https://docs.ceph.com/en/latest/cephadm/#cephadm"&gt;Cephadm&lt;/a&gt;. &lt;a href="https://kifarunix.com/install-and-setup-ceph-storage-cluster-on-ubuntu/"&gt;Here&lt;/a&gt; is a good instruction, where you will notice a lot of steps on each nodes, such as configuring NTP, installing docker, configuring hostname, Linux user and SSH, etc. You may also check &lt;a href="https://www.youtube.com/watch?v=LxDQyFWDNHI"&gt;this&lt;/a&gt; video for how involving it is. Red Hat adopts &lt;a href="https://www.redhat.com/en/technologies/storage/ceph"&gt;Ceph&lt;/a&gt; project as a product and has an &lt;a href="https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5/html/installation_guide/red-hat-ceph-storage_install"&gt;installation guide&lt;/a&gt; on its documentation.&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Previously, there was a legacy tool &lt;a href="https://docs.ceph.com/projects/ceph-ansible/en/latest/"&gt;ceph-ansible&lt;/a&gt; to help administrators with server configuration. It is similar to the way kubespray helps administrators configure Kubernetes cluster. However, the &lt;a href="https://docs.ceph.com/en/quincy/install/#other-methods"&gt;document&lt;/a&gt; suggests that ceph-ansible is not integrated with new orchestrator APIs and therefore is not a viable option anymore. Also I did not find a way to install a single-node ceph cluster just for a quick demo. It involves tweaking the &lt;a href="https://docs.ceph.com/en/quincy/rados/operations/crush-map/"&gt;CRUSH&lt;/a&gt; map configuration. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;If we deploy Ceph on Kubernetes for Kubernetes workload, we use &lt;a href="https://rook.io/docs/rook/v1.9/Getting-Started/intro/"&gt;Rook&lt;/a&gt;, an orchestrator running on Kubernetes, to integrate storage to a cluster.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Cloud Native Storage&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Moving to cloud native storage, instead of presenting storage to operating system, we need to configure storage classes for Pods to use persistent volumes dynamically, using storage provisioners. Ceph also shows good presence in cloud native storage ecosystem. In a self-managed Kubernetes cluster, Ceph gives us the capability to configure storage classes to access connected storage. In public cloud, Ceph allows us to configure storage classes connecting to disks attached to the Nodes, an alternative to the cloud vendor provided native storage classes with high availability across availability zones. This layer enables the organization to normalize how their application connects to persistent volumes, a capability particularly helpful in the multi-cloud strategy of the cluster.&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;Rook is a CNCF project to orchestrate storage system on Kubernetes. It automates storage administrative tasks such as deployment, bootstrapping, configuring, provisioning and monitoring, using declarative templates. It supports Ceph and a number of other storage backends such as Cassandra, NFS, MinIO. &lt;/p&gt;&#10;&lt;nav class="wp-post-navigation" aria-label="Post navigation"&gt;&#10;&lt;a rel="prev" href="https://www.digihunch.com/2022/07/kick-the-tires-on-argocd/"&gt;&lt;span class="wp-post-navigation-label"&gt;Previous Post&lt;/span&gt;&lt;strong class="wp-post-navigation-title"&gt;Kick the tires on ArgoCD&lt;/strong&gt;&lt;/a&gt;&#10;&lt;a rel="next" href="https://www.digihunch.com/2022/07/kubernetes-storage-on-azure-1-of-3-built-in-storage-and-nfs/"&gt;&lt;span class="wp-post-navigation-label"&gt;Next Post&lt;/span&gt;&lt;strong class="wp-post-navigation-title"&gt;Kubernetes Storage on Azure 1 of 3 – built-in storage and NFS&lt;/strong&gt;&lt;/a&gt;&#10;&lt;/nav&gt;&#10;</description></item></channel></rss>