Skip to content

Instantly share code, notes, and snippets.

@ljjjustin
Created May 14, 2019 04:11
Show Gist options
  • Save ljjjustin/6968d7d0d810af2af91fe0c5266058d3 to your computer and use it in GitHub Desktop.
Save ljjjustin/6968d7d0d810af2af91fe0c5266058d3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import math
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "usage: %s <osd amount>" % sys.argv[0]
osd_num = int(sys.argv[1])
power = int(math.log(osd_num * 100, 2)+0.99)
total_pgs = 2**power
print "images pool: ", total_pgs/16
print "vms pool: ", total_pgs/2
print "volumes pool: ", total_pgs/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment