lockdep=${LOCKDEP:-1}
spdk_enabled=0 #disable SPDK by default
zoned_enabled=0
-pci_id=""
with_mgr_dashboard=true
if [[ "$(get_cmake_variable WITH_MGR_DASHBOARD_FRONTEND)" != "ON" ]] ||
usage=$usage"\t--nolockdep disable lockdep\n"
usage=$usage"\t--multimds <count> allow multimds with maximum active count\n"
usage=$usage"\t--without-dashboard: do not run using mgr dashboard\n"
-usage=$usage"\t--bluestore-spdk <vendor>:<device>: enable SPDK and specify the PCI-ID of the NVME device\n"
+usage=$usage"\t--bluestore-spdk: enable SPDK and with a comma-delimited list of PCI-IDs of NVME device (e.g, 0000:81:00.0)\n"
usage=$usage"\t--msgr1: use msgr1 only\n"
usage=$usage"\t--msgr2: use msgr2 only\n"
usage=$usage"\t--msgr21: use msgr2 and msgr1\n"
;;
--bluestore-spdk )
[ -z "$2" ] && usage_exit
- pci_id="$2"
+ IFS=',' read -r -a bluestore_spdk_dev <<< "$2"
spdk_enabled=1
shift
;;
fi
}
-get_pci_selector() {
- which_pci=$1
- lspci -mm -n -D -d $pci_id | cut -d ' ' -f 1 | sed -n $which_pci'p'
-}
-
-get_pci_selector_num() {
- lspci -mm -n -D -d $pci_id | cut -d' ' -f 1 | wc -l
-}
do_rgw_conf() {
fi
if [ "$objectstore" == "bluestore" ]; then
if [ "$spdk_enabled" -eq 1 ]; then
- if [ "$(get_pci_selector_num)" -eq 0 ]; then
- echo "Not find the specified NVME device, please check." >&2
- exit
- fi
- if [ $(get_pci_selector_num) -lt $CEPH_NUM_OSD ]; then
- echo "OSD number ($CEPH_NUM_OSD) is greater than NVME SSD number ($(get_pci_selector_num)), please check." >&2
- exit
- fi
BLUESTORE_OPTS=" bluestore_block_db_path = \"\"
bluestore_block_db_size = 0
bluestore_block_db_create = false
EOF
if [ "$spdk_enabled" -eq 1 ]; then
wconf <<EOF
- bluestore_block_path = spdk:$(get_pci_selector $((osd+1)))
+ bluestore_block_path = spdk:${bluestore_spdk_dev[$osd]}
EOF
fi