> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# ALTER STORAGE VOLUME

> ALTER STORAGE VOLUME alters the credential properties, comment, or status (enabled) of a storage volume.

ALTER STORAGE VOLUME alters the credential properties, comment, or status (`enabled`) of a storage volume. For more about the properties of a storage volume, see [CREATE STORAGE VOLUME](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md). This feature is supported from v3.1.

> **CAUTION**
>
> * Only users with the ALTER privilege on a specific storage volume can perform this operation.
> * The `TYPE` and `LOCATIONS` of an existing storage volume, and the properties `aws.s3.enable_partitioned_prefix` and `aws.s3.num_partitioned_prefix`, cannot be altered. The database does not block changes to other properties such as the endpoint or region, and the new values apply to all existing databases and tables that use the storage volume. Alter these properties only to access the same storage, for example, to rotate credentials. If the new values point to different storage, the data of the existing databases and tables becomes inaccessible.
> * When `enabled` is `false`, the corresponding storage volume cannot be referenced.
> * In shared-data mode, the database performs a storage accessibility check during `ALTER STORAGE VOLUME` only when the `enable_storage_volume_access_check` configuration is enabled (enabled by default). If this check is enabled and the updated credentials or endpoint cannot access remote storage, the statement fails. You can turn off this check by disabling `enable_storage_volume_access_check`.

## Syntax

```SQL theme={null}
ALTER STORAGE VOLUME [ IF EXISTS ] <storage_volume_name>
{ COMMENT = '<comment_string>'
| SET ("key" = "value"[,...]) }
```

## Parameters

| **Parameter** | **Description** |
| - | - |
| storage\_volume\_name | The name of the storage volume to alter. |
| COMMENT | The comment on the storage volume. |

For detailed information on the properties that can be altered or added, see [CREATE STORAGE VOLUME - PROPERTIES](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md#properties).

## Examples

Example 1: Disable the storage volume `my_s3_volume`.

```Plain theme={null}
MySQL > ALTER STORAGE VOLUME my_s3_volume
    -> SET ("enabled" = "false");
Query OK, 0 rows affected (0.01 sec)
```

Example 2: Alter the credential information of the storage volume `my_s3_volume`.

```Plain theme={null}
MySQL > ALTER STORAGE VOLUME my_s3_volume
    -> SET (
    ->     "aws.s3.use_instance_profile" = "true"
    -> );
Query OK, 0 rows affected (0.00 sec)
```

## Relevant SQL statements

* [CREATE STORAGE VOLUME](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md)
* [DROP STORAGE VOLUME](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/DROP_STORAGE_VOLUME.md)
* [SET DEFAULT STORAGE VOLUME](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/SET_DEFAULT_STORAGE_VOLUME.md)
* [DESC STORAGE VOLUME](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.md)
* [SHOW STORAGE VOLUMES](/documents/4.2/sql-reference/sql-statements/cluster-management/storage_volume/SHOW_STORAGE_VOLUMES.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.