To get the ordered list of OSD to which an object is mapped and the name
of the corresponding PG.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
rm $dir/ORIGINAL
}
-function get_osds() {
- local poolname=$1
- local objectname=$2
-
- ./ceph osd map $poolname $objectname | \
- perl -p -e 's/.*up \(\[(.*?)\].*/$1/; s/,/ /g'
-}
-
function chunk_size() {
local stripe_width=$(./ceph-conf --show-config-value osd_pool_erasure_code_stripe_width)
eval local $(./ceph osd erasure-code-profile get default | grep k=)
return $status
}
+
+function get_osds() {
+ local poolname=$1
+ local objectname=$2
+
+ ./ceph osd map $poolname $objectname | \
+ perl -p -e 's/.*up \(\[(.*?)\].*/$1/; s/,/ /g'
+}
+
+function get_pg() {
+ local poolname=$1
+ local objectname=$2
+
+ ./ceph osd map $poolname $objectname | \
+ perl -p -e 's/.*\((.*?)\) -> up.*/$1/'
+}