From 89922b60f2e94b6ca341a432f295a581a92f045f Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Wed, 14 Jun 2017 13:04:23 +0100 Subject: [PATCH] Update loopback instructions in cinder docs losetup/fallocate are better and match what we have for Swift. Change-Id: I1147374017e4f1cb3f3e970e048ba565388cd86f --- doc/cinder-guide.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/cinder-guide.rst b/doc/cinder-guide.rst index a6ba19f3ab..5975b1e566 100644 --- a/doc/cinder-guide.rst +++ b/doc/cinder-guide.rst @@ -45,11 +45,12 @@ During development, it may be desirable to use file backed block storage. It is possible to use a file and mount it as a block device via the loopback system. :: - mknod /dev/loop2 b 7 2 - dd if=/dev/zero of=/var/lib/cinder_data.img bs=1G count=20 - losetup /dev/loop2 /var/lib/cinder_data.img - pvcreate /dev/loop2 - vgcreate cinder-volumes /dev/loop2 + + free_device=$(losetup -f) + fallocate -l 20G /var/lib/cinder_data.img + losetup $free_device /var/lib/cinder_data.img + pvcreate $free_device + vgcreate cinder-volumes $free_device Enable the ``lvm`` backend in ``/etc/kolla/globals.yml``: