forked from ceph/ceph-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_osd.sh
executable file
·52 lines (47 loc) · 1.16 KB
/
start_osd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
if is_redhat; then
if [[ -n "${TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES}" ]]; then
sed -i -e "s/^\(TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES\)=.*/\1=${TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES}/" /etc/sysconfig/ceph
fi
source /etc/sysconfig/ceph
fi
function start_osd {
get_config
check_config
if [ "${CEPH_GET_ADMIN_KEY}" -eq 1 ]; then
get_admin_key
check_admin_key
fi
case "$OSD_TYPE" in
directory_single)
source /opt/ceph-container/bin/osd_directory_single.sh
osd_directory_single
;;
disk)
osd_disk
;;
prepare)
source /opt/ceph-container/bin/osd_disk_prepare.sh
osd_disk_prepare
;;
activate)
source /opt/ceph-container/bin/osd_disk_activate.sh
osd_activate
;;
activate_journal)
source /opt/ceph-container/bin/osd_activate_journal.sh
source /opt/ceph-container/bin/osd_common.sh
osd_activate_journal
;;
*)
osd_trying_to_determine_scenario
;;
esac
}
function osd_disk {
source /opt/ceph-container/bin/osd_disk_prepare.sh
source /opt/ceph-container/bin/osd_disk_activate.sh
osd_disk_prepare
osd_activate
}