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
This commit is contained in:
Mike Scherbakov 2013-12-23 20:20:05 +04:00
parent cf8e2013bb
commit fb668ac3d5
2 changed files with 2 additions and 2 deletions

View File

@ -798,7 +798,7 @@ class PreseedPManager(object):
self.late("sleep 3")
self.late("hdparm -z $(readlink -f /dev/{0})"
"".format(disk["id"]))
pvlist.append("pvcreate -ff $(readlink -f /dev/{0}){1}{2}"
pvlist.append("pvcreate -ff -y $(readlink -f /dev/{0}){1}{2}"
"".format(disk["id"],
self._pseparator(disk["id"]),
pcount))

View File

@ -4,7 +4,7 @@
#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 ${bd}1
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