Remove minimal PV support on AIO/workers

To support long running patch-able systems that don't require a
reinstall, the entire root disk will be allocated to the cgts-vg volume
group as part of installation.

This update simply removes the use of MINIMUM_PLATFORM_PV_SIZE and
ensures that the 'platform_pv' uses all available space.

NOTE: A followup commit will be provided to clean up the large, small,
      tiny disk references and provide an accurate log checking for and
      displaying minimal disk size based on default logical volume
      sizes.

Test Plan:
PASS - Install AIO-SX, bootstrap, unlock
PASS - Install 2+2+2, bootstrap, unlock

Change-Id: I3a50f2305b781de1cf9b80c5aed62b03bebc4790
Story: 2010444
Task: 46981
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2022-11-28 17:42:54 -06:00
parent f15661bcf6
commit 6132aa7317
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. # 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 if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB" ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000 export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB" ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
export MINIMUM_PLATFORM_PV_SIZE=167936
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000 export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
else else
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB" ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail. # Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LV_SZ_LOG=3000 export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000 export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000 export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
@ -619,9 +616,6 @@ function get_std_controller_provisioning_sizes()
export LV_SZ_SCRATCH=16000 export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480 export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
} }
######################################################################### #########################################################################
# Name : get_worker_provisioning_sizes # 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. ## 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. ## 69648/1024=68.01. CGTS_PV_SIZE=69*1024=70656.
MINIMUM_PLATFORM_PV_SIZE=70656
sz=\$(blockdev --getsize64 \${INSTDEV}) sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((120*\$gib)) ] ; then if [ \$sz -le \$((120*\$gib)) ] ; then
@ -666,7 +659,6 @@ function get_worker_provisioning_sizes()
export LV_SZ_ROOT=20480 export LV_SZ_ROOT=20480
export LV_SZ_VAR=20480 export LV_SZ_VAR=20480
fi 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" 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_BOOT=2048
export PART_SZ_ROOT=0 export PART_SZ_ROOT=0
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0
# Logical volumes # Logical volumes
sz=\$(blockdev --getsize64 \${INSTDEV}) sz=\$(blockdev --getsize64 \${INSTDEV})
if [ \$sz -le \$((120*\$gib)) ] ; then if [ \$sz -le \$((120*\$gib)) ] ; then
@ -1675,16 +1664,9 @@ if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
fi fi
# Allocate platform pv # Allocate platform pv
if [ "$MINIMUM_PLATFORM_PV_SIZE" = 0 ] ; then ilog "platform_pv partition - using all remaining disk space"
ilog "platform_pv partition - using all remaining disk space" end_sec=$last
end_sec=$last sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
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
STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs) STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs)
[ -z "$STOR_DEVS" ] && report_failure_with_msg "No storage devices available." [ -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 "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no" 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_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_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} 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. # 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 if [ \${sz} -gt \$((\${default_small_disk_size}*\${gib})) ] ; then
ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB" ilog "Large disk: MINIMUM_PLATFORM_PV_SIZE=219GiB*1024=224256 MiB"
export MINIMUM_PLATFORM_PV_SIZE=224256
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000 export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then elif [ \${sz} -ge \$((\${minimum_small_disk_size}*\${gib})) ] ; then
ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB" ilog "Small disk: MINIMUM_PLATFORM_PV_SIZE=164GiB*1024=167936 MiB"
export MINIMUM_PLATFORM_PV_SIZE=167936
export BACKUP_DEFAULT_PERSISTENT_SIZE=30000 export BACKUP_DEFAULT_PERSISTENT_SIZE=30000
else else
ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB" ilog "Tiny disk: MINIMUM_PLATFORM_PV_SIZE=43GiB*1024=44032 MiB"
# Using a disk with a size under 85GiB will fail. # Using a disk with a size under 85GiB will fail.
export MINIMUM_PLATFORM_PV_SIZE=44032
export LV_SZ_LOG=3000 export LV_SZ_LOG=3000
export LV_SZ_SCRATCH=2000 export LV_SZ_SCRATCH=2000
export BACKUP_DEFAULT_PERSISTENT_SIZE=1000 export BACKUP_DEFAULT_PERSISTENT_SIZE=1000
@ -621,9 +618,6 @@ function get_std_controller_provisioning_sizes()
export LV_SZ_SCRATCH=16000 export LV_SZ_SCRATCH=16000
export LV_SZ_VAR=20480 export LV_SZ_VAR=20480
# Physical volumes
export MINIMUM_PLATFORM_PV_SIZE=0 # Use all available space
} }
######################################################################### #########################################################################
# Name : get_worker_provisioning_sizes # Name : get_worker_provisioning_sizes
@ -1753,16 +1747,9 @@ if [ "${LV_SZ_VAR}" = 0 -a "${INSTFLUX}" = 1 ] ; then
fi fi
# Allocate platform pv # Allocate platform pv
if [ "$MINIMUM_PLATFORM_PV_SIZE" = 0 ] ; then ilog "platform_pv partition - using all remaining disk space"
ilog "platform_pv partition - using all remaining disk space" end_sec=$last
end_sec=$last sgdisk_parts="$sgdisk_parts -n $part_no:$start_sec:$end_sec -c $part_no:platform_pv -t $part_no:8E00"
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
STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs) STOR_DEVS=$(echo "$STOR_DEVS" | xargs -n 1 | sort -u | xargs)
[ -z "$STOR_DEVS" ] && report_failure_with_msg "No storage devices available." [ -z "$STOR_DEVS" ] && report_failure_with_msg "No storage devices available."
@ -1892,7 +1879,6 @@ pv_part=${fs_dev}${part_no}
ilog "Install disk: ${INSTDEV}" ilog "Install disk: ${INSTDEV}"
ilog "Current disk: ${dev} ; current partition index:$part_no" 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_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_ROOT (cgts--vg-root--lv) : ${LV_SZ_ROOT} MB"
ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB" ilog "LV_SZ_SCRATCH (cgts--vg-scratch--lv) : ${LV_SZ_SCRATCH} MB"