> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-feat-host-3113-dynamic-resize.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage Types

> Understand the different storage options available on Vast.ai instances, including container storage and volumes.

## Storage Overview

Vast.ai provides two main types of storage for your instances:

1. **Container Storage** - Temporary storage within Docker container that's deleted with instance
2. **Volumes** - Persistent local storage that survives instance deletion (see [Volumes guide](/guides/instances/storage/volumes))

## Container Storage

Container storage is the default storage allocated to every instance when it's created.

### Key Characteristics

* **Initial size set at creation**: You specify the disk size when creating the instance
* **Can be grown later**: Disk can be expanded in place on a running or stopped instance (see [Resizing container storage](#resizing-container-storage)). Disk cannot be shrunk.
* **Persists while instance exists**: Data remains even when instance is stopped
* **Deleted with instance**: All data is permanently lost when instance is destroyed
* **Charged continuously**: Storage costs apply even when instance is stopped

### Default Allocation

* Minimum: 10GB (default)
* Maximum: Varies by host machine capacity
* Set via disk size slider during instance creation

<Warning>
  Storage charges continue even when instances are stopped. To stop storage billing, you must destroy the instance completely.
</Warning>

### Resizing container storage

You can grow an instance's container disk in place without recreating the instance or losing data. Pass the new total size in GB to `vastai update instance`:

```bash theme={null}
vastai update instance <ID> --disk 80
```

Notes:

* Disk can only be grown, not shrunk.
* The new size must fit within the disk space available on the host machine. If the host doesn't have enough free space, the update will fail and you'll need to migrate to an instance with more available capacity.
* Storage is billed at the host's per-GB rate against the new size from the time the resize completes.

### Best Practices

1. **Estimate generously**: Better to have extra space than run out mid-task
2. **Monitor usage**: Check disk space regularly with `df -h`
3. **Clean up regularly**: Remove unnecessary files to free space
4. **Back up important data**: Container storage is lost when instance is destroyed

## Volumes

Volumes provide persistent storage that survives instance destruction and can be reattached to new instances.

### Key Features

* **Local only**: Tied to the physical machine where created
* **Persistent**: Survives instance destruction
* **Reattachable**: Can be mounted to new instances on same machine
* **Fixed size**: Cannot be resized after creation
* **Separate billing**: Charged independently from instances

### Volume Limitations

* Cannot migrate between different physical machines
* Can only attach to instances on the same host
* Must destroy attached instance before deleting volume
* Size must be specified at creation time

For detailed volume management, see [Volumes](/guides/instances/storage/volumes).

## Storage Costs

Storage pricing varies by host and includes:

1. **Container storage**: Charged per GB while instance exists
2. **Volume storage**: Charged per GB while volume exists
3. **Different rates**: Stopped instances may have higher storage rates than running instances

## Data Persistence Strategy

### Temporary Work

Use container storage for:

* Temporary files
* Build artifacts
* Cache data
* Working datasets

### Important Data

Use volumes or cloud sync for:

* Trained models
* Datasets
* Code repositories
* Configuration files

### Backup Options

1. **Volumes**: For same-machine persistence
2. **Cloud Sync**: For off-machine backup (Google Drive, S3, etc.)
3. **Instance-to-instance copy**: Transfer between instances
4. **SCP/SFTP**: Download to local machine

## Common Questions

### Can I increase storage after instance creation?

Yes. Run `vastai update instance <ID> --disk <new_size_gb>` to grow the container disk in place — your data is preserved. Disk can only be grown, not shrunk, and the new size must fit within the host machine's available capacity. See [Resizing container storage](#resizing-container-storage).

If the host can't accommodate the size you need, you can also:

* Create a new instance with more storage and [transfer your data](/guides/instances/storage/data-movement)
* Attach a volume for additional space
* Use cloud storage for overflow

### What happens to my data when the instance stops?

* Container storage: Data persists, charges continue
* Volumes: Data persists, charges continue
* No data is lost when stopping instances

### How do I avoid storage charges?

* Destroy instances you're not using
* Delete unneeded volumes
* Transfer important data to local/cloud storage first

## Next Steps

<CardGroup cols={3}>
  <Card title="Volumes Guide" href="/guides/instances/storage/volumes" icon="hard-drive">
    Create and manage persistent storage volumes
  </Card>

  <Card title="Data Movement" href="/guides/instances/storage/data-movement" icon="arrows">
    Transfer files between instances and local machines
  </Card>

  <Card title="Cloud Sync" href="/guides/instances/storage/cloud-sync" icon="cloud">
    Connect to Google Drive, S3, and other cloud storage
  </Card>
</CardGroup>
