summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack/openstack-cinder-setup
diff options
context:
space:
mode:
authorPatrick Darley <patrick.darley@codethink.co.uk>2015-03-27 18:40:56 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-03-30 13:57:50 +0000
commitf8606568b23267f230af25e0ca0e759ea1ab20e2 (patch)
tree39bef7e342e886409b76dc67aed462c45988f160 /openstack/usr/share/openstack/openstack-cinder-setup
parent945c9bb8b918607ed97bfcc2a86c0d472dd243e6 (diff)
downloaddefinitions-f8606568b23267f230af25e0ca0e759ea1ab20e2.tar.gz
Partition the second disk
Diffstat (limited to 'openstack/usr/share/openstack/openstack-cinder-setup')
-rw-r--r--openstack/usr/share/openstack/openstack-cinder-setup11
1 files changed, 9 insertions, 2 deletions
diff --git a/openstack/usr/share/openstack/openstack-cinder-setup b/openstack/usr/share/openstack/openstack-cinder-setup
index 0c871fbe..2c133942 100644
--- a/openstack/usr/share/openstack/openstack-cinder-setup
+++ b/openstack/usr/share/openstack/openstack-cinder-setup
@@ -101,11 +101,18 @@ else
device=/dev/$(ls /sys/block | grep -v sda | grep [vs]d)
fi
+# Wipe the disk
+wipefs -fa $device
+
+# Partition disk
+echo -e "n\np\n1\n\n\nw\n" | fdisk $device
+partition="$device"1
+
# Create a physical volume
-pvcreate -ff -y $device
+pvcreate -ff -y $partition
# Create a volume group named "cinder-volumes"
-vgcreate -y cinder-volumes $device
+vgcreate -y cinder-volumes $partition
# Remove the one-shot setup service
rm /etc/systemd/system/multi-user.target.wants/openstack-cinder-setup.service