CephClusterGuide
Isometric blue platform holding pink cube blocks in dashed outlined slots, evoking storage pools in a cluster, set in a dark circle on a pink background
operations

Ceph List Pools: Commands to Show and Inspect Pools

Ceph has no show pools command. List pools with ceph osd pool ls detail, check usage with ceph df, and list the objects in a pool with rados ls.

By CephClusterGuide Editorial · ·Updated · 6 min read

There is no literal ceph show pools command. Run ceph osd pool ls for names only or ceph osd lspools for names and IDs. Use ceph osd pool ls detail to see pool settings and ceph df to check usage.

Which command shows Ceph pools?

ceph osd pool ls detail shows pool settings such as replica size, placement group (PG) count, CRUSH rule and application tag. Use the table to choose a command for the information you need.

CommandWhat it showsUse it when
ceph osd pool lsPool names onlyScripting and loops
ceph osd lspoolsPool ID and nameMatching a PG ID to its pool
rados lspoolsPool names, from the rados toolWorking in the rados client
ceph osd pool ls detailDetailed settings per poolAuditing size, rules, PGs
ceph dfStored, objects, used, %used, max availCapacity questions
ceph df detailAdds quotas, compression, data vs omapFinding where space went
rados dfPer-pool usage and object countsCross-checking ceph df
ceph osd pool statsI/O per poolFinding the busy pool
ceph osd pool autoscale-statusPG autoscaler viewPG count warnings
ceph osd pool get <pool> allParameters that apply to the pool’s typeInspecting one pool

The three ceph osd listing forms are documented in the Ceph Tentacle pools guide. The rados listing and usage commands are documented in the rados man page.

In the pool guide’s example, ceph osd lspools prints each numeric ID followed by the pool’s name.

$ ceph osd lspools
1 .rgw.root
2 default.rgw.log
3 default.rgw.control
4 default.rgw.meta

The part before the period in a PG ID is the pool number. For example, PG 3.1f belongs to pool 3. Tentacle OSD and PG monitoring

How do you read ceph osd pool ls detail?

The first fields identify the pool and its type. The remaining fields show replica and placement settings, flags and the application tag. The following line from the Tentacle pools guide is wrapped for width.

pool 1 '.rgw.root' replicated size 3 min_size 1 crush_rule 0 object_hash rjenkins
    pg_num 32 pgp_num 32 autoscale_mode on last_change 19 flags hashpspool
    stripe_width 0 application rgw read_balance_score 4.00
  • replicated is the pool type. Erasure-coded pools report a size equal to the total number of data and coding shards, K+M.
  • size 3 min_size 1 configures three replicas and allows I/O with as few as one active replica. In production, size 2 or min_size 1 risks data loss. Reserve either setting for a temporary emergency.
  • crush_rule 0 identifies the CRUSH rule by number. To map the number to a name, run ceph osd crush rule dump. Tentacle ceph man page
  • pg_num 32 is the PG count. pgp_num 32 is the count used for placement and can temporarily differ from pg_num during a change.
  • autoscale_mode on means Ceph automatically adjusts the pool’s PG count. Tentacle placement groups documentation
  • application rgw tags the pool for the RADOS Gateway. The standard tags for CephFS and RBD are cephfs and rbd.

The development branch documents ceph osd pool ls detail --show-rule-names. This shows the CRUSH rule name in text output and adds a separate name field in JSON. Development-branch ceph man page

For more on replica counts and placement, see Ceph Pools, Placement Groups and CRUSH Rules Explained.

For scripts, use structured output. The Tentacle pools guide documents JSON and XML formats for this command.

ceph osd pool ls detail -f json-pretty

How do you list objects in a Ceph pool?

Use rados ls with the pool name. Pass - to print to the terminal or provide a filename to save the listing. Use --all for every namespace or --pgid in place of the pool option to limit the listing to one PG. Tentacle rados man page

Replace <pool> with a pool name and <pgid> with a placement group ID.

rados -p <pool> ls -
rados -p <pool> ls objects.txt
rados -p <pool> --all ls -
rados --pgid <pgid> ls -

For a large pool, save the listing to a file. To find which PG IDs belong to a pool, start with the pool number shown by ceph osd lspools.

What is the .mgr pool in my pool list?

.mgr is the shared storage pool for Ceph Manager modules. Upgrading to Quincy renames the existing device_health_metrics pool to .mgr. Quincy 17.2.0 release notes

Leave .mgr alone. Ceph reserves pool names that begin with a dot for internal use. The guide covers creation under Creating a Pool and removal under Deleting a Pool. The monitors refuse pool deletion unless mon_allow_pool_delete is set to true. Tentacle pools guide

How do you see pool usage and free space?

Run ceph df and read the POOLS section.

  • STORED is “The amount of data that clients have stored in the pool, counted once regardless of replication or erasure coding.”
  • USED is the space allocated to the pool across its OSDs, including replication, allocation granularity and erasure-coding overhead.
  • MAX AVAIL estimates how much more data the pool can hold. It depends on redundancy, the CRUSH rule, device utilization and the cluster’s full ratio.

ceph df detail also breaks out data and omap usage and shows quota and compression columns. The example below is abridged from the Ceph cluster monitoring documentation.

--- POOLS ---
POOL         ID   PGS   STORED  OBJECTS     USED  %USED  MAX AVAIL
.mgr         11     1  558 MiB      141  1.6 GiB      0    5.8 TiB
cephfs_meta  13  1024  166 GiB  14.59 M  499 GiB   2.74    5.8 TiB
kubedata    104   256   63 GiB  17.65 k  188 GiB   0.03    234 TiB

In the sample, dividing cephfs_meta’s 499 GiB USED by its 166 GiB STORED gives about 3.0. That is consistent with the space amplification of three replicas. Check the pool’s size to confirm its configured replica count.

To view the cluster’s full ratio, look for full_ratio in ceph osd dump. For warnings about capacity or quotas, see Ceph HEALTH_WARN: Diagnose and Clear Warnings.

Check one pool’s settings with ceph osd pool get

ceph osd pool get <pool> all
ceph osd pool get <pool> size
ceph osd pool get <pool> crush_rule
ceph osd pool get <pool> erasure_code_profile   # erasure-coded pools only
ceph osd pool application get <pool>

all returns the parameters that apply to the pool’s type. For an erasure-coded pool, pass the returned profile name to ceph osd erasure-code-profile get <profile> to see its settings. Tentacle ceph man page

For help choosing a pool type, see Ceph Erasure Coding vs Replication: How to Choose.

If a pool raises POOL_APP_NOT_ENABLED, initialize it with rbd pool init <pool> if the pool is for RBD. To tag a custom application, run ceph osd pool application enable <pool> <app>. Ceph health checks, Tentacle pools guide

Check PG counts and live I/O per pool

ceph osd pool autoscale-status
ceph osd pool stats <pool>

autoscale-status shows each pool’s PG settings and recommendations. RATE shows the raw space needed per unit of user data, such as 3.0 for three replicas or 1.5 for erasure coding with k=4 and m=2. PG_NUM shows the current count or the target if a change is underway. NEW PG_NUM shows the recommended count when the difference passes the autoscaler’s threshold. AUTOSCALE reads on, off or warn. Tentacle placement groups documentation

ceph osd pool stats reports I/O for one pool, or all pools if you omit the name. Tentacle pools guide

For adding capacity, see How to Add an OSD to Ceph Safely with cephadm.

Showing pools in Proxmox and the dashboard

On Proxmox VE 9.2, run pveceph pool ls to list pools and their settings. Proxmox pveceph command synopsis, Proxmox documentation changelog

In Ceph Dashboard, open Pools to see applications, autoscaling, placement groups, replication size, erasure-code profiles, CRUSH rules and quotas. Ceph Dashboard documentation

What should you check after listing pools?

Review low replica settings, missing application tags and pools close to capacity. POOL_APP_NOT_ENABLED flags a missing application tag. POOL_NEAR_FULL indicates a pool is approaching a configured fullness threshold. Ceph health checks

For replica counts and CRUSH failure domains, see Ceph Pools, Placement Groups and CRUSH Rules Explained. For node counts, see Ceph Minimum Hardware Requirements: Nodes, CPU, RAM, Network.

FAQ

how do i check a ceph pool quota

Run ceph osd pool get-quota <pool> for one pool. To compare pools, run ceph df detail and look at QUOTA OBJECTS and QUOTA BYTES. Tentacle ceph man page, Ceph monitoring documentation

To change a byte quota, run ceph osd pool set-quota <pool> max_bytes <bytes>. Set the byte quota to 0 to remove that limit. A pool at quota raises POOL_FULL and stops accepting writes. Tentacle pools guide, Ceph health checks

Commands and examples were drawn from the Ceph Tentacle and development-branch documentation, the Quincy release notes and the Proxmox VE 9.2 command reference. The commands were not run for this article.

Sources

  1. Ceph Documentation (Tentacle): Pools
  2. Ceph Documentation: Monitoring a Cluster
  3. Ceph Documentation (Tentacle): Monitoring OSDs and PGs
  4. Ceph Documentation (Tentacle): ceph command man page
  5. Ceph Documentation (development branch): ceph command man page
  6. Ceph Documentation (Tentacle): rados command man page
  7. Ceph Documentation (Tentacle): Placement Groups
  8. Ceph Documentation: Health Checks
  9. Ceph Documentation: Ceph Dashboard
  10. Ceph.io: v17.2.0 Quincy released
  11. Proxmox VE: pveceph command synopsis
  12. Proxmox VE: Documentation changelog

Related