Skip to content

Commit 53ba0c6

Browse files
author
Bonismo
committed
Fix the NVMe mount bug
1 parent dcfc103 commit 53ba0c6

File tree

1 file changed

+2
-1
lines changed
  • lib/solana/lib/assets/instance/storage

1 file changed

+2
-1
lines changed

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

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

35-
all_not_mounted_nvme_disks=$(lsblk -lnb | awk '{if ($7=="") {print $1}}' | grep nvme)
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)
3637
all_mounted_nvme_partitions=$(mount | awk '{print $1}' | grep /dev/nvme)
3738
for disk in ${all_not_mounted_nvme_disks[*]}; do
3839
if [[ ! "${all_mounted_nvme_partitions[*]}" =~ $disk ]]; then

0 commit comments

Comments
 (0)