# rds-storage

Part of **RDS**

# ApsaraDB RDS Storage Management Console Guide

## Operations Overview

| Operation | Console Entry Path | Prerequisites | Description |
|----------|-------------------|--------------|------------|
| Analyze and Optimize Storage | Console > ApsaraDB RDS > Instances > Storage Analysis and Optimization | Active RDS for MySQL instance; permissions to manage instance | View storage metrics, identify fragmentation, and receive optimization recommendations |
| Mount NFS File System | NAS Console > File System List > Manage > Mount Targets | RDS Custom instance; Extreme NAS file system in same region and VPC | Mount an NFS file system to an RDS Custom instance for shared access |
| Mount CPFS File System | NAS Console > File System List > [Target CPFS] > Basic Information | RDS Custom container series AI node created | Mount a Cloud Parallel File System using Kubernetes PV/PVC |
| Mount Statically Provisioned NAS Volume | RDS > Custom > Instances > [Instance] > Storage > Mount NAS Volume | RDS Custom container series AI node created | Create and mount a persistent NAS volume via PV/PVC |
| Mount OSS Bucket | RDS > Custom Instances > Select Instance > Storage > Mount OSS Bucket | RAM user with OSS permissions; AccessKey; OSS bucket in same region; kubectl configured | Mount an OSS bucket as persistent storage using CSI driver |
| Mount Cloud Disks | Console > Container Service for Kubernetes (ACK) > Clusters > Persistent Volume Claims | RDS Custom container series AI node (Node Lingjun not supported) | Attach pay-as-you-go cloud disks with configurable performance levels |
| Read from OSS using oss_fdw | Console > RDS > Instances > Select Instance > Database Management > SQL Console | RDS PostgreSQL 10+; OSS bucket in same region; AccessKey pair | Use SQL to read/write CSV files in OSS without importing |
| Enable RoaringBitmap Extension | Console > RDS > Instances > Manage Database > Extensions | RDS PostgreSQL 12+ (or 17 with minor version ≥20241030) | Install roaringbitmap for efficient integer set operations |
| Configure Storage Optimization for Spatio-temporal Objects | Console > ApsaraDB RDS > Instances > Connect to Instance | Connected to PolarDB cluster | Set GUC parameters to enable off-row storage for large objects |
| Access Raster Data from External Storage | Console > RDS > Databases > Manage Data Import/Export | RDS and storage (OSS/MinIO/HDFS) in same region/VPC; valid AccessKey | Configure paths to access raster data in external object stores |
| Configure Raster Memory OSS File Max Size | Console > ApsaraDB RDS > Instances > Configuration Management | RDS instance with Ganos extension enabled | Adjust maximum OSS object size for in-memory mapping |
| Export Trajectory Data to OSS | Console > ApsaraDB RDS > Instances > Select Instance > Data Management > Export to OSS | Trajectory data indexed; OSS bucket and directory created; AccessKey with write permissions | Export cold trajectory data to OSS with compression |
| Enable Storage Compression | RDS Instance List > Select Region > Instance ID > Configuration Info > Enable Storage Compression | PostgreSQL 11+; High-availability/Cluster Edition; Dedicated spec; High-performance cloud disk; 1,000–25,000 GB storage | Reduce storage costs via transparent compression at storage layer |
| Enable Data Archiving | Instances > [Instance ID] > Basic Info > Cold Data Archive Switch | PostgreSQL 12+; minor version ≥20240530; 8+ vCPUs; general ESSD; not in Seoul/Dubai/London | Move cold data to OSS to reduce storage costs by up to 80% |
| Monitor and Analyze Storage Usage | Console > RDS > Instances > Storage Management | RDS SQL Server instance; CloudDBA enabled | View hierarchical storage usage from instance down to table level |
| Expand Tablespace with OSS | Console > ApsaraDB RDS > Instances > Select Instance > Storage Management > Expand TableSpace with OSS | RDS PostgreSQL instance; log backups enabled | Use OSS to overcome 2TB tablespace limit |

## Operation Steps

### Analyze and Optimize Storage

**Navigation**: Console > ApsaraDB RDS > Instances > Storage Analysis and Optimization

**Prerequisites**:
- An active ApsaraDB RDS for MySQL instance
- Permissions to view and manage the instance

1. Navigate to the ApsaraDB RDS console
   - Element: **Console** (link) — top navigation bar

2. Select ApsaraDB RDS from the product list
   - Element: **ApsaraDB RDS** (link) — left navigation panel

3. Go to the Instances page and select the target instance
   - Element: **Instances** (tab) — top navigation

4. Click on the 'Storage Analysis and Optimization' tab
   - Element: **Storage Analysis and Optimization** (tab) — instance details panel
   - Notes: This tab displays storage usage metrics and optimization recommendations.

### Mount NFS File System

**Navigation**: NAS Console > File System List > Manage > Mount Targets

**Prerequisites**:
- An RDS Custom instance is created
- An Extreme NAS file system is created in the same region as the RDS Custom instance
- A mount target is created for the NAS file system and resides in the same VPC as the RDS Custom instance

1. Connect to an RDS Custom instance
   - Element: **Connect to an RDS Custom instance** (link) — main content area

2. Install the NFS client
   - Element: **Install the NFS client** (cmd) — main content area
   - Notes: The command varies by OS: `yum install nfs-utils` for Alibaba Cloud Linux/CentOS/Redhat; `apt-get update && apt-get install nfs-common` for Ubuntu/Debian.

3. Run the mount command with specified parameters
   - Element: **Run the following command to mount the NAS file system** (cmd) — main content area
   - Notes: Replace `file-system-id.region.extreme.nas.aliyuncs.com:/share` with actual mount target domain and `/mnt` with desired local directory.

4. Verify the mount result using `mount -l`
   - Element: **Run the following command to verify the mount result** (cmd) — main content area
   - Notes: Successful output shows the mounted NFS file system.

5. Access the mounted file system as a local directory
   - Element: **After the NAS file system is mounted, read data from and write data to the NAS file system on the ECS instance running Linux** (cmd) — main content area

### Mount Statically Provisioned NAS Volume

**Navigation**: RDS > Custom > Instances > [Instance] > Storage > Mount NAS Volume

**Prerequisites**:
- An RDS Custom container series AI node has been created

1. Navigate to the File System List page in the NAS console
   - Element: **File System List** (link) — left navigation panel

2. Click the Operation column's Mount button for the target file system
   - Element: **Mount** (button) — Operation column
   - Notes: Displays mount target address like `153f****.cn-beijing.nas.aliyuncs.com`

3. Create a new NAS file system in the same region as the RDS Custom node
   - Element: **Create File System** (button) — top-right corner
   - Notes: Choose General-purpose NAS or Extreme NAS based on performance needs

4. Configure the VPC and vSwitch for the mount target during creation or add it afterward
   - Element: **Add Mount Target** (button) — main content area
   - Notes: For Extreme NAS, you must add a mount target after creation

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Protocol Type | dropdown | Yes | NFS | The protocol used for mounting the NAS volume. Must be set to NFS. |
| VPC | dropdown | Yes | — | The virtual private cloud where both the NAS file system and RDS Custom node reside. |
| vSwitch | dropdown | Yes | — | The virtual switch within the selected VPC for the mount target. |
| Encryption Type | dropdown | No | None, KMS | Specifies whether data at rest in the NAS volume is encrypted. |

### Mount OSS Bucket

**Navigation**: RDS > Custom Instances > Select Instance > Storage > Mount OSS Bucket

**Prerequisites**:
- A RAM user with OSS access permissions
- An AccessKey ID and secret for the RAM user
- An OSS bucket in the same region as the RDS Custom instance
- kubectl configured and connected to the cluster

1. Create a RAM user
   - Element: **Create RAM User** (button) — top-right corner of the RAM console
   - Notes: Skip if you already have a RAM user.

2. Create a custom policy for OSS access
   - Element: **Custom Policy** (link) — Policies section in RAM console
   - Notes: Choose read-only or read-write policy based on your needs.

3. Grant OSS permissions to the RAM user
   - Element: **Add Permissions** (button) — RAM user details page
   - Notes: Select the custom policy created in Step 2.

4. Obtain an AccessKey for the RAM user
   - Element: **Create AccessKey** (button) — Security Credentials tab
   - Notes: Store securely; visible only once.

### Enable Storage Compression

**Navigation**: RDS Instance List > Select Region > Instance ID > Configuration Info > Enable Storage Compression

**Prerequisites**:
- PostgreSQL 11 or later
- High-availability Edition or Cluster Edition
- Dedicated specification instance
- High-performance cloud disk
- Storage space between 1,000 GB and 25,000 GB
- Subscription or pay-as-you-go billing method

1. Go to the RDS instance list, select the region of the target instance, and click the instance ID to open the details page.
   - Element: **RDS instance list** (link) — top navigation panel

2. In the Configuration Info section, click the 'Enable Storage Compression' button.
   - Element: **Enable Storage Compression** (button) — right side of Configuration Info section
   - Notes: If not visible, verify all requirements are met.

3. Read the considerations in the dialog box and click 'Confirm'.
   - Element: **Confirm** (button) — bottom of dialog box

4. Wait for the instance status to change from 'Changing' to 'Running'.
   - Element: **Instance Status** (text_input) — Configuration Info section
   - Notes: Process may take several minutes.

5. Verify that the 'Support Compression' field shows 'Enabled'.
   - Element: **Support Compression** (text_input) — Configuration Info section
   - Notes: Value changes to 'Enabled' once active.

### Enable Data Archiving

**Navigation**: Instances > [Instance ID] > Basic Info > Cold Data Archive Switch

**Prerequisites**:
- Instance running PostgreSQL major version 12 or later
- Minor engine version ≥20240530 (or ≥20240229 for PostgreSQL 15)
- Instance edition: Basic or High-availability
- Product type: Standard or Yitian
- Storage type: general ESSD
- Instance specifications: 8 vCPUs or more
- Billing method: subscription or pay-as-you-go
- Region not Korea (Seoul), UAE (Dubai), or UK (London)

1. Go to the Instances page and select the region where your instance is located, then click the instance ID.
   - Element: **Instances** (link) — top navigation bar

2. On the Basic Info page, click the Cold Data Archive switch and turn it on.
   - Element: **Cold Data Archive** (switch) — Basic Info section
   - Notes: Causes ~30-second transient disconnection. Perform during off-peak hours with auto-reconnect enabled.

3. On the Basic Info page, click the Cold Data Archive switch and turn it off.
   - Element: **Cold Data Archive** (switch) — Basic Info section
   - Notes: Requires no archived tables in OSS. Return or drop tables first if needed.

4. In the left-side navigation pane, click Cold Data.
   - Element: **Cold Data** (menu) — left-side navigation panel

5. On the Cold Data page, view the archived data.
   - Element: **Cold Data** (tab) — main content area

### Export Trajectory Data to OSS

**Navigation**: Console > ApsaraDB RDS > Instances > Select Instance > Data Management > Export to OSS

**Prerequisites**:
- Trajectory data must be indexed before export
- AccessKey pair with permissions to write to the target OSS bucket
- OSS bucket and directory already created

1. Navigate to the instance's Data Management page
   - Element: **Data Management** (tab) — left navigation panel

2. Click on the Export to OSS button
   - Element: **Export to OSS** (button) — main content area
   - Notes: Appears only if instance supports OSS export.

3. Enter the AccessKey pair and OSS endpoint
   - Element: **AccessKey ID** (text_input) — form fields section
   - Notes: Use format: `<AccessKey>:<AccessKey Secret>`

4. Specify the bucket name and directory path
   - Element: **Bucket Name** (text_input) — form fields section
   - Notes: Example: `my-bucket/data/trajectory`

5. Select compression method (e.g., zstd)
   - Element: **Compression Method** (dropdown) — form fields section
   - Notes: Options listed in ST_ExportTo reference documentation.

6. Click Confirm to start the export
   - Element: **Confirm** (button) — bottom of form
   - Notes: Runs asynchronously; monitor progress in task history.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| AccessKey ID | text | Yes | — | The AccessKey ID used to authenticate access to the OSS bucket |
| AccessKey Secret | text | Yes | — | The AccessKey Secret associated with the AccessKey ID |
| OSS Endpoint | text | Yes | oss-cn-beijing-internal.aliyuncs.com | The domain name of the OSS service region |
| Bucket Name | text | Yes | — | The name of the OSS bucket where data will be stored |
| Directory Path | text | Yes | — | The subdirectory within the bucket for storing trajectory data |
| Compression Method | dropdown | No | zstd, gzip, none | Method used to compress data during export |

### Configure Raster Memory OSS File Max Size

**Navigation**: Console > ApsaraDB RDS > Instances > Configuration Management

**Prerequisites**:
- An ApsaraDB RDS instance with Ganos extension enabled
- Access to the database console or SQL client

1. Navigate to the configuration management page for your RDS instance
   - Element: **Configuration Management** (link) — left navigation panel

2. Locate the ganos.raster.memory_oss_file_max_size parameter in the parameter list
   - Element: **ganos.raster.memory_oss_file_max_size** (text_input) — main content area
   - Notes: Use search bar if not immediately visible.

3. Enter a new value between 1 and 2048 MB
   - Element: **Value field** (text_input) — row containing the parameter
   - Notes: Default is 100 MB. Changes require instance restart.

4. Click Save to apply the change
   - Element: **Save** (button) — top-right corner
   - Notes: Restart instance after saving for changes to take effect.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| ganos.raster.memory_oss_file_max_size | number | No | — | Sets the maximum size of an OSS object that ST_ImportFrom can map as an in-memory file in Ganos. Valid values: 1–2048 MB. |

## FAQ

Q: Where can I find storage usage trends and optimization recommendations for my RDS MySQL instance?
A: Navigate to Console > ApsaraDB RDS > Instances > [your instance] > Storage Analysis and Optimization tab. For High-availability or Cluster Edition instances, you can also use Autonomy Services > Diagnostics > Storage Analysis.

Q: Can I modify storage compression settings after enabling them?
A: Once storage compression is enabled, you cannot disable it through the console. The feature is designed to be irreversible to maintain data integrity. Ensure you meet all prerequisites before enabling.

Q: What happens if I try to mount an OSS bucket from a different region than my RDS Custom instance?
A: The mount will fail or experience high latency. RDS Custom instances can only access OSS buckets in the same region via internal endpoints. Cross-region access requires public endpoints and incurs additional costs and security risks.

Q: Do I need special permissions to access the Storage Management features?
A: Yes, you need appropriate RAM permissions. For basic storage monitoring, `AliyunRDSReadOnlyAccess` may suffice. For actions like enabling compression or mounting volumes, you typically need `AliyunRDSFullAccess` or custom policies with specific storage-related actions.

Q: How long does it take for data archiving to move tables to OSS?
A: The initial archival process runs asynchronously and duration depends on data volume. Small tables may complete in minutes, while large datasets could take hours. You can monitor progress on the Cold Data page after enabling the feature.

## Pricing & Billing

### Billing Model
- **Storage Compression**: Billed as part of instance hourly rate with a multiplier (1.25× unit price of high-performance cloud disk storage).
- **Data Archiving**: Pay-as-you-go only, billed per GB-hour for data stored in OSS.
- **NAS Volumes**: Billed per GB-hour based on NAS type (General-purpose or Extreme).
- **Trajectory Export to OSS**: Incurs OSS storage fees plus request charges.

### Price Reference

| Tier | Input Price | Output Price | Other Price |
|------|-------------|--------------|-------------|
| General-purpose NAS | 0.0001 /GB/ | 0.0001 /GB/ | — |
| Extreme NAS | 0.0002 /GB/ | 0.0002 /GB/ | — |
| OSS storage | 0.12 /GB/ | 0.10 /GB/ | 0.01 /1000 |
| Basic Edition (Data Archiving) | CNY 0.00021 per GB-hour | — | — |
| High-availability Edition (Data Archiving) | CNY 0.00042 per GB-hour | — | — |
| RDS Custom Container Series | 0.85 / | — | — |
| Cloud Disk PL0 | 0.002 /tokens | — | — |
| Cloud Disk PL1 | 0.003 /tokens | — | — |

### Free Tier
- **Storage Analysis**: Included at no extra cost with supported RDS editions (analyzes up to 20,000 tables).
- **RoaringBitmap Extension**: Available at no additional cost with ApsaraDB RDS for PostgreSQL.
- **OSS Export**: Monthly free tier includes 5 GB storage and 1,000 requests.
- **Storage Compression**: Free backup quota increases from 200% to 400% of purchased storage space when enabled.

### Billing Notes
- Enabling storage compression generates a configuration upgrade order (subscription) or modify configuration order (pay-as-you-go) to cover the price difference.
- Data archiving is unavailable in Thailand (Bangkok), Korea (Seoul), UK (London), and UAE (Dubai).
- Cloud disk bills are calculated separately by performance level (PL0, PL1, etc.). Using multiple PL types generates multiple line items.
- Automatic storage expansion and fragment reclamation (related to storage analysis) may incur separate costs depending on configuration.
- Trajectory export tasks generate billing records upon completion, even if run asynchronously.