Frequently Asked Question

rados
Last Updated 3 hours ago

The rados command‑line utility is the primary way to interact directly with a Ceph Object Storage cluster. It lets you list pools, put and get objects, create and manage snapshots, and perform other low‑level operations. Below is a practical, step‑by‑step guide for common tasks.

Prerequisites

  1. Ceph client configuration – Ensure you have a working ceph.conf and a keyring that grants the required capabilities (e.g., client.admin or a custom client with osd, mon, mgr caps).
  2. Ceph CLI installed – On a workstation or admin node, install the Ceph packages (ceph-common, ceph-mgr, etc.) that provide the rados binary.
  3. Authentication – Verify you can run a simple rados -i client.admin command without error.

Basic Commands

1. List available pools

rados lspools

Shows all pools defined in the cluster.

2. Show pool details (including size, usage, etc.)

rados df

Provides a summary of storage utilisation per pool.

3. List objects in a pool

rados -p  ls

Replace with the actual pool name. This displays object IDs and their sizes.

4. Upload (put) an object

rados -p  put  

Example:

rados -p photos put vacation.jpg /home/user/Pictures/vacation.jpg

5. Download (get) an object

rados -p  get  

Example:

rados -p photos get vacation.jpg /tmp/vacation_download.jpg

6. Delete an object

rados -p  rm 

7. List snapshots of a pool

rados snap ls 

Shows all snapshot names for the specified pool.

8. Create a snapshot

rados snap create  

Example:

rados snap create photos snap_2023_09_15

9. Roll back to a snapshot

rados snap rollback  

Reverts the pool’s state to the chosen snapshot.

10. Remove a snapshot

rados snap rm  

Advanced Usage

Using a non‑admin client

If you have created a dedicated client (e.g., client.radosgw for RGW access), specify the client name and keyring:

rados -c /etc/ceph/ceph.conf -n client.radosgw -p  ls

Bulk operations

You can combine rados with shell loops for batch processing. Example: copy all objects from one pool to another:

for obj in $(rados -p source_pool ls); do
    rados -p target_pool cp $obj $obj
done

Monitoring long‑running operations

Add --pool to limit output, or use --format json for script‑friendly parsing:

rados -p photos ls --format json

Common Troubleshooting Tips

  • Permission denied – Verify the client’s keyring has osd and mon caps. Use ceph auth export client. to export a working keyring.
  • Pool not found – Ensure the pool exists (rados lspools) and that you are targeting the correct cluster endpoint.
  • Network issues – Test connectivity to the monitor(s) with ceph -s. If monitors are unreachable, check DNS or firewall settings.
  • Large object lists – When dealing with many objects, pipe the output to head or tail to avoid overwhelming the terminal.

Where to Find More Information

By following these steps you can efficiently manage objects, pools, and snapshots using the rados utility within a Ceph storage environment.

This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...