fuel-library/deployment/puppet/cobbler/templates/snippets/cinder_create_lvm_group.erb
Mike Scherbakov fb668ac3d5 Unconditionaly do pvcreate
During the disk partitioning pmanager runs pvcreate
which asks for confirmation on wiping out the volume
group if it is found there. There was another fix
which does dd to clean up all information about
all disk partionins, so pvcreate should not ask
anything. This patch adds '-y' option to pvcreate,
and it writes changes without asking questions,
so we can be double sure that installation won't
stuck under some other condition on this command.

Change-Id: I7368ce58fa54155664d59adedbfc0463f7d3a3ea
2013-12-23 20:20:23 +04:00

12 lines
388 B
Plaintext

#set $vgname = $getVar("cinder_vgname", "cinder-volumes")
#set $bds = $getVar("cinder_bd_for_vg", "")
#if $bds
#set $devs = ""
#for $bd in $bds.split(",")
dd if=/dev/zero bs=8192 count=1 of=$bd
echo ";" | sfdisk -f -q -L $bd && sfdisk -R $bd && sleep 1 && pvcreate -ff -y ${bd}1
#set $devs += "%s1 " % $bd
#end for
vgcreate $vgname $devs
#end if