diff options
author | Daniel Baumann <daniel@debian.org> | 2024-11-09 17:08:52 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-11-09 17:08:52 +0100 |
commit | 7ae5754b6d5f4f5ce4c4894a9d0f7247731e4d29 (patch) | |
tree | 4d551ffc1d3e175c528c69f06e22a9ac2ac41854 /src/vnewosd.sh | |
parent | Initial commit. (diff) | |
download | ceph-19-7ae5754b6d5f4f5ce4c4894a9d0f7247731e4d29.tar.xz ceph-19-7ae5754b6d5f4f5ce4c4894a9d0f7247731e4d29.zip |
Adding upstream version 19.2.0.upstream/19.2.0upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'src/vnewosd.sh')
-rwxr-xr-x | src/vnewosd.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnewosd.sh b/src/vnewosd.sh new file mode 100755 index 000000000..8d572ccab --- /dev/null +++ b/src/vnewosd.sh @@ -0,0 +1,15 @@ +#!/bin/bash -ex + +OSD_SECRET=`bin/ceph-authtool --gen-print-key` +echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > /tmp/$$ +OSD_UUID=`uuidgen` +OSD_ID=`bin/ceph osd new $OSD_UUID -i /tmp/$$` +rm /tmp/$$ +rm dev/osd$OSD_ID/* || true +mkdir -p dev/osd$OSD_ID +bin/ceph-osd -i $OSD_ID --mkfs --key $OSD_SECRET --osd-uuid $OSD_UUID +echo "[osd.$OSD_ID] +key = $OSD_SECRET" > dev/osd$OSD_ID/keyring +H=`hostname` +echo "[osd.$OSD_ID] +host = $H" >> ceph.conf |