This simple Bash Script can be used to calculate the number of the partitions power (2^X Logical Partitions) that you need in your SUSE OpenStack Cloud Swift barclamp

The recommended power part number is the next nearest of the total of your Swift nodes multiplied for the number of the HDD per node multiplied for 100.
(Remember that you need the first HDD of each node for SO)

So, if you have 10 nodes with 5 HDD each one (less one for SO):

10 * (5 - 1) = 400 * 100 = 4000

The next nearest part power is: 12

2 ^ 12 = 4096

This script do the math:

Billy@hackintosh:~/lab$ ./

Calculate 2^X Logical Partitions  for
"SUSE OpenStack Cloud" Swift Barclamp
 ./ <SOC Swift Nodes> <HDD per Node>


Easy right?

# Tue Mar 15 18:32:59 COT 2016

Usage() {
  echo -e "\nCalculate 2^X Logical Partitions\
  for \n\"SUSE OpenStack Cloud\" Swift Barclamp"
  echo -e "Usage:\n $0 <SOC Swift Nodes> <HDD per Node>\n"
  exit 0
[[ $# -eq 2 ]] || Usage
# SOC6 Uses the first HDD for SO, please consider this

while [ $SOC_PW2 -ge $NextPowerCompare ]; do
        let NextPower2=$NextPower2+1
	NextPowerCompare=$(printf '%s\n' "$(( 2 ** $NextPower2 ))")
echo "2^X Logical Partitions,\
for SOC Swift Barclamp: $NextPower2"

Also is in Github:

And "online" version (careful, it's a lab!):

IMPORTANT: Value Cannot be Changed After the Proposal Has Been Deployed

Changing the number of logical partition after Swift has been deployed is not supported. Therefore the value for the partition power should be calculated from the maximum number of partitions this cloud installation is likely going to need at any point in time.

Billy Vera © 2018. All Rights Reserved.

The opinions expressed in this blog are purely my own and are not in any way endorsed by my employer.

Proudly published with Ghost using Ghostium Theme