Skip to content

Instantly share code, notes, and snippets.

@trihoangvo
Created April 21, 2014 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trihoangvo/fb32e38c303b05f01831 to your computer and use it in GitHub Desktop.
Save trihoangvo/fb32e38c303b05f01831 to your computer and use it in GitHub Desktop.
vagrant_openstack_format_volumes
# puppet/manifests/control.pp
# formats the disk
exec { "fdisk":
command => "/sbin/fdisk /dev/sdb << EOF
n
p
1
w
EOF",
unless => "/bin/grep sdb1 /proc/partitions",
}
# create pv /dev/sdb1
exec { "create_pv_sdb1":
command => "/sbin/pvcreate /dev/sdb1",
require => Exec["fdisk"],
}
# create volume group cinder-volumes
exec { "create_vg_cinder_volumes":
command => "/sbin/vgcreate cinder-volumes /dev/sdb1",
require => Exec["create_pv_sdb1"],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment