RADOS(8)

πŸŽ€ RADOS(8) β€” the object storage utility, bestie edition

okay so this is the manual page for rados(8), aka the little command-line bestie that talks to your Ceph object storage cluster. Welcome to the group chat, grab a snack. πŸ’–


✨ NAME ✨

rados β€” the rados object storage utility. That's it, that's the name, she's simple and she's iconic. πŸ’…

🌸 SYNOPSIS 🌸

rados [ options ] [ command ]

πŸ¦‹ DESCRIPTION πŸ¦‹

So rados is a utility for interacting with a Ceph object storage cluster β€” that's RADOS, which is part of the Ceph distributed storage system. Basically she's your direct line to the objects themselves, no middle layer, no small talk. 🫢


πŸ‘‘ GLOBAL OPTIONS πŸ‘‘

These ones work pretty much everywhere, they're like the base layer of the fit. ✨

  • --object-locator object_locator β€” sets the object_locator for the operation. That's it, that's the whole vibe.
  • -p pool, --pool pool β€” interact with the pool you name. Most commands literally need this one, so don't skip her. πŸ”₯
  • --target-pool pool β€” pick the target pool by name.
  • --pgid β€” instead of --pool, this lets you say which PG id you want the command aimed at. With this, some commands like ls let you narrow the scope down to just that PG.
  • -N namespace, --namespace namespace β€” specify the rados namespace to use for the object.
  • --all β€” use it with ls to list objects in all namespaces. Pop it in the CEPH_ARGS environment variable if you want that to be the default.
  • --default β€” use it with ls to list objects in the default namespace. She takes precedence over --all in case --all is chillin' in the environment.
  • -s snap, --snap snap β€” read from the given pool snapshot. Valid for all pool-specific read operations.
  • --create β€” create the pool or directory that was specified.
  • -i infile β€” specifies an input file to pass along as a payload with the command to the monitor cluster. Only used for specific monitor commands, so don't get any ideas.
  • -m monaddress[:port] β€” connect to the specified monitor (instead of looking through ceph.conf).
  • -b block_size β€” set the block size for put/get/append ops and for write benchmarking.
  • --striper β€” uses the striping API of rados rather than the default one. Available for stat, stat2, get, put, append, truncate, rm, ls and all xattr related operations. ✨
  • -O object_size, --object-size object_size β€” set the object size for put/get ops and for write benchmarking.
  • --max-objects β€” set the max number of objects for write benchmarking.
  • --lock-cookie locker-cookie β€” sets the lock cookie for acquiring the advisory lock (that's the lock get command). If the cookie isn't empty, you must pass this option to the lock break command so it can find the correct lock when releasing it.
  • --target-locator β€” use with cp to specify the locator of the new object.
  • --target-nspace β€” use with cp to specify the namespace of the new object.

πŸ”₯ BENCH OPTIONS πŸ”₯

Benchmarking time, put your little lab coat on, we're measuring things. πŸ“

  • -t N, --concurrent-ios=N β€” set the number of concurrent I/O operations.
  • --show-time β€” prefix the output with date/time.
  • --no-verify β€” don't verify the contents of read objects. (Living dangerously, love that for you.)
  • --write-object β€” write contents to the objects.
  • --write-omap β€” write contents to the omap.
  • --write-xattr β€” write contents to the extended attributes.

🌈 LOAD GEN OPTIONS 🌈

The knobs for generating load. Turn them gently. πŸŽ›οΈ

  • --num-objects β€” total number of objects.
  • --min-object-size β€” min object size.
  • --max-object-size β€” max object size.
  • --min-op-len β€” min io size of operations.
  • --max-op-len β€” max io size of operations.
  • --max-ops β€” max number of operations.
  • --max-backlog β€” max backlog size.
  • --read-percent β€” percent of operations that are read.
  • --target-throughput β€” target throughput (in bytes).
  • --run-length β€” total time (in seconds).
  • --offset-align β€” at what boundary to align random op offsets.

🧚 CACHE POOLS OPTIONS 🧚

  • --with-clones β€” include clones when doing flush or evict.

πŸ“ OMAP OPTIONS πŸ“

  • --omap-key-file file β€” read the omap key from a file.

πŸ’œ GENERIC OPTIONS πŸ’œ

The universally applicable ones. No notes. ⭐

  • -c FILE, --conf FILE β€” read configuration from the given configuration file.
  • --id ID β€” set the ID portion of a client entity. Like admin for client.admin.
  • -n TYPE.ID, --name TYPE.ID β€” set the full entity name. Like client.admin.
  • --cluster NAME β€” set cluster name (default: ceph).
  • --setuser USER β€” set uid to user or uid (and gid to the user's gid).
  • --setgroup GROUP β€” set gid to group or gid.
  • --version β€” show version and quit. Bye bestie πŸ‘‹

🌟 GLOBAL COMMANDS 🌟

These are the whole-cluster girlies, not tied to one pool. πŸ‘‘

  • lspools β€” list object pools.
  • df β€” show utilization statistics, including disk usage (bytes) and object counts, over the entire system and broken down by pool.
  • list-inconsistent-pg pool β€” list inconsistent PGs in the given pool.
  • list-inconsistent-obj pgid β€” list inconsistent objects in the given PG.
  • list-inconsistent-snapset pgid β€” list inconsistent snapsets in the given PG.

πŸ’… POOL SPECIFIC COMMANDS πŸ’…

Now we get specific. Still the same energy though.

  • get name outfile β€” read object name from the cluster and write it to outfile.
  • put name infile [--offset offset] β€” write object name to the cluster with contents from infile, starting at offset (default: 0).
⚠️ Warning: the put command creates a single RADOS object, sized just as large as your input file. Unless your objects are of reasonable and consistent sizes, that is probably not what you want β€” consider using RGW/S3, CephFS, or RBD instead.
  • append name infile β€” append object name to the cluster with contents from infile.
  • rm [--force-full] name ... β€” remove object(s) with name(s). With --force-full it will remove when the cluster is marked full.
  • listwatchers name β€” list the watchers of object name.
  • ls outfile β€” list objects in the given pool and write to outfile. Instead of --pool, if --pgid is specified, ls will only list the objects in the given PG.
  • lssnap β€” list snapshots for the given pool.
  • mksnap foo β€” create a pool snapshot named foo.
  • rmsnap foo β€” remove pool snapshot named foo.
  • bench seconds mode [ -b objsize ] [ -t threads ] β€” benchmark for seconds. The mode can be write, seq, or rand. seq and rand are read benchmarks, either sequential or random. Before running one of the reading benchmarks, run a write benchmark with the --no-cleanup option. The default object size is 4 MB, and the default number of simulated threads (parallel writes) is 16. The --run-name <label> option is useful for benchmarking a workload test from multiple clients. The <label> is an arbitrary object name. It is "benchmark_last_metadata" by default, and is used as the underlying object name for "read" and "write" ops.
πŸ“Œ Note: the -b objsize option is valid only in write mode. πŸ“Œ Note: write and seq must be run on the same host, otherwise the objects created by write will have names that will fail seq.
  • cleanup [ --run-name run_name ] [ --prefix prefix ] β€” clean up a previous benchmark operation.
πŸ“Œ Note: the default run-name is "benchmark_last_metadata".
  • listxattr name β€” list all extended attributes of an object.
  • getxattr name attr β€” dump the extended attribute value of attr of an object.
  • setxattr name attr value β€” set the value of attr in the extended attributes of an object.
  • rmxattr name attr β€” remove attr from the extended attributes of an object.
  • stat name β€” get stat (ie. mtime, size) of the given object.
  • stat2 name β€” get stat (similar to stat, but with high precision time) of the given object.
  • listomapkeys name β€” list all the keys stored in the object map of object name.
  • listomapvals name β€” list all key/value pairs stored in the object map of object name. The values are dumped in hexadecimal.
  • getomapval [ --omap-key-file file ] name key [ out-file ] β€” dump the hexadecimal value of key in the object map of object name. If the optional out-file argument isn't provided, the value will be written to standard output.
  • setomapval [ --omap-key-file file ] name key [ value ] β€” set the value of key in the object map of object name. If the optional value argument isn't provided, the value will be read from standard input.
  • rmomapkey [ --omap-key-file file ] name key β€” remove key from the object map of object name.
  • getomapheader name β€” dump the hexadecimal value of the object map header of object name.
  • setomapheader name value β€” set the value of the object map header of object name.
  • export filename β€” serialize pool contents to a file or standard output. n" β€” okay so yes, the manpage literally says that, trailing n" and all, and I am not touching it, that's a preservation moment, periodt. πŸ’€
  • import [--dry-run] [--no-overwrite] < filename | - > β€” load pool contents from a file or standard input.

🌈 EXAMPLES 🌈

Real scenarios, let's go. πŸƒβ€β™€οΈβœ¨

To view cluster utilization:

rados df

To get a list object in pool foo sent to stdout:

rados -p foo ls -

To get a list of objects in PG 0.6:

rados --pgid 0.6 ls

To write an object:

rados -p foo put myobject blah.txt

To create a snapshot:

rados -p foo mksnap mysnap

To delete the object:

rados -p foo rm myobject

To read a previously snapshotted version of an object:

rados -p foo -s mysnap get myobject blah.txt.old

To list inconsistent objects in PG 0.6:

rados list-inconsistent-obj 0.6 --format=json-pretty

⭐ AVAILABILITY ⭐

rados is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at <https://docs.ceph.com> for more information. πŸ“š

🫢 SEE ALSO 🫢

ceph (8) β€” go read her too, she's family.

2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).


aaaand that's the whole page, bestie!! πŸŽ€ This one shipped in the dev series, dated Oct 06, 2026, and yes she is RADOS(8) through and through. Go forth and ls responsibly. πŸ’œ no cap.

πŸ“¦ where this page comes from