Skip to content

Commit 6b466bf

Browse files
author
Bonismo
committed
Fix io2 configuration
1 parent 53ba0c6 commit 6b466bf

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

lib/constructs/ha-rpc-nodes-with-alb.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,22 @@ export class HANodesConstruct extends cdkContructs.Construct {
7575
}
7676

7777
if (dataVolume.type !== constants.InstanceStoreageDeviceVolumeType){
78-
blockDevices.push(
79-
{
80-
deviceName: constants.VolumeDeviceNames[arrayIndex],
81-
volume: autoscaling.BlockDeviceVolume.ebs(dataVolume.sizeGiB, {
82-
deleteOnTermination: true,
83-
throughput: dataVolume.throughput,
84-
encrypted: true,
85-
iops: dataVolume.iops,
86-
volumeType: autoscaling.EbsDeviceVolumeType[dataVolume.type.toUpperCase() as keyof typeof autoscaling.EbsDeviceVolumeType],
87-
}),
88-
}
89-
)
78+
const volumeType = dataVolume.type.toUpperCase();
79+
const ebsConfig: any = {
80+
deleteOnTermination: true,
81+
encrypted: true,
82+
iops: dataVolume.iops,
83+
volumeType: autoscaling.EbsDeviceVolumeType[dataVolume.type.toUpperCase() as keyof typeof autoscaling.EbsDeviceVolumeType],
84+
};
85+
86+
if (volumeType == 'GP3'){
87+
ebsConfig.throughput = dataVolume.throughput;
88+
}
89+
90+
blockDevices.push({
91+
deviceName: constants.VolumeDeviceNames[arrayIndex],
92+
volume: autoscaling.BlockDeviceVolume.ebs(dataVolume.sizeGiB, ebsConfig)
93+
})
9094
}
9195
});
9296

lib/solana/lib/assets/instance/storage/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ get_all_empty_nvme_disks () {
3232
local unmounted_nvme_disks=()
3333
local sorted_unmounted_nvme_disks
3434

35-
#The disk will only be mounted when the nvme disk is larger than 500GB to avoid storing blockchain node data directly on the root EBS disk (which is 46GB by default)
36-
all_not_mounted_nvme_disks=$(lsblk -lnb | awk '{if ($7 == "" && $4 > 500000000) {print $1}}' | grep nvme)
35+
#The disk will only be mounted when the nvme disk is larger than 100GB to avoid storing blockchain node data directly on the root EBS disk (which is 46GB by default)
36+
all_not_mounted_nvme_disks=$(lsblk -lnb | awk '{if ($7 == "" && $4 > 100000000) {print $1}}' | grep nvme)
3737
all_mounted_nvme_partitions=$(mount | awk '{print $1}' | grep /dev/nvme)
3838
for disk in ${all_not_mounted_nvme_disks[*]}; do
3939
if [[ ! "${all_mounted_nvme_partitions[*]}" =~ $disk ]]; then

0 commit comments

Comments
 (0)