Skip to content

christsim/solana-vm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setting up a Solana Machine

RAID 0 Setup for Solana Storage

This guide provides instructions for setting up a RAID 0 array with NVMe drives to optimize Solana's ledger storage. Adjust the steps according to your server's specific disk configuration.

Step 1: Identify Available Disks

Start by identifying the available NVMe disks on your system to ensure you're selecting the correct ones for the RAID array.

lsblk

This command will display a list of block devices. Identify which devices you plan to include in the RAID array.

Step 2: Create the RAID 0 Array

Use the mdadm command to create a RAID 0 array. Substitute the disk names based on the output from lsblk.

Example:

sudo mdadm --create --force /dev/md0 --level=0 --raid-devices=<number_of_devices> /dev/nvme0n1 /dev/nvme0n2 /dev/nvme0n3 ...

Replace <number_of_devices> with the count of NVMe drives used, and list each of them after the command. The above command creates a RAID 0 array on /dev/md0.

Step 3: Format the RAID Array

Format the new RAID array to ext4:

Example:

sudo mkfs.ext4 -F /dev/md0

Step 4: Mount the RAID Array

Mount the formatted RAID array to the desired directory, such as /opt/solana/ledger.

sudo mkdir -p /opt/solana/ledger
sudo mount /dev/md0 /opt/solana/ledger

Step 5: Mount Additional Disks (If Applicable)

If you plan to mount individual NVMe devices for other Solana data (e.g., accounts, snapshots), identify each device and mount them accordingly.

Example:

sudo mkdir -p /opt/solana/accounts
sudo mkdir -p /opt/solana/snapshots

sudo mount /dev/nvme0n1 /opt/solana/accounts
sudo mount /dev/nvme0n2 /opt/solana/snapshots

Additional Notes

  • Configuration Changes: Adjust the RAID level, device names, and mount points based on specific requirements and server configurations.
  • Automatic Mounting: To ensure persistence across reboots, add entries to /etc/fstab for each mounted directory.
  • Verifying RAID Status: Use cat /proc/mdstat to check the RAID array status.
  • Safety and Backups: RAID 0 offers no redundancy. Regularly back up important data, as RAID 0 prioritizes speed over data protection.

About

Setup solana node on ubuntu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages