From: Vikhyat Umrao Date: Fri, 13 Sep 2019 23:53:58 +0000 (-0700) Subject: tools/rados: add --pgid in help X-Git-Tag: v12.2.13~97^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f404fbce11c37c60b00001c844e5cc26cf8bfbf3;p=ceph.git 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) Conflicts: src/tools/rados/rados.cc - no --format option. --- diff --git a/doc/man/8/rados.rst b/doc/man/8/rados.rst index 949010537c48..a353518b53b2 100644 --- a/doc/man/8/rados.rst +++ b/doc/man/8/rados.rst @@ -28,6 +28,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. @@ -107,7 +113,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. @@ -189,6 +195,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 106ab568aceb..a8f57b23c255 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -148,8 +148,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" @@ -166,6 +166,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" " -b op_size\n" " set the block size for put/get ops and for write benchmarking\n" " -o object_size\n"