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

This commit is contained in:
nemo 2019-09-09 16:42:45 +02:00
parent 2b386333dd
commit 4f6aeb0b6b

View file

@ -445,9 +445,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/vda4)" echo "INFO : Add new PV to default VG... (vgextend <defaultVG> /dev/vda4)"
ssh ${SSH_OPT} ${SSH_HOST} "vgextend $(vgs | awk '/vg/ {print $1}') /dev/vda4" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} 'vgextend $(vgs | awk "/vg/ {print $1}") /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'
@ -456,7 +456,7 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then
echo "INFO : Resize LV on disk... (RESIZE VM LV)" echo "INFO : Resize LV on disk... (RESIZE VM LV)"
ssh ${SSH_OPT} ${SSH_HOST} "lvextend -l +100%FREE $(find /dev/mapper -name '*root*')" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} 'lvextend -l +100%FREE $(find /dev/mapper -name "*root*")' &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'ERROR : problem during resizing LV, please finish manually the deploy OR delete VM and IPAM information' echo 'ERROR : problem during resizing LV, please finish manually the deploy OR delete VM and IPAM information'
@ -465,7 +465,7 @@ if [ "${VM_DISK_EXTEND}" -ne 0 ]; then
echo "INFO : resize2fs the LV... (RESIZE VM LV FS)" echo "INFO : resize2fs the LV... (RESIZE VM LV FS)"
ssh ${SSH_OPT} ${SSH_HOST} "resize2fs ${DEFAULT_LV_ROOT}" &> /dev/null ssh ${SSH_OPT} ${SSH_HOST} 'resize2fs $(find /dev/mapper -name "*root*")' &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo 'ERROR : problem during resize2fs, please finish manually the deploy OR delete VM and IPAM information' echo 'ERROR : problem during resize2fs, please finish manually the deploy OR delete VM and IPAM information'