From d52cbddd42b66e7aaaeb8f3c07a0ad056f9776b0 Mon Sep 17 00:00:00 2001 From: Miles 'wedtm' Smith <52319902+notwedtm@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:42:23 -0400 Subject: [PATCH 1/6] Update main.yml --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9fc8117..f780808 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- # defaults file for Solana RPC -solana_version: "v1.13.5" +solana_version: "v1.14.17" ledger_disk: "nvme1n1" setup_disks: "true" download_snapshot: "true" From c667919173de2c30a949f4a17b3edc9a1bb372d8 Mon Sep 17 00:00:00 2001 From: Miles 'wedtm' Smith <52319902+notwedtm@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:42:57 -0400 Subject: [PATCH 2/6] Update validator.sh --- files/validator.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/files/validator.sh b/files/validator.sh index e8122f3..eec55c4 100644 --- a/files/validator.sh +++ b/files/validator.sh @@ -18,7 +18,6 @@ exec /mnt/solana/target/release/solana-validator \ --enable-cpi-and-log-storage \ --account-index program-id \ --enable-rpc-transaction-history \ ---no-duplicate-instance-check \ --wal-recovery-mode skip_any_corrupted_record \ --log /mnt/logs/solana-validator.log \ --accounts /mnt/solana-accounts \ From a21111bced32bed3c161bd34a952835538dff280 Mon Sep 17 00:00:00 2001 From: Miles 'wedtm' Smith <52319902+notwedtm@users.noreply.github.com> Date: Fri, 2 Jun 2023 23:20:57 -0400 Subject: [PATCH 3/6] Update validator.sh --- files/validator.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/files/validator.sh b/files/validator.sh index eec55c4..9f4a9be 100644 --- a/files/validator.sh +++ b/files/validator.sh @@ -29,6 +29,7 @@ exec /mnt/solana/target/release/solana-validator \ --rpc-send-service-max-retries 3 \ --rpc-send-retry-ms 2000 \ --full-rpc-api \ +--enable-accounts-disk-index \ --accounts-index-memory-limit-mb 350 \ --account-index-exclude-key kinXdEcpDQeHPEuQnqmUgtYykqKGVFq6CeVX5iAHJq6 \ --tpu-use-quic \ From 1cf11db627956d3f9b49966cdcfaadf1645d1485 Mon Sep 17 00:00:00 2001 From: Miles 'wedtm' Smith <52319902+notwedtm@users.noreply.github.com> Date: Wed, 7 Jun 2023 11:28:14 -0400 Subject: [PATCH 4/6] fix: remove ramdisk for lower defaults --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index f780808..0d7f667 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,6 @@ solana_version: "v1.14.17" ledger_disk: "nvme1n1" setup_disks: "true" download_snapshot: "true" -ramdisk_size: 300 +# ramdisk_size: 300 swap_mb: "100000" From 221f8ce0cb800818b5632345378c4e51092e87dc Mon Sep 17 00:00:00 2001 From: Miles Smith <52319902+notwedtm@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:49:54 -0400 Subject: [PATCH 5/6] fix: pull snapshots with rpc instead of snapshot-finder --- files/validator.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/files/validator.sh b/files/validator.sh index 9f4a9be..565167c 100644 --- a/files/validator.sh +++ b/files/validator.sh @@ -23,7 +23,6 @@ exec /mnt/solana/target/release/solana-validator \ --accounts /mnt/solana-accounts \ --ledger /mnt/solana-ledger \ --snapshots /mnt/solana-snapshots \ ---no-snapshot-fetch \ --limit-ledger-size 400000000 \ --rpc-send-default-max-retries 3 \ --rpc-send-service-max-retries 3 \ From a9a60364a186f8ffdaddc2ed36df39b4f6febe48 Mon Sep 17 00:00:00 2001 From: Miles Smith <52319902+notwedtm@users.noreply.github.com> Date: Mon, 19 Jun 2023 10:27:18 -0400 Subject: [PATCH 6/6] fix: account for configuration inconsistencies when launching --- tasks/disks.yaml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tasks/disks.yaml b/tasks/disks.yaml index 4d0164a..88cb904 100644 --- a/tasks/disks.yaml +++ b/tasks/disks.yaml @@ -2,25 +2,45 @@ become: true become_user: root shell: df -h | grep mnt/solana-ledger - ignore_errors: yes + ignore_errors: true register: mount_mnt -- name: format disks with ext4 +- name: Get list of NVMe drives over 750GB that are not mounted + become: true + become_user: root + shell: > + lsblk -ln -o NAME,SIZE -d -b | grep nvme | awk '$2 > 750*1024*1024*1024 {print $1}' | + while read drive; do + if ! grep -qs "/dev/$drive " /proc/mounts; then + echo $drive + break + fi + done + register: ledger_disk_raw + when: mount_mnt.rc != 0 + +- name: Set ledger_disk variable + set_fact: + ledger_disk: "{{ ledger_disk_raw.stdout }}" + when: mount_mnt.rc != 0 + +- name: Format disks with ext4 become: true become_user: root shell: mkfs.ext4 /dev/{{ ledger_disk }} when: mount_mnt.rc != 0 -- name: mount disks for ledger +- name: Mount disks for ledger become: true become_user: root shell: mount /dev/{{ ledger_disk }} /mnt/solana-ledger && chown -R solana:solana /mnt/solana-ledger when: mount_mnt.rc != 0 -- name: add mounted disk to fstab +- name: Add mounted disk to fstab become: true become_user: root lineinfile: dest: /etc/fstab state: present line: "/dev/{{ ledger_disk }} /mnt/solana-ledger ext4 defaults 0 1" + when: mount_mnt.rc != 0 \ No newline at end of file