Ceph¶
"Ceph is a unified, distributed storage system designed for excellent performance, reliability and scalability." - https://ceph.com
Glossary¶
http://docs.ceph.com/docs/master/glossary/
- Ceph OSD: The Ceph OSD software, which interacts with a logical disk (OSD).
- CephFS: The POSIX filesystem components of Ceph.
- MDS: (Ceph Metadata Server) The Ceph metadata software.
- MGR: (Ceph Manager) The Ceph manager software, which collects all the state from the whole cluster in one place.
- MON: (Ceph Monitor) The Ceph monitor software.
- OSD: (Object Storage Device) A physical or logical storage unit.
- RADOS: Reliable Autonomic Distributed Object Store.
- RBD: The block storage component of Ceph.
- RGW: The S3/Swift gateway component of Ceph.
- PG: Placement Group. http://docs.ceph.com/docs/master/rados/operations/placement-groups/
Examples¶
Activate all OSDs¶
Starting with ceph 13, use:
Start all ceph services¶
Stop all ceph services¶
Unfortunately there's not a single service or target to stop, so you have to use globs
Show the status of all osds in the cluster¶
Or alternatively
Show metadata about all osds in the cluster¶
This produces a json list with a dict for each osd.
Show all pools¶
List all RBD images in a pool¶
Show rbd usage stats¶
This will show name, provisioned, used, and will have a sum at the bottom, with sizes defaulting to human readable units. You can use --format json to get raw byte usage.
Map an RBD image to a system device¶
Then you can mount whatever the resulting device is. -o X-mount.mkdir automatically creates the destination mount point, but may not be available on some systems.
List snapshots for an RBD image¶
Copy a snapshot to an image so it can be mounted¶
pool_name="kube"
rbd_image_name="testimage"
snap_name="snap-072519-213210"
rbd clone "$pool_name/$rbd_image_name@$snap_name" "$pool_name/image-$snap_name"
After this you can map the new image and mount it as described above.
Monitor existing operations¶
Links¶
- Ceph Intro & Architectural Overview - https://youtu.be/7I9uxoEhUdY
- http://docs.ceph.com/ceph-ansible/master/
- http://docs.ceph.com/docs/master/rados/configuration/network-config-ref/
- http://docs.ceph.com/docs/master/rados/operations/operating/
- http://docs.ceph.com/docs/master/start/quick-ceph-deploy/