# Volumes

Manage block storage volumes: create, list, inspect, update, extend, and delete.

***

## Types

List available volume types with pricing and performance specifications.

```bash
ace volume types
```

**Example output:**

```
NAME                                     CURRENCY  PRICE/GB/MO   MIN GB   MAX GB   MAX IOPS   MAX MB/s
NVMe based High IOPS Storage            INR       30.0000        10       1000     50000       500
Standard HDD Storage                     INR       10.0000        10       5000     3000        150
```

> **Tip:** Use the full volume type name (e.g. `"NVMe based High IOPS Storage"`) when creating volumes.

***

## Create

Create a new block storage volume.

```bash
ace volume create \
  --name <volume-name> \
  --type <volume-type> \
  [--size <gb>] \
  [--description <text>] \
  [--billing-type <type>]
```

### Flags

| Flag             | Default  | Description                                                 |
| ---------------- | -------- | ----------------------------------------------------------- |
| `--name`         |          | Volume name (required)                                      |
| `--type`         |          | Volume type name (required, use `ace volume types` to list) |
| `--size`         | `10`     | Volume size in GB                                           |
| `--description`  |          | Volume description (max 255 chars)                          |
| `--billing-type` | `hourly` | Billing type                                                |

### Examples

```bash
# Basic volume
ace volume create --name my-data --size 50 --type "NVMe based High IOPS Storage"

# With description
ace volume create \
  --name db-storage \
  --size 200 \
  --type "NVMe based High IOPS Storage" \
  --description "PostgreSQL data volume"
```

**Example output:**

```
Volume created.
  ID:              xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  Name:            my-data
  Size:            50 GB
  Type:            NVMe based High IOPS Storage
  Status:          creating
```

***

## List

List all volumes in the current project.

```bash
ace volume list [--status <status>] [--bootable <true|false>]
```

### Flags

| Flag         | Description                                               |
| ------------ | --------------------------------------------------------- |
| `--status`   | Filter by status (e.g. `available`, `in-use`, `creating`) |
| `--bootable` | Filter by bootable flag (`true` or `false`)               |

### Examples

```bash
# List all volumes
ace volume list

# List only available (unattached) volumes
ace volume list --status available

# List only bootable volumes
ace volume list --bootable true
```

**Example output:**

```
ID                                     NAME                   SIZE   STATUS       TYPE         BOOTABLE   ATTACHED TO
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx   my-data                50GB   available    NVMe...      false      -
yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy   boot-vol              100GB   in-use       NVMe...      true       abc123abc12...
```

***

## Get / Show

Get detailed information about a specific volume.

```bash
ace volume get <volume-id>
```

**Aliases:** `show`, `describe`

**Example output:**

```
ID:                    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Name:                  my-data
Status:                available
Size:                  50 GB
Type:                  NVMe based High IOPS Storage
Bootable:              false
Availability Zone:     nova
Encrypted:             false
Multiattach:           false
Created:               2025-03-20T10:00:00Z
Updated:               2025-03-20T10:01:00Z

Attachments:
  Server: instance-uuid  Device: /dev/vdb
```

***

## Update

Update a volume's name or description.

```bash
ace volume update <volume-id> [--name <new-name>] [--description <new-desc>]
```

At least one of `--name` or `--description` must be specified.

### Examples

```bash
# Rename a volume
ace volume update <volume-id> --name new-name

# Update description
ace volume update <volume-id> --description "Updated description"

# Both
ace volume update <volume-id> --name new-name --description "New desc"
```

***

## Extend

Increase the size of a volume. Volumes can only be extended (made larger), never shrunk.

```bash
ace volume extend <volume-id> --size <new-size-gb>
```

### Flags

| Flag     | Description                                                 |
| -------- | ----------------------------------------------------------- |
| `--size` | New size in GB (required, must be larger than current size) |

### Example

```bash
ace volume extend <volume-id> --size 100
```

```
Volume xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx extended to 100 GB.
```

***

## Delete

Delete one or more volumes.

```bash
ace volume delete <volume-id> [volume-id...]
```

**Aliases:** `rm`

### Examples

```bash
# Delete single volume
ace volume delete <volume-id>

# Delete multiple volumes
ace volume delete <id1> <id2> <id3>
```

```
Deleted 3 volume(s).
```

> **Note:** A volume must be detached from all instances before it can be deleted.

***

## Global Flags

| Flag           | Description                                |
| -------------- | ------------------------------------------ |
| `-o, --output` | Output format: `table` (default) or `json` |
| `--project`    | Override project ID                        |
| `--region`     | Override region                            |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/cli/storage/volumes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
