Zurab Kiknavelidze
07/06/2026, 8:29 AMRocky
07/06/2026, 8:29 AMSET ... AS DEFAULT STORAGE VOLUME statement.
Once a storage volume is set as the default, any database created without an explicit storage_volume property will automatically use it.
Step 1: Create a storage volume
First, define your storage volume (S3, HDFS, Azure, etc.):
sql
CREATE STORAGE VOLUME my_s3_volume
TYPE = S3
LOCATIONS = ("<s3://my-bucket/starrocks/>")
PROPERTIES (
"aws.s3.region" = "us-east-1",
"enabled" = "true"
);
Step 2: Set it as the cluster default
Set the storage volume as the default for the entire cluster:
sql
SET my_s3_volume AS DEFAULT STORAGE VOLUME;
Step 3: Verify the behavior
Now, when you create a database without specifying a volume, it will default to `my_s3_volume`:
sql
CREATE DATABASE my_new_db;
-- Verify the default was applied
SHOW CREATE DATABASE my_new_db;
Key Points:
* Version: This feature is supported starting from v3.1.
* Shared-data Clusters: In shared-data mode, a default storage volume is required because StarRocks uses it to store system statistics.
* Permissions: You must have the USAGE privilege on the specific storage volume to set it as the default.
* Override: You can still override the default for a specific database by using the PROPERTIES ("storage_volume" = "other_volume") clause during CREATE DATABASE.
References
• sql-reference/sql-statements/cluster-management/storage_volume/SET_DEFAULT_STORAGE_VOLUME.md
• quick_start/shared-data.md
• deployment/shared_data/azure.md
• deployment/shared_data/hdfs.md
• sql-reference/sql-statements/Database/ALTER_DATABASE.md
• deployment/shared_data/s3.mdZurab Kiknavelidze
07/06/2026, 8:32 AMRocky
07/06/2026, 8:33 AMSET ... AS DEFAULT STORAGE VOLUME command is persistent.
Like other StarRocks metadata (such as users, roles, or database schemas), this setting is stored in the FE (Front End) metadata Edit Log. Once you run the command, the configuration is saved to the cluster's persistent state and will remain the default even after a full cluster restart.
Do you need to add it to fe.conf?
No, you do not need to add it to the configuration files. In fact, StarRocks has moved toward managing storage volumes through SQL rather than static config files:
1. SQL-based Management (Preferred): Managing storage volumes via SQL is the standard approach since StarRocks v3.1. It allows you to change volumes dynamically without restarting the cluster.
2. Legacy Configs: In older versions or specific shared-data deployments, you might have seen object storage properties (like aws_s3_path, aws_s3_endpoint) in fe.conf. However, if you are using the STORAGE VOLUME feature, the SQL command is the correct and persistent way to handle it.
3. `enable_load_volume_from_conf`: There is an FE configuration parameter enable_load_volume_from_conf (default is false in v3.4+). If set to true, StarRocks would try to create a volume based on fe.conf properties at startup. You generally don't need this if you are manually creating and setting your storage volumes via SQL.
How to verify it's still set
You can verify that your volume is still the default at any time by running:
sql
DESC STORAGE VOLUME <volume_name>;
-- OR
SHOW STORAGE VOLUMES;
Look for the IsDefault column (it should say true).
Summary: Run the SQL command once, and you're done. No config file changes are required.
References
• administration/management/FE_configuration.md
• administration/management/BE_configuration.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.mdZurab Kiknavelidze
07/06/2026, 9:08 AMRocky
07/06/2026, 9:09 AM_statistics_ or future internal tables):
* The FE's internal "Create Database" logic is triggered.
* Since system databases are created without an explicit storage_volume property, the engine checks for the cluster-wide default.
* The new database is then automatically associated with your persistent default volume.
2. StarRocks Operator & Helm
The StarRocks Operator and Helm charts focus on infrastructure-level persistence (Kubernetes Persistent Volumes for FE metadata, FE logs, and BE local caches). They do not usually manage SQL-level objects like storage volumes.
* The Operator's Role: It ensures your FE pods are running the new version.
* The FE's Role: Once the new version's FE pod starts, it runs its own internal "migration" or "initialization" scripts. These scripts are what create the new system databases.
* Because the FE has already persisted your SET ... AS DEFAULT STORAGE VOLUME setting in its metadata (the Edit Log), it knows exactly which volume to use for these new system databases during the upgrade.
3. Shared-Data Requirements
In shared-data clusters, having a default storage volume is actually mandatory for this exact reason. StarRocks requires a place to store system-level data (like CBO statistics) that is accessible by all compute nodes. If you didn't have one, the upgrade/initialization might even fail or fallback to a legacy fe.conf path if configured.
Summary of What to Expect:
* Persistence: Your DEFAULT setting survives the upgrade because it is stored in the FE metadata.
* Automatic: You don't need to manually move system databases to the new volume; the FE handles this during the upgrade process.
* Verification: After an upgrade, you can run SHOW CREATE DATABASE <new_system_db>; to confirm it inherited the correct storage_volume property.
References
• sql-reference/sql-statements/cluster-management/storage_volume/SET_DEFAULT_STORAGE_VOLUME.md
• deployment/shared_data/azure.md
• quick_start/shared-data.md
• deployment/shared_data/feature-support-shared-data.md
• administration/management/FE_configuration.md
• deployment/sr_operator.md
References
• deployment/shared_data/feature-support-shared-data.md
• loading/loading_introduction/troubleshooting_loading.md
• sql-reference/System_variable.md
• sql-reference/sql-statements/cluster-management/nodes_processes/SHOW_PROC.md
• deployment/shared_data/azure.md
• faq/operation_maintenance_faq.md
• faq/shared_data_faq.mdRocky
07/06/2026, 9:09 AMZurab Kiknavelidze
07/06/2026, 9:12 AMRocky
07/06/2026, 9:12 AMDESC STORAGE VOLUME command.
Method 1: Check a specific volume
If you know the name of a volume and want to see if it is the default, run:
sql
DESC STORAGE VOLUME my_s3_volume;
Look for the IsDefault column in the output. It will be true if it is the default, and false otherwise.
Method 2: See all volumes first
If you don't remember the names of your volumes, first list them all:
sql
SHOW STORAGE VOLUMES;
This will return a list of volume names. Then, use DESC STORAGE VOLUME <name> on the candidates to find the one marked as IsDefault: true.
Method 3: Vertical Output (Recommended)
Using the \G suffix in the MySQL client makes the IsDefault flag much easier to read:
sql
DESC STORAGE VOLUME my_s3_volume\G
Example Output:
text
*************************** 1. row ***************************
Name: my_s3_volume
Type: S3
IsDefault: true <-- This indicates it is the default
Location: <s3://my-bucket/starrocks/>
...
Note on Shared-Data Clusters
In a shared-data cluster, if you haven't manually set a default volume but the cluster is running, it is likely using a "built-in" volume created from your fe.conf properties (if enable_load_volume_from_conf was true during initial setup). You can still find this volume name using SHOW STORAGE VOLUMES.
References
• sql-reference/sql-statements/cluster-management/storage_volume/SHOW_STORAGE_VOLUMES.md
• sql-reference/sql-statements/cluster-management/storage_volume/DESC_STORAGE_VOLUME.md
• sql-reference/sql-statements/cluster-management/storage_volume/CREATE_STORAGE_VOLUME.md
• deployment/shared_data/feature-support-shared-data.md
• sql-reference/information_schema/partitions_meta.md