Accessing the Red Hat Ceph Storage CLI in OpenShift Data Foundation 4.x

Updated

  • The preferred method to accomplish this task is detailed in KCS article #4628891
  • If one doesn't want the Rook-Ceph Toolbox Pod running, use the rook-ceph-operator method detailed below.

Important: As per our Troubleshooting guide Red Hat does not support running Ceph commands in OpenShift Data Foundation clusters (unless indicated by Red Hat support or Red Hat documentation) as it can cause data loss if you run the wrong commands. In that case, the Red Hat support team is only able to provide commercially reasonable effort and may not be able to restore all the data in case of any data loss.

  • Locate your rook-ceph-operator pod and connect into it
oc rsh -n openshift-storage $(oc get pods -n openshift-storage -o name -l app=rook-ceph-operator)
  • Set your CEPH_ARGS environment variable
export CEPH_ARGS='-c /var/lib/rook/openshift-storage/openshift-storage.config'
  • One can now run Ceph commands
sh-4.4$ ceph -s
  cluster:
    id:     e4f12xxx-Redacted-Cluster-ID-yyy8fdcdfe6f
    health: HEALTH_OK

  services:
    mon: 3 daemons, quorum a,b,d (age 4d)
    mgr: a(active, since 4d)
    mds: ocs-storagecluster-cephfilesystem:1 {0=ocs-storagecluster-cephfilesystem-a=up:active} 1 up:standby-replay
    osd: 3 osds: 3 up (since 4d), 3 in (since 12d)
    rgw: 1 daemon active (ocs.storagecluster.cephobjectstore.a)

  task status:

  data:
    pools:   10 pools, 80 pgs
    objects: 19.95k objects, 76 GiB
    usage:   229 GiB used, 2.8 TiB / 3.0 TiB avail
    pgs:     80 active+clean

  io:
    client:   853 B/s rd, 15 KiB/s wr, 1 op/s rd, 1 op/s wr
SBR
Category
Components
Article Type