1

Getting this error:

Unable to access accounts hash cache path: source(create_dir_all) - I/O error: Permission denied (os error 13), file: /mnt/ledger/accounts_hash_cache

While trying to run a testnet solana validator on a cgp instance. I have an SSD with 2TB for the ledge, one with 500GB for the accounts, i've followed the guide from:

https://docs.solana.com/validator/get-started/setup-a-validator

That's my validator.sh:

exec solana-validator \
    --identity validator-keypair.json \
    --vote-account vote-account-keypair.json \
    --known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \
    --known-validator 7XSY3MrYnK8vq693Rju17bbPkCN3Z7KvvfvJx4kdrsSY \
    --known-validator Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN \
    --known-validator 9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv \
    --only-known-rpc \
    --log /home/sol/solana-validator.log \
    --ledger /mnt/ledger \
    --accounts /mnt/accounts \
    --rpc-port 8899 \
    --dynamic-port-range 8000-8020 \
    --entrypoint entrypoint.testnet.solana.com:8001 \
    --entrypoint entrypoint2.testnet.solana.com:8001 \
    --entrypoint entrypoint3.testnet.solana.com:8001 \
    --expected-genesis-hash 4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY \
    --wal-recovery-mode skip_any_corrupted_record \
    --limit-ledger-size

My disks:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda       8:0    0   10G  0 disk 
├─sda1    8:1    0  9.9G  0 part /
├─sda14   8:14   0    3M  0 part 
└─sda15   8:15   0  124M  0 part /boot/efi
sdb       8:16   0    2T  0 disk /mnt/ledger
sdc       8:32   0  500G  0 disk /mnt/accounts

2 Answers 2

2

The user starting the validator doesn't have access to the directory in question.

Did you maybe forget to run this command? sudo chown -R sol:sol /mnt/ledger

4
  • Just did: sudo chown -R sol:sol /mnt/ledger i've done before but did again just to make sure Unable to access accounts hash cache path: source(create_dir_all) - I/O error: Permission denied (os error 13), file: /mnt/ledger/accounts_hash_cache Sep 20 at 21:50
  • drwxr-xr-x 3 dfb_rodrigo_burgos sol 4096 Sep 20 18:07 ledger these are the permission on sol user Sep 20 at 21:56
  • sudo chown -R sol:sol /mnt/ledger/accounts_hash_cache Try this
    – Serban
    Sep 20 at 22:08
  • chown: cannot access '/mnt/ledger/accounts_hash_cache': No such file or directory Sep 21 at 20:38
0

The chown has to happen after the mount. Try this -

You have to mount the drive first:
sudo mount /dev/sdb /mnt/ledger
Then change the ownership of the directory to your sol user:
sudo chown -R sol:sol /mnt/ledger

You have to do the above from the admin/main user. You can do the same for /mnt/accounts also but be sure to change the mount point.

Also doing just this won't be enough. You want to make sure thats in fstab too or it wont get mounted if the node reboots. You can try this -

/dev/sdb    /mnt/ledger    ext4    defaults    0    1
/dev/sdc    /mnt/accounts  ext4    defaults    0    1
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.