Merge "Remove minimal PV support on AIO/workers"

This commit is contained in:
Zuul 2022-12-09 23:17:01 +00:00 committed by Gerrit Code Review
commit f96df1e18b
2 changed files with 6 additions and 39 deletions

View File

@ -579,16 +579,13 @@ function get_aio_controller_provisioning_sizes()
# Round MINIMUM_PLATFORM_PV_SIZE to the closest upper value that can be divided by 1024.
if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
export MINIMUM_PLATFORM_PV_SIZE=167936
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
else
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
@ -619,9 +616,6 @@ function get_std_controller_provisioning_sizes()
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
}
#########################################################################
# Name : get_worker_provisioning_sizes
@ -656,7 +650,6 @@ function get_worker_provisioning_sizes()
##
## Round CGTS_PV_SIZE to the closest upper value that can be divided by 1024.
## 69648/1024=68.01. CGTS_PV_SIZE=69*1024=70656.
MINIMUM_PLATFORM_PV_SIZE=70656
sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((120*\$gib)) ] ; then
@ -666,7 +659,6 @@ function get_worker_provisioning_sizes()
export LV_SZ_ROOT=20480
export LV_SZ_VAR=20480
fi
export MINIMUM_PLATFORM_PV_SIZE=\$((\$MINIMUM_PLATFORM_PV_SIZE + \$LV_SZ_ROOT + \$LV_SZ_VAR))
ilog "Install disk \${INSTDEV} has size:\${sz}B, \$((\${sz}/\$gib))GiB"
}
@ -686,9 +678,6 @@ function get_storage_provisioning_sizes()
export PART_SZ_BOOT=2048
export PART_SZ_ROOT=0
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0
# Logical volumes
sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((120*\$gib)) ] ; then
@ -1675,16 +1664,9 @@ if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
fi
# Allocate platform pv
if [ "$MINIMUM_PLATFORM_PV_SIZE" = 0 ] ; then
ilog "platform_pv partition - using all remaining disk space"
end_sec=$last
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
else
ilog "platform_pv partition - requesting ${MINIMUM_PLATFORM_PV_SIZE} MiB"
end_sec=$(($start_sec+(${MINIMUM_PLATFORM_PV_SIZE}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
check_partitioning_status
fi
ilog "platform_pv partition - using all remaining disk space"
end_sec=$last
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs)
[ -z "$STOR_DEVS" ] && report_failure_with_msg "No storage devices available."
@ -1795,7 +1777,6 @@ pv_part=${fs_dev}${part_no}
ilog "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no"
ilog "MINIMUM_PLATFORM_PV_SIZE (${pv_part}): ${MINIMUM_PLATFORM_PV_SIZE} MB (0 = all avail space)"
ilog "LV_SZ_LOG (cgts--vg-log--lv size): ${LV_SZ_LOG} MB"
ilog "LV_SZ_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB"

View File

@ -581,16 +581,13 @@ function get_aio_controller_provisioning_sizes()
# Round MINIMUM_PLATFORM_PV_SIZE to the closest upper value that can be divided by 1024.
if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
export MINIMUM_PLATFORM_PV_SIZE=167936
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
else
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
@ -621,9 +618,6 @@ function get_std_controller_provisioning_sizes()
export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
}
#########################################################################
# Name : get_worker_provisioning_sizes
@ -1775,16 +1769,9 @@ if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
fi
# Allocate platform pv
if [ "$MINIMUM_PLATFORM_PV_SIZE" = 0 ] ; then
ilog "platform_pv partition - using all remaining disk space"
end_sec=$last
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
else
ilog "platform_pv partition - requesting ${MINIMUM_PLATFORM_PV_SIZE} MiB"
end_sec=$(($start_sec+(${MINIMUM_PLATFORM_PV_SIZE}*${MIB_BYTES}/${LOGICAL_SECTOR_SZ})-1))
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
check_partitioning_status
fi
ilog "platform_pv partition - using all remaining disk space"
end_sec=$last
sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs)
[ -z "$STOR_DEVS" ] && report_failure_with_msg "No storage devices available."
@ -1914,7 +1901,6 @@ pv_part=${fs_dev}${part_no}
ilog "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no"
ilog "MINIMUM_PLATFORM_PV_SIZE (${pv_part}): ${MINIMUM_PLATFORM_PV_SIZE} MB (0 = all avail space)"
ilog "LV_SZ_LOG (cgts--vg-log--lv size): ${LV_SZ_LOG} MB"
ilog "LV_SZ_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB"