fe397d5d27
This commit creates cgts-vg volume group automatically on worker nodes by kickstart. This cgts-vg volume group reserves space for log-lv, scratch-lv, docker-lv and ceph-mon-lv. This commit reserves space in cgts-vg volume group for 30G docker-lv and 20G ceph-mon-lv for AIO configuration. Story: 2004520 Task: 28663 Change-Id: Ic77d00c354da1070e2c4c2da4545d70ab4a93d91 Signed-off-by: Wei Zhou <wei.zhou@windriver.com>
120 lines
4.4 KiB
INI
Executable File
120 lines
4.4 KiB
INI
Executable File
|
|
## NOTE: updates to partition sizes need to be also reflected in
|
|
## - stx-config/.../sysinv/conductor/manager.py:create_controller_filesystems()
|
|
## - stx-config/.../sysinv/common/constants.py
|
|
##
|
|
## NOTE: When adding partitions, we currently have a max of 4 primary partitions.
|
|
## If more than 4 partitions are required, we can use a max of 3 --asprimary,
|
|
## to allow 1 primary logical partition with extended partitions
|
|
##
|
|
## NOTE: Max default PV size must align with the default controllerfs sizes
|
|
##
|
|
## BACKUP_OVERHEAD = 20
|
|
##
|
|
## Physical install (for disks over 240GB)
|
|
## - DB size is doubled to allow for upgrades
|
|
##
|
|
## DEFAULT_IMAGE_STOR_SIZE = 10
|
|
## DEFAULT_DATABASE_STOR_SIZE = 20
|
|
## DEFAULT_IMG_CONVERSION_STOR_SIZE = 20
|
|
## BACKUP = DEFAULT_DATABASE_STOR_SIZE + DEFAULT_IMAGE_STOR_SIZE
|
|
## + BACKUP_OVERHEAD = 50
|
|
## LOG_VOL_SIZE = 8192
|
|
## SCRATCH_VOL_SIZE = 8192
|
|
## RABBIT = 2048
|
|
## PLATFORM = 2048
|
|
## ANCHOR = 1024
|
|
## EXTENSION = 1024
|
|
## GNOCCHI = 5120
|
|
## DOCKER = 30720 (--kubernetes)
|
|
## DOCKER_DIST = 16384 (--kubernetes)
|
|
## ETCD = 5120 (--kubernetes)
|
|
## CEPH_MON = 20480 (--kubernetes)
|
|
## RESERVED_PE = 16 (based on pesize=32768)
|
|
##
|
|
## CGCS_PV_SIZE = 10240 + 2*20480 + 20480 + 51200 + 8196 + 8196 + 2048 +
|
|
## 2048 + 1024 + 1024 + 5120 + 30720 + 16384 + 5120 +
|
|
## 20480 + 16 = 223256
|
|
##
|
|
## small install - (for disks below 240GB)
|
|
## - DB size is doubled to allow for upgrades
|
|
##
|
|
## DEFAULT_SMALL_IMAGE_STOR_SIZE = 10
|
|
## DEFAULT_SMALL_DATABASE_STOR_SIZE = 10
|
|
## DEFAULT_SMALL_IMG_CONVERSION_STOR_SIZE = 10
|
|
## DEFAULT_SMALL_BACKUP_STOR_SIZE = 40
|
|
##
|
|
## LOG_VOL_SIZE = 8192
|
|
## SCRATCH_VOL_SIZE = 8192
|
|
## RABBIT = 2048
|
|
## PLATFORM = 2048
|
|
## ANCHOR = 1024
|
|
## EXTENSION = 1024
|
|
## GNOCCHI = 5120
|
|
## DOCKER = 30720 (--kubernetes)
|
|
## DOCKER_DIST = 16384 (--kubernetes)
|
|
## ETCD = 5120 (--kubernetes)
|
|
## CEPH_MON = 20480 (--kubernetes)
|
|
## RESERVED_PE = 16 (based on pesize=32768)
|
|
##
|
|
##
|
|
## CGCS_PV_SIZE = 10240 + 2*10240 + 10240 + 40960 + 8192 + 8192 + 2048 +
|
|
## 2048 + 1024 + 1024 + 5120 + 30720 + 16384 + 5120 +
|
|
## 20480 + 16 = 182288
|
|
##
|
|
## NOTE: To maintain upgrade compatability within the volume group, keep the
|
|
## undersized LOG_VOL_SIZE and SCRATCH_VOL_SIZE, but size the minimally size
|
|
## physical volume correctly.
|
|
##
|
|
## R4 AIO installations:
|
|
## - R4 (case #1): /boot (0.5G), / (20G),
|
|
## cgts-vg PV (239G), /local_pv (239G)
|
|
## - R4 (case #2): /boot (0.5G), / (20G),
|
|
## cgts-vg PV (239G), cgts-vg (239G)
|
|
##
|
|
## Upgrade migration will start with R5 install and create a partition to align
|
|
## above so filesystems within the volume group will be able to maintain their
|
|
## sizes in R5
|
|
## - R5 install : /boot (0.5G), / (20G),
|
|
## cgts-vg PV (142G), un-partitioned (336G)
|
|
## - R5 (case #1): /boot (0.5G), / (20G),
|
|
## cgts-vg PV (142G), cgts-vg PV (97G), unpartitioned (239G)
|
|
## - R5 (case #2): /boot (0.5G), / (20G),
|
|
## cgts-vg PV (142G), cgts-vg PV (336G)
|
|
##
|
|
|
|
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
|
|
if [ $sz -le $((240*$gb)) ] ; then
|
|
# Round CGCS_PV_SIZE to the closest upper value that can be divided by 1024.
|
|
# 182288/1024=178.02. CGCS_PV_SIZE=179*1024=183296. Using a disk with a
|
|
# size under 179GiB will fail.
|
|
CGCS_PV_SIZE=183296
|
|
else
|
|
# Round CGCS_PV_SIZE to the closest upper value that can be divided by 1024.
|
|
# 223256/1024=218.02. CGCS_PV_SIZE=219*1024=224256.
|
|
CGCS_PV_SIZE=224256
|
|
fi
|
|
|
|
ROOTFS_SIZE=20000
|
|
LOG_VOL_SIZE=8000
|
|
SCRATCH_VOL_SIZE=8000
|
|
|
|
ROOTFS_OPTIONS="defaults"
|
|
profile_mode=`cat /proc/cmdline |xargs -n1 echo |grep security_profile= | grep extended`
|
|
if [ -n "$profile_mode" ]; then
|
|
# Enable iversion labelling for rootfs when IMA is enabled
|
|
ROOTFS_OPTIONS="${ROOTFS_OPTIONS},iversion"
|
|
fi
|
|
|
|
cat<<EOF>>/tmp/part-include
|
|
part /boot --fstype=ext4 --asprimary --size=500 --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS"
|
|
part pv.253004 --grow --size=500 --maxsize=$CGCS_PV_SIZE --ondrive=$(get_disk $rootfs_device)
|
|
volgroup cgts-vg --pesize=32768 pv.253004
|
|
logvol /var/log --fstype=ext4 --vgname=cgts-vg --size=$LOG_VOL_SIZE --name=log-lv
|
|
logvol /scratch --fstype=ext4 --vgname=cgts-vg --size=$SCRATCH_VOL_SIZE --name=scratch-lv
|
|
part / --fstype=ext4 --asprimary --size=$ROOTFS_SIZE --ondrive=$(get_disk $rootfs_device) --fsoptions="$ROOTFS_OPTIONS"
|
|
EOF
|
|
|
|
%end
|
|
|