Created
November 16, 2017 07:44
-
-
Save wido/bba60be0a5c58333d72c11eaaa4022f5 to your computer and use it in GitHub Desktop.
Create Ceph OSD FileStore Journal partitions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# | |
# Create Ceph FileStore OSD Journal partitions on a SSD | |
# | |
# Afterwards set the UUID type of the journal right so that | |
# udev chowns the Journal to ceph:ceph | |
# | |
# Author: Wido den Hollander <wido@42on.com> | |
# | |
DEV=/dev/sdn | |
parted -s $DEV mklabel gpt | |
parted -s $DEV mkpart primary 0G 5G | |
parted -s $DEV mkpart primary 5G 10G | |
parted -s $DEV mkpart primary 10G 15G | |
parted -s $DEV mkpart primary 15G 20G | |
parted -s $DEV mkpart primary 25G 30G | |
parted -s $DEV mkpart primary 30G 35G | |
parted -s $DEV mkpart primary 35G 40G | |
parted -s $DEV mkpart primary 40G 45G | |
parted -s $DEV mkpart primary 45G 50G | |
parted -s $DEV mkpart primary 50G 55G | |
parted -s $DEV mkpart primary 55G 60G | |
parted -s $DEV mkpart primary 60G 65G | |
sgdisk --typecode=1:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=2:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=3:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=4:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=5:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=6:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=7:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=8:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=9:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=10:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=11:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV | |
sgdisk --typecode=12:45b0969e-9b03-4f30-b4c6-b4b80ceff106 $DEV |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment