You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何让ArangoDB完全使用Vultr多块存储驱动器存储数据

Alright, I’ve helped folks set up ArangoDB with multiple block storage drives on Vultr before, so let’s get this sorted for you. The goal here is to make ArangoDB ignore the server’s default disk entirely, use your first block storage until it’s full, then automatically switch to the second one. Here’s how to do it step by step:

1. Prep Your Block Storage Drives

First, confirm both drives are mounted and accessible. Let’s say you’ve mounted them at /mnt/block1 and /mnt/block2 (adjust these paths to match your actual setup):

  • Run df -h to verify they show up with available space.
  • Give the ArangoDB user full access to these directories:
    sudo chown -R arangodb:arangodb /mnt/block1 /mnt/block2
    
  • Create dedicated data folders on each drive for ArangoDB:
    sudo mkdir -p /mnt/block1/arangodb-data /mnt/block2/arangodb-data
    
2. Configure ArangoDB to Use Multiple Directories

ArangoDB natively supports spreading data across multiple directories, and it will automatically fill the first directory completely before using the next one—exactly what you need.

Edit the Main Configuration File

Find your ArangoDB config file (usually /etc/arangodb3/arangod.conf on Debian/Ubuntu, or /etc/arangodb/arangod.conf on RHEL/CentOS):

  • Open it with your favorite editor: sudo nano /etc/arangodb3/arangod.conf
  • Locate the [database] section. Comment out any existing directory line, then add the directories setting pointing to your two data folders:
    [database]
    # directory = /var/lib/arangodb3  # Comment this out
    directories = [ "/mnt/block1/arangodb-data", "/mnt/block2/arangodb-data" ]
    
  • Save and exit the file.

Validate the Config

Make sure you didn’t make any typos by running:

arangod --check-config

If you don’t see any errors, you’re good to go.

3. Migrate Existing Data (If You Have Any)

If ArangoDB was already using the default server disk, you’ll need to move that data to your first block storage:

  • Stop the ArangoDB service first:
    sudo systemctl stop arangodb3
    
  • Copy all existing data to the first block storage folder:
    sudo cp -a /var/lib/arangodb3/* /mnt/block1/arangodb-data/
    
  • Backup the old default directory just in case:
    sudo mv /var/lib/arangodb3 /var/lib/arangodb3.bak
    
4. Start ArangoDB and Test the Setup
  • Fire up the service again:
    sudo systemctl start arangodb3
    
  • Check if it’s running properly:
    sudo systemctl status arangodb3
    
  • To test the failover, start writing some large datasets and monitor /mnt/block1’s space usage with df -h. Once it’s full, ArangoDB will automatically start storing new data on /mnt/block2.
5. Critical Tips to Avoid Headaches
  • Persistent Mounts: Make sure your block storage drives auto-mount on server reboot by adding entries to /etc/fstab. Use blkid to get your drive UUIDs, then add lines like this (adjust UUIDs and filesystem type to match yours):
    UUID=abc123-xyz /mnt/block1 ext4 defaults 0 2
    UUID=def456-uvw /mnt/block2 ext4 defaults 0 2
    
  • Monitor Space: Set up alerts for when /mnt/block1 reaches ~90% capacity—this gives you time to add a third block storage drive if you need to go beyond 20TB total.
  • Performance Check: Ensure your server and block storage are in the same Vultr region to avoid slow network latency that can impact ArangoDB’s speed.

内容的提问来源于stack exchange,提问作者itsezc

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:58:01