Change partionning (because there is an extended default part with Debian)

This commit is contained in:
nemo 2019-09-09 16:16:47 +02:00
parent 863a65f97e
commit a48137052c
1 changed files with 5 additions and 5 deletions

View File

@ -424,7 +424,7 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then
echo "INFO : Create new primary partition to extend VG... (Create new partition)" echo "INFO : Create new primary partition to extend VG... (Create new partition)"
# Dirty but it's just work # Dirty but it's just work
ssh ${SSH_OPT} ${SSH_HOST} "echo -e \"n\np\n\n\n\nt\n\n8e\nw\n\" | fdisk /dev/vda" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} "echo -e \"n\np\n\n\n\nn\np\n\n\n\nt\n4\n\n8e\nw\n\" | fdisk /dev/vda" &> /dev/null
# Don't check errors because return code in error (system has to reboot) # Don't check errors because return code in error (system has to reboot)
@ -436,9 +436,9 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then
echo "INFO : Wait 1 minute for system reboot" echo "INFO : Wait 1 minute for system reboot"
sleep 60 sleep 60
echo "INFO : Create new PV... (pvcreate /dev/vda3)" echo "INFO : Create new PV... (pvcreate /dev/vda4)"
ssh ${SSH_OPT} ${SSH_HOST} "pvcreate /dev/vda3" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} "pvcreate /dev/vda4" &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'ERROR : problem during create PV, please finish manually the deploy OR delete VM and IPAM information' echo 'ERROR : problem during create PV, please finish manually the deploy OR delete VM and IPAM information'
@ -452,9 +452,9 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then
exit 1 exit 1
fi fi
echo "INFO : Add new PV to VG ${DEFAULT_VG}... (vgextend ${DEFAULT_VG} /dev/vda3)" echo "INFO : Add new PV to VG ${DEFAULT_VG}... (vgextend ${DEFAULT_VG} /dev/vda4)"
ssh ${SSH_OPT} ${SSH_HOST} "vgextend ${DEFAULT_VG} /dev/vda3" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} "vgextend ${DEFAULT_VG} /dev/vda4" &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'ERROR : problem during add new PV in VG, please finish manually the deploy OR delete VM and IPAM information' echo 'ERROR : problem during add new PV in VG, please finish manually the deploy OR delete VM and IPAM information'