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>
44 lines
1.4 KiB
INI
Executable File
44 lines
1.4 KiB
INI
Executable File
LOG_VOL_SIZE=4000
|
|
SCRATCH_VOL_SIZE=4000
|
|
|
|
## LOG_VOL_SIZE = 4096
|
|
## SCRATCH_VOL_SIZE = 4096
|
|
## DOCKER = 30720 (--kubernetes)
|
|
## CEPH_MON = 20480 (--kubernetes)
|
|
## RESERVED_PE = 16 (based on pesize=32768)
|
|
##
|
|
## CGTS_PV_SIZE = 4096 + 4096 + 30720 + 20480 + 16 = 59408
|
|
##
|
|
## Round CGTS_PV_SIZE to the closest upper value that can be divided by 1024.
|
|
## 59408/1024=58.01. CGTS_PV_SIZE=59*1024=60416.
|
|
CGTS_PV_SIZE=60416
|
|
|
|
sz=$(blockdev --getsize64 $(get_disk $rootfs_device))
|
|
if [ $sz -le $((80*$gb)) ] ; then
|
|
## Less than 80GB use a 10GB root partition
|
|
ROOTFS_SIZE=10000
|
|
else
|
|
## Use a 20GB root partition
|
|
ROOTFS_SIZE=20000
|
|
fi
|
|
|
|
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 --asprimary --size=$CGTS_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
|
|
|