|
...
|
...
|
@@ -72,7 +72,7 @@ CEPH_REPLICAS_SEQ=$(seq ${CEPH_REPLICAS})
|
|
72
|
72
|
# ------------
|
|
73
|
73
|
|
|
74
|
74
|
function get_ceph_version {
|
|
75
|
|
- local ceph_version_str=$(sudo ceph daemon mon.$(hostname) version | cut -d '"' -f 4)
|
|
|
75
|
+ local ceph_version_str=$(sudo ceph daemon mon.$(hostname) version | cut -d '"' -f 4 | cut -f 1,2 -d '.')
|
|
76
|
76
|
echo $ceph_version_str
|
|
77
|
77
|
}
|
|
78
|
78
|
|
|
...
|
...
|
@@ -167,7 +167,7 @@ EOF
|
|
167
|
167
|
# pools data and metadata were removed in the Giant release so depending on the version we apply different commands
|
|
168
|
168
|
local ceph_version=$(get_ceph_version)
|
|
169
|
169
|
# change pool replica size according to the CEPH_REPLICAS set by the user
|
|
170
|
|
- if [[ ${ceph_version%.*} -eq 0 ]] && [[ ${ceph_version##*.} -lt 87 ]]; then
|
|
|
170
|
+ if [[ ${ceph_version%%.*} -eq 0 ]] && [[ ${ceph_version##*.} -lt 87 ]]; then
|
|
171
|
171
|
sudo ceph -c ${CEPH_CONF_FILE} osd pool set rbd size ${CEPH_REPLICAS}
|
|
172
|
172
|
sudo ceph -c ${CEPH_CONF_FILE} osd pool set data size ${CEPH_REPLICAS}
|
|
173
|
173
|
sudo ceph -c ${CEPH_CONF_FILE} osd pool set metadata size ${CEPH_REPLICAS}
|