From 5abb83ae5e233050e6598ce17ea89d0f9f2ba66d Mon Sep 17 00:00:00 2001 From: Vikhyat Umrao Date: Fri, 13 Sep 2019 16:53:58 -0700 Subject: [PATCH] tools/rados: add --pgid in help This commit 825c7b9729b2410a116e123d4b21210c646704d4 brought the support for --pgid in rados ls but was not in help. Fixes: https://tracker.ceph.com/issues/41876 Signed-off-by: Vikhyat Umrao (cherry picked from commit ae9a24eaba330fd3f6946063c2bc926f58c93772) --- doc/man/8/rados.rst | 12 +++++++++++- src/tools/rados/rados.cc | 6 ++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/man/8/rados.rst b/doc/man/8/rados.rst index 63fdc23f97202..ef5a111da72bf 100644 --- a/doc/man/8/rados.rst +++ b/doc/man/8/rados.rst @@ -26,6 +26,12 @@ Options Interact with the given pool. Required by most commands. +.. option:: --pgid + + As an alternative to ``--pool``, ``--pgid`` also allow users to specify the + PG id to which the command will be directed. With this option, certain + commands like ``ls`` allow users to limit the scope of the command to the given PG. + .. option:: -s snap, --snap snap Read from the given pool snapshot. Valid for all pool-specific read operations. @@ -104,7 +110,7 @@ Pool specific commands List the watchers of object name. :command:`ls` *outfile* - List objects in given pool and write to outfile. + List objects in the given pool and write to outfile. Instead of ``--pool`` if ``--pgid`` will be specified, ``ls`` will only list the objects in the given PG. :command:`lssnap` List snapshots for given pool. @@ -199,6 +205,10 @@ 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 diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 37c6d3352e0d6..7e81d27748d2d 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -157,8 +157,8 @@ void usage(ostream& out) "\n" "SCRUB AND REPAIR:\n" " list-inconsistent-pg list inconsistent PGs in given pool\n" -" list-inconsistent-obj list inconsistent objects in given pg\n" -" list-inconsistent-snapset list inconsistent snapsets in the given pg\n" +" list-inconsistent-obj list inconsistent objects in given PG\n" +" list-inconsistent-snapset list inconsistent snapsets in the given PG\n" "\n" "CACHE POOLS: (for testing/development only)\n" " cache-flush flush cache pool object (blocking)\n" @@ -175,6 +175,8 @@ void usage(ostream& out) " select given pool by name\n" " --target-pool=pool\n" " select target pool by name\n" +" --pgid PG id\n" +" select given PG id\n" " -f [--format plain|json|json-pretty]\n" " --format=[--format plain|json|json-pretty]\n" " -b op_size\n" -- 2.39.5