aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2016-03-08 16:37:36 +0000
committerPaul Bourke <paul.bourke@oracle.com>2016-03-08 16:37:36 +0000
commit9588fd1d990a380d2bd9978009cd0cc161d78c3d (patch)
tree6feb58cfa90b82f8ac2f8ee9baf31ca5bc274746
parent023daa574f47a00108d2e4f0644fbcbde47a8ff5 (diff)
downloadkolla-9588fd1d990a380d2bd9978009cd0cc161d78c3d.tar.gz
kolla-9588fd1d990a380d2bd9978009cd0cc161d78c3d.zip
Document how to use loopback devices for Swift
People commonly want to use loopback devices to evaulate or develop on Swift. The steps for this are slightly different than those for physical block devices. Also make some small fix ups to the title formatting. Change-Id: I0c1cb4a261f264dc56bd065ab137e5ee79e773f8
-rw-r--r--doc/swift-guide.rst24
1 files changed, 19 insertions, 5 deletions
diff --git a/doc/swift-guide.rst b/doc/swift-guide.rst
index c159b0536..87bbdb1af 100644
--- a/doc/swift-guide.rst
+++ b/doc/swift-guide.rst
@@ -11,8 +11,8 @@ Before running Swift we need to generate "rings", which are binary compressed
files that at a high level let the various Swift services know where data is in
the cluster. We hope to automate this process in a future release.
-disks with partition table (recommended)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Disks with a partition table (recommended)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Swift also expects block devices to be available for storage. To prepare a disk
for use as Swift storage device, a special partition name and filesystem label
@@ -30,8 +30,22 @@ Follow the example below to add 3 disks for an AIO demo setup.
(( index++ ))
done
-disks without partition table
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+For evaluation, loopback devices can be used in lieu of real disks:
+
+::
+
+ index=0
+ for d in sdc sdd sde; do
+ free_device=$(losetup -f)
+ fallocate -l 1G /tmp/$d
+ losetup $free_device /tmp/$d
+ parted $free_device -s -- mklabel gpt mkpart KOLLA_SWIFT_DATA 1 -1
+ sudo mkfs.xfs -f -L d${index} ${free_device}p1
+ (( index++ ))
+ done
+
+Disks without a partition table
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kolla also supports unpartitioned disk (filesystem on /dev/sdc instead of
/dev/sdc1) detection purely based on filesystem label. This is generally not a
@@ -46,7 +60,7 @@ ansible/roles/swift/defaults/main.yml
swift_devices_match_mode: "prefix"
swift_devices_name: "swd"
-rings
+Rings
~~~~~
Run following commands locally to generate Rings for AIO demo setup. The