@@ -262,9 +262,10 @@ exec >> /var/log/splunkconf-cloud-recovery-debug.log 2>&1
262
262
# 20240910 add var for arch and warn if arch mismatch
263
263
# 20240915 up to 9.3.1
264
264
# 20240917 add splunktargetbinary=sc4s logic
265
- # 20242020 add splunkswapmemode tag to control swapme activation and mode
265
+ # 20241020 add splunkswapmemode tag to control swapme activation and mode
266
+ # 20241029 add mke2fs options to speed up initialization for big disks
266
267
267
- VERSION=" 20242020a "
268
+ VERSION=" 20241029a "
268
269
269
270
# dont break script on error as we rely on tests for this
270
271
set +e
@@ -455,6 +456,9 @@ get_packages () {
455
456
456
457
setup_disk () {
457
458
DEVNUM=1
459
+ MKOPTIONS=" -m 0 -T largefile4 -E lazy_itable_init"
460
+ # for ephemeral , we can add sparse_super with no drawback"
461
+ MKOPTIONSEPHEMERAL=" -O sparse_super -m 0 -T largefile4 -E lazy_itable_init"
458
462
if [[ " $splunkenableunifiedpartition " == " true" ]]; then
459
463
echo " Usimg unified partition mode"
460
464
MOUNTPOINT=" $SPLUNK_HOME "
@@ -504,7 +508,7 @@ setup_disk () {
504
508
vgdisplay >> /var/log/splunkconf-cloud-recovery-info.log
505
509
lvdisplay >> /var/log/splunkconf-cloud-recovery-info.log
506
510
# note mkfs wont format if the FS is already mounted -> no need to check here
507
- mkfs.ext4 -L storage1 /dev/vgsplunkstorage1/lvsplunkstorage1 >> /var/log/splunkconf-cloud-recovery-info.log
511
+ mkfs.ext4 ${MKOPTIONS} -L storage1 /dev/vgsplunkstorage1/lvsplunkstorage1 >> /var/log/splunkconf-cloud-recovery-info.log
508
512
mkdir -p $MOUNTPOINT
509
513
RES=` grep $MOUNTPOINT /etc/fstab`
510
514
# echo " debug F=$RES."
@@ -547,7 +551,7 @@ setup_disk () {
547
551
vgdisplay >> /var/log/splunkconf-cloud-recovery-info.log
548
552
lvdisplay >> /var/log/splunkconf-cloud-recovery-info.log
549
553
# note mkfs wont format if the FS is already mounted -> no need to check here
550
- mkfs.ext4 -L ephemeral1 /dev/vgsplunkephemeral1/lvsplunkephemeral1 >> /var/log/splunkconf-cloud-recovery-info.log
554
+ mkfs.ext4 ${MKOPTIONSEPHEMERAL} -L ephemeral1 /dev/vgsplunkephemeral1/lvsplunkephemeral1 >> /var/log/splunkconf-cloud-recovery-info.log
551
555
mkdir -p $MOUNTPOINT
552
556
RES=` grep $MOUNTPOINT /etc/fstab`
553
557
# echo " debug F=$RES."
0 commit comments