Skip to main content

Disks

Introduction​

A Disk is block storage that lives on its own, outside any instance. You create it with a size, attach it to a VM or container, and it shows up inside as a normal mounted drive. Pause, resume or destroy the instance and the disk, with everything on it, stays. Attach it to another instance later and the data is right there.

Every instance also has a root disk: the drive the operating system and your /home live on. Root disks are billed as storage too, on their own line, so the instance price you see is compute only. See Root disks below.

Disks differ from the other storage options:

  • Shared Filesystems can be mounted on many instances at once. A Disk is attached to one instance at a time, which is what gives it block-device speed.
  • Object Storage is reached over HTTPS from anywhere. A Disk is a drive inside the instance, so anything that reads and writes files works without changes.

Use a Disk when you want to:

  • Keep data without keeping the instance. Put datasets, checkpoints and environments on a Disk, destroy the GPU instance when you're done, and attach the Disk to the next one.
  • Add space to a running VM. Attach a Disk to a running VM without stopping it.
  • Grow storage as you go. Start small and grow the Disk later. Nothing has to be copied.
  • Move work between GPU types. Finish preprocessing on a CPU VM, detach, and attach the same Disk to an H100 VM for training.

Key terms​

  • Data disk — a Disk you create yourself and attach to instances. This is what the Disks page lists.
  • Root disk — the instance's own drive, created with the instance and destroyed with it. You pick its size when you launch and can grow it later. It is shown on the instance's Disks tab, not on the Disks page.
  • Attach / detach — connect a Disk to an instance or disconnect it. Detaching never deletes data.
  • Grow — make a Disk bigger. A Disk can only grow, never shrink.

Availability​

  • Regions: Disks are available in IN1 and IN2. A Disk is created in one region and attaches only to instances in that region.
  • Instance types: GPU VMs, CPU VMs and container instances.
  • Instances launched before Disks existed can't attach a Disk until you restart or resume them once. The Disks tab tells you when this applies.

Pricing​

You pay for the size you provisioned, by the minute, from the moment the Disk is created until you delete it. It costs the same whether it is attached or sitting idle, and whether the instance is running or paused.

CurrencyPer GB per hourPer GB per month (720 h)
INR₹0.01296₹9.33
USD$0.00014$0.1008

Example: a 500 GB Disk kept for a month costs $50.40 (or ₹4,665.60).

Rules that apply to billing:

  • Creating a Disk starts billing. Deleting it stops billing. Detaching does not.
  • Growing a Disk bills the new size from that minute on.
  • You need at least 5 credits in your account to create or grow a Disk. Nothing is deducted at that moment; charges run by the minute afterwards.
  • The rate shown when you create the Disk is the rate you pay. Account discounts apply.
  • Data disk charges appear on their own invoice. Root disk charges appear on the instance's invoice.

Getting started​

1. Create a Disk​

Either way takes a few seconds, and the Disk is formatted and ready when it appears.

  • From the Disks page. Go to Disks, click Create disk, give it a name, a size and a region, and click Create.
  • While launching an instance. In the launch form, open Disks, pick existing Disks in the same region, or create a new one right there. Up to 5 per instance.

2. Attach it to an instance​

InstanceAttach while runningAttach while pausedAt launch or resume
VM (GPU or CPU)YesYesYes
ContainerNo, pause it firstYesYes

From the instance page, open the Disks tab and click Attach disk. You can also pick Disks in the resume form. On resume, the Disks you pick are the Disks the instance comes back with: leaving the list as it is keeps the current set, changing it replaces the set.

3. Use it inside the instance​

Every Disk has a fixed mount path, /mnt/disk-<id>, where <id> is the number shown on the Disks page. The Disks tab has a Disk commands button that shows the exact commands for each Disk, filled in with its paths.

On a VM, a Disk attached at launch or resume is already mounted at /mnt/disk-<id> and listed in /etc/fstab. A Disk you attached to a running VM is plugged in but not mounted yet. Mount it once:

sudo mkdir -p /mnt/disk-<id> && sudo mount /dev/disk/by-id/virtio-disk-<id> /mnt/disk-<id>

To keep it mounted across reboots, add it to /etc/fstab:

echo '/dev/disk/by-id/virtio-disk-<id> /mnt/disk-<id> auto defaults,nofail 0 0' | sudo tee -a /etc/fstab
Use the by-id path, not /dev/vdX

/dev/vdc can point at a different Disk after a reboot. /dev/disk/by-id/virtio-disk-<id> always means this Disk. Keep nofail in the fstab line: without it a VM whose Disk is detached can refuse to boot.

In a container, the Disk appears at /mnt/disk-<id> on the next resume. There is nothing to run.

4. Grow a Disk​

Click Grow on the Disk, on the Disks page or the Disks tab, and pick the new size. The Disk can be attached or not, and the instance can be running or paused. The new size is billed from that minute.

What you see inside depends on the instance type:

InstanceWhat happens on grow
Container, running or pausedThe filesystem grows too. The new space is there right away, or on the next resume. Nothing to run.
VM, pausedThe next resume grows the filesystem for you.
VM, runningThe drive grows live. Run one command to grow the filesystem (below), or skip it and the next resume does it.

Inside a running VM:

sudo xfs_growfs /mnt/disk-<id>

5. Detach a Disk​

Pause the instance, then click Detach on the Disks tab or the Disks page. The data stays on the Disk, and billing continues. A Disk can't be detached from a running instance: a drive pulled out while files are open can lose data.

Destroying an instance detaches its Disks for you. They keep their data and stay in your account until you delete them.

6. Delete a Disk​

Detach it first, then click Delete on the Disks page and confirm.

Deleting a Disk permanently removes all data on it

There is no trash and no restore. Copy anything you need to another Disk, a Shared Filesystem or Object Storage before you delete.

What happens when you pause, resume or destroy​

ActionData disksRoot disk
PauseStay attached in your account, data kept, still billedKept, still billed
ResumeMounted again at /mnt/disk-<id>. You can change the set in the resume formComes back as it was
RestartMounted again at /mnt/disk-<id>Comes back as it was
DestroyDetached, data kept, still billed until you delete themDeleted, billing stops

Keep Disks on XFS​

Disks are formatted as XFS when they are created. Jarvislabs grows and checks XFS for you. If you reformat a Disk with another filesystem, such as ext4, it keeps working as a drive, but Jarvislabs leaves it alone from then on:

  • Growing the Disk grows only the drive, never the filesystem. The grow dialog tells you the filesystem was not grown, and you grow it yourself, for example with resize2fs.
  • No repair is attempted on a Disk that isn't XFS.

Root disks​

Every instance's root disk is billed as storage at the same rate as a data disk, and the instance's hourly price covers compute only. Both lines are shown when you launch and on the Disks tab afterwards.

  • On-demand instances: the root disk is billed by the minute for its size, while the instance is running and while it is paused.
  • Committed instances: the root disk is prepaid for the whole term together with the compute, so the plan price already includes it. Growing a committed root disk mid-term charges only the extra space for the rest of the term, right away, and the plan renews at the new size. The grow dialog shows the exact amount before you confirm.

Growing a root disk works like growing a data disk. The drive grows live. On a container the filesystem grows with it, nothing to run. On a VM, the next resume or restart grows the filesystem, or you can do it now:

sudo growpart /dev/vda 1 && sudo resize2fs /dev/vda1

Troubleshooting​

"This instance was launched before disks were available. Restart it once to enable disks." Resume or restart the instance once. After that, the Disks tab works like on any other instance.

"Running container: pause it to attach or detach." Containers can't take or release a Disk while running. Pause, attach or detach, resume.

"Pause the instance to detach." VMs and containers both need to be paused for detach. There is no hot detach.

"still in use by a host. Contact support." The Disk is still open on the machine it was last attached to, usually for a minute after a pause or a failed launch. Wait a little and try again. If it keeps happening, write to support@jarvislabs.ai.

The Disk doesn't show up in my VM after attaching. A Disk attached to a running VM isn't mounted automatically. Run the mount command from step 3, or resume the VM. Check with lsblk; the Disk shows its id in the SERIAL column.

I grew the Disk but df still shows the old size. On a running VM the drive grew but the filesystem didn't yet. Run sudo xfs_growfs /mnt/disk-<id>, or resume the VM. If the grow dialog said the filesystem was not grown, the Disk isn't XFS any more; grow it with the tool for the filesystem you put on it.

"Region mismatch" The Disk and the instance are in different regions. Create the Disk in the instance's region; Disks don't move between regions.

"Disk with this name already exists." Disk names are unique in your account across both regions. Pick another name.