Cephfs - Red Hat Openstack and Ceph meetup, Pune 28th november 2015
1. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Bipin Kunal
bkunal@redhat.com
Software Maintenance Engineer, Red Hat Inc
Red Hat Openstack and Ceph Meetup, Pune 28th November 2015
RED HAT
CEPH STORAGE - CEPHFS
2. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Challenges of ANY Distributed Filesystem
● Scalability
● Performance
● Stateful clients
3. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
How Ceph addresses these challenges
● POSIX Interface
● Scalable Data
● Scalable Metadata
● Stateful Client
4. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
CEPH Architecture
5. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Components
6. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Storing Data and Metadata in RADOS
● File data are directly written from clients
● File contents are striped across RADOS object, named after <inode>.<offset>
● Default stripe size is 4MB
● Metadata is even stored in RADOS
● It is stored in the form of key-value pair
● Filename are the keys and dentries are the values
7. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
RADOS object : Simple example
# mkdir mydir; dd if=/dev/urandom bs=1M count=12 mydir/myfile
8. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Lookup by path
9. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Lookup by Inode
10. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
MDS
● MDS daemon do nothing(standby) until assigned an identity(rank) by the RADOS monitors(active)
● Each MDS rank acts as the authoritative cache of some subtrees of the metadata on disk
● MDSs track usage statistics and periodically globally renegotiate distribution of subtrees
11. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Standby MDS daemons
Two modes : standby and standby-replay
● Standby : Wait for failure, take over, replay journal, become active
● Standby-replay : Continuously reads active daemons journal. Immediately become active
12. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Client MDS protocol
Two Implementation : ceph-fuse, kclient
● Client learns MDS addresses from mons, opens session with each MDS as necessary
● Client maintains a cache
● Client are fully trusted as of now
13. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
MOUNT CEPH FS WITH THE KERNEL DRIVER
sudo mkdir /mnt/mycephfs
sudo mount -t ceph 192.168.0.1:6789:/ /mnt/mycephfs
● To mount the Ceph file system you may use the mount command if you know the monitor host IP address(es), or use
the mount.ceph utility to resolve the monitor host name(s) into IP address(es) for you.
● You can even use cephx authentication to mount filesystem
14. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
MOUNT CEPH FS AS A FUSE
● Cephx is default authentication
● Copy ceph configuration to the /etc/ceph
● Copy Ceph keyring from the monitor
● Ensure copied file have appropriate permission set
sudo mkdir /home/username/cephfs
sudo ceph-fuse -m 192.168.0.1:6789 /home/username/cephfs
15. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
References
● Ceph: A Scalable, High-Performance Distributed File System
● 2015-JUL-30 -- Ceph Tech Talks: CephFS
● Ceph Filesystem Documentation
16. Red Hat Openstack and Ceph Meetup, Pune | 28th NOV 2015 | bkunal@redhat.com
Queries?