From 608b4e63312e96dc35b0b65b4538130f5b3fa1c7 Mon Sep 17 00:00:00 2001 From: Alan Bishop Date: Fri, 9 Nov 2018 12:54:31 -0500 Subject: [PATCH] Update ceph OSD setup for standalone Add instructions for creating a systemd service that restores the loopback device used for the ceph OSD, and runs partprobe so the GPT partitions are added to the kernel. This allows the ceph OSD service to survive a reboot. Change-Id: I72f4f7924bc0ad947a7a7b0314e377dfa76044ee --- .../containers_deployment/standalone.rst | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/source/install/containers_deployment/standalone.rst b/doc/source/install/containers_deployment/standalone.rst index c07d12b0..fedb6d12 100644 --- a/doc/source/install/containers_deployment/standalone.rst +++ b/doc/source/install/containers_deployment/standalone.rst @@ -57,6 +57,29 @@ Deploying a Standalone OpenStack node sudo dd if=/dev/zero of=/var/lib/ceph-osd.img bs=1 count=0 seek=7G sudo losetup /dev/loop3 /var/lib/ceph-osd.img + Create a systemd service that restores the device on startup. + + .. code-block:: bash + + cat < /tmp/ceph-osd-losetup.service + [Unit] + Description=Ceph OSD losetup + After=syslog.target + + [Service] + Type=oneshot + ExecStart=/bin/bash -c '/sbin/losetup /dev/loop3 || \ + /sbin/losetup /dev/loop3 /var/lib/ceph-osd.img ; partprobe /dev/loop3' + ExecStop=/sbin/losetup -d /dev/loop3 + RemainAfterExit=yes + + [Install] + WantedBy=multi-user.target + EOF + + sudo mv /tmp/ceph-osd-losetup.service /etc/systemd/system/ + sudo systemctl enable ceph-osd-losetup.service + Create a directory to back up the ceph-ansible fetch directory. .. code-block:: bash