Prerequisites
- An exe.dev account with a plan, and your SSH key added to it.
ssh exe.dev whoamishould print your account. jqon your machine.- An Archil disk in the Archil region of your choice.
disk CLI. The output includes the disk ID and a one-time mount token, which grants access to this disk only:
Mount the disk in a VM
Save this unit on your machine asarchil.service. It mounts the disk at /mnt/archil, gives the exedev user ownership of it, and unmounts it when the service stops:
archil.service
archil client in it. Answer yes if SSH asks to trust the new VM’s host key:
Share the disk between VMs
Create a second VM and repeat the same steps:How the disk behaves in a VM
The mount uses conditional mode. With--conditional, every VM can read and write anywhere on the disk at the same time, and none of them holds a lock that another VM has to wait for. See Sharing disks.
Restarts need no special handling. When the VM shuts down, systemd stops the service, which unmounts the disk and sends every buffered write to it. When the VM boots, systemd mounts the disk again.
Stop the service to unmount. sudo systemctl stop archil unmounts the disk until you run sudo systemctl start archil. To stop mounting it at boot, run sudo systemctl disable --now archil.
Clean up
Delete the VMs and the disk once you no longer need them:Next steps
- TypeScript SDK: read, write, and search the disk without mounting it.
- Sharing disks: how conditional mode and checkouts work.
archilCLI reference: everyarchil mountoption.