# dflow volumes:create

> Create a disk in the current environment. It is not mounted.

Web page: /docs/cli/data/volumes-create/

This attaches one disk to an application and waits until the disk is bound. `--size-gi` defaults to 1 and must be from 1 to 10. The disk is mounted at `--mount-path`.

```bash
dflow volumes:create --name NAME --storage-class CLASS [--size-gi N]
```

## Flags

`--name` and `--storage-class` are required. `--size-gi` defaults to 1 and must be from 1 to 10. There is no `--app` or `--mount-path`: a disk belongs to the environment, and `dflow volumes:mount` attaches it to one application. `--wait` defaults to true. `--wait-timeout` defaults to `20m` and must be from 1s to 30m.

## What you see

The disk is created. On a storage class that binds on first use, such as `local-path`, the claim stays Pending until an application mounts it, and the command still succeeds.

## When it fails

A missing storage class exits 1 with `a storage class is required. Pass --storage-class NAME`. Passing `--app` or `--mount-path` exits 1 as an unknown flag. A volume name already used in the environment exits 4 with `conflict`. A cluster that reports no such storage class exits 6.
