Mount OSS, NAS, datasets, code sets, or models to EAS services to share data across instances and update content without rebuilding images.
Select a storage solution
First select a storage type, then choose a mounting method.
1. Select an underlying storage type
Choose based on your data characteristics and performance requirements.
|
Storage type |
File characteristics |
Read/write pattern |
Performance characteristics |
Typical use cases |
|
OSS |
Massive volumes of large files |
Read-heavy |
High throughput, low cost |
Model file storage, static asset management |
|
General-purpose NAS |
Medium to large files |
Mixed read/write, multi-instance sharing |
Moderate IOPS, moderate latency |
Shared directories for multiple instances, configuration file management |
|
Extreme NAS |
Numerous small files |
High-frequency, low-latency read/write operations |
Low latency, high IOPS |
AI training, high-performance computing |
|
CPFS |
Ultra-large-scale files |
Massive parallel read/write |
Extremely low latency, extremely high throughput |
Distributed training, large-scale parallel computing |
Recommendations:
-
For cost-sensitive applications: OSS has the lowest storage cost and suits large-volume data where performance is not critical.
-
For performance-sensitive applications: Performance ranks as follows: CPFS > Extreme NAS > General-purpose NAS > OSS. Choose based on budget and performance needs.
-
Use a combination: Mount multiple storage types simultaneously. For example, use OSS for large models and General-purpose NAS for shared configuration files.
-
Migration path: Start with OSS for quick validation, then upgrade to NAS or CPFS for production as needed.
-
CPFS requires Lingjun computing resource quotas.
-
The EAS service and NAS mount target must be in the same VPC. Access public or internal resources from EAS.
2. Select a mounting method
Choose a mounting method based on your use case.
|
Mounting method |
Use case |
Key advantage |
Description |
|
Directly mount a storage path |
Quick validation, temporary use |
Simple configuration, on-demand use |
Directly specify an OSS or NAS path |
|
Mount a PAI dataset |
Data version management, team collaboration |
Version control, asset reuse |
Register an OSS or NAS path as a dataset |
|
Mount from Git |
Deploy application code and scripts |
Code version control |
Pull from a Git repository, read-only mount |
|
Mount a PAI code set |
Enterprise code asset management |
Standardized management, audit and traceability |
Register a Git repository as a code set |
|
Mount a PAI model |
Model version management |
Model iteration, team collaboration |
Register a model as a PAI AI Asset |
Basic storage mounts
OSS mount
Use cases
-
Store large model files (GB-level or larger).
-
Store static assets required for inference, such as images, videos, and configuration files.
-
Read-heavy workloads where data reading is the primary operation.
-
Cost-sensitive applications that require low-cost storage.
Configuration
In the console storage mount section, select OSS and specify the bucket and mount path.
JSON example:
{
"storage": [
{
"oss": {
"path": "oss://bucket/path/",
"readOnly": false
},
"mount_path": "/mnt/data/"
}
]
}
Parameters:
|
Parameter (Console) |
Parameter (JSON) |
Description |
|
Uri |
oss.path |
Source OSS bucket path. To create a bucket, see Quick start. |
|
Mount Path |
mount_path |
Destination path in the service instance. Access source files from this path. Example: |
|
Read-only |
oss.readOnly |
Whether to mount in read-only mode. |
NAS mount
NAS mounts support general-purpose NAS, extreme NAS, and CPFS, subject to the network requirements in Select a storage solution.
JSON example:
{
"storage": [
{
"nfs": {
"path": "/",
"server": "06ba74****-a****.cn-hangzhou.nas.aliyuncs.com",
"readOnly": false
},
"mount_path": "/mnt/data/"
}
]
}
Parameters:
|
Parameter (Console) |
Parameter (JSON) |
Description |
|
Storage Permission Resource Group |
nfs.resourceGroup |
Resource group that owns the file system. Filters file systems by resource group. Best practices for designing resource groups. If you select All Storage Permission Resource Groups, you do not need to configure this parameter in the JSON file. |
|
Select File System |
N/A |
NAS file system ID. Find it in the NAS console for your region. |
|
File System Mount Target |
nfs.server |
NAS mount target address. Find it in View mount target addresses. Note
Selecting a mount target in the console automatically selects the associated VPC. |
|
File System Path |
nfs.path |
Source path in the NAS file system, such as |
|
Mount Path |
mount_path |
Destination path in the service instance. Example: |
|
Read-only |
nfs.readOnly |
Whether to mount in read-only mode. |
Git mount
JSON example:
{
"storage": [
{
"git": {
"repo": "https://codeup.aliyun.com/xxx/eas/aitest.git",
"branch": "master",
"commit": "xxx",
"username": "username",
"password": "password or access token"
},
"mount_path": "/mnt/data/"
}
]
}
Parameters:
|
Parameter (Console) |
Parameter (JSON) |
Description |
|
Git URL |
git.repo |
HTTPS URL of the Git repository. Git protocol is not supported. |
|
Branch |
git.branch |
Branch to pull. Default: master. |
|
Commit |
git.commit |
Commit ID to pull. |
|
Git Username |
git.username |
Username for private repository authentication. |
|
Access Token |
git.password |
Password or access token for a private Git repository. Appendix: Obtain a token for your GitHub account. |
|
Mount Path |
mount_path |
Destination path in the service instance. Example: |
Platform asset mounts
Mount datasets, code sets, and models registered as PAI AI Assets for centralized management and reuse.
Dataset mount
Register data or configuration files as a PAI dataset for version control and reuse across deployments.
Supports custom datasets backed by OSS, general-purpose NAS, extreme NAS, and CPFS.
JSON example:
"storage": [
{
"dataset": {
"id": "d-pcsah1t86bm8******",
"version": "v1",
"read_only": false
},
"mount_path": "/mnt/data/"
}
]
Parameters:
|
Parameter (Console) |
Parameter (JSON) |
Description |
|
Custom Dataset |
dataset.id |
A registered custom dataset. Create one and find its ID in Create and manage datasets. |
|
Version |
version |
Dataset version. Example: v1. |
|
Read-only |
dataset.read_only |
Whether to mount the dataset in read-only mode. |
|
Mount Path |
mount_path |
Destination path in the service instance. Example: |
Code set mount
Register a Git repository as a PAI code set. Code sets mount in read-only mode.
JSON example:
"storage": [
{
"code": {
"id": "code-4d3b42a1152****"
},
"mount_path": "/mnt/data/"
}
]
Parameters:
|
Parameter (Console) |
Parameter (JSON) |
Description |
|
Code Configuration |
code.id |
A registered code set. Create one and find its ID in Code configuration. |
|
Mount Path |
mount_path |
Destination path in the service instance. Example: |
PAI model mount
Register models as PAI AI Assets for centralized version and metadata management. Models mount in read-only mode. Register and manage models.
Parameters:
|
Parameter (Console) |
Description |
|
PAI Model |
A registered PAI model. Create one in Register and manage models. |
|
Mount Path |
Destination path for the model mount. Example: |
Advanced mounting options
EAS supports these additional mounting methods:
-
Image mount: Copies files from a Docker image path to a temporary local volume, then mounts it to the service instance. Large directories increase storage use and startup time.
-
EmptyDir mount: Temporary local storage for a running instance. Content survives unexpected restarts. Use for caching or temporary files.
Image mount
Configure with JSON:
{
"storage": [
{
"image": {
"image": "registry-vpc.cn-xxxx.aliyuncs.com/eas/image_name:v1",
"path": "/path/to/mount/"
},
"mount_path": "/data_image"
}
]
}
Images can only mount from an internal network address in the same region. For private images, use the dockerAuth parameter for authentication. Configure dockerAuth as described in Use a custom image.
Parameters:
|
Parameter (JSON) |
Description |
|
image.image |
Internal network address of the image repository. |
|
image.path |
Source path within the image to copy from. |
|
mount_path |
Destination path for the copied files. Example: |
EmptyDir mount
Configure with JSON:
{
"storage": [
{
"empty_dir": {},
"mount_path": "/mnt/temp"
}
]
}
Parameters:
|
Parameter (JSON) |
Description |
|
mount_path |
The destination path in the service instance. |
|
empty_dir |
EmptyDir with an empty map value. Stores data on local disk. No other properties are supported. |
Configure shared memory
Mount a shared memory volume (tmpfs) for higher performance:
{
"storage": [
{
"empty_dir": {
"medium": "memory",
"size_limit": 20
},
"mount_path": "/dev/shm"
}
]
}
Parameters:
|
Parameter (JSON) |
Description |
|
medium |
Set this parameter to memory. |
|
mount_path |
Set this parameter to |
|
size_limit |
Memory size limit in GB. |
JSON configuration example
Complete configuration example. JSON deployment is covered in Deploy services by using JSON.
{
"name": "service_name",
"model_path": "http://path/to/model",
"processor": "pmml",
"storage": [
{
"oss": {
"path": "oss://bucket/path/",
"readOnly": false
},
"mount_path": "/mnt/oss_data/"
},
{
"nfs": {
"path": "/",
"server": "06ba74****-a****.cn-hangzhou.nas.aliyuncs.com",
"readOnly": false
},
"mount_path": "/mnt/nfs_data/"
},
{
"image": {
"image": "registry-vpc.cn-shanghai.aliyuncs.com/eas/test_image:v1",
"path": "/path/to/mount/"
},
"mount_path": "/data_image"
},
{
"empty_dir": {
"medium": "memory",
"size_limit": 20
},
"mount_path": "/dev/shm"
},
{
"git": {
"repo": "https://codeup.aliyun.com/xxx/eas/aitest.git",
"branch": "master",
"commit": "xxx",
"username": "username",
"password": "password or access token"
},
"mount_path": "/mnt/git_code/"
}
],
"metadata": {
"cpu": 1,
"instance": 1,
"resource": "eas-r-xxx"
}
}
FAQ
-
Why do I receive a "file not found" error after I mount an OSS bucket?
Usually caused by an incorrect path. Verify your mount configuration and access path.
For example, if you mount
oss://my-bucket/to/mnt/data, the file atoss://my-bucket/subfolder/myfile.txtin OSS must be accessed from the path/mnt/data/subfolder/myfile.txtin the container, not/mnt/data/myfile.txt. -
What do I do if a NAS mount fails due to a network connection issue?
NAS mounts require the EAS service and NAS mount target to be in the same VPC. Check:
-
VPC Consistency: Ensure the VPC ID is the same for both the EAS service and the NAS mount target.
-
Network Configuration: To access NAS, configure the network by following the instructions in Access public or internal resources from EAS.
-
Mount Target Status: Verify that the NAS mount target exists and is in the
Availablestate.
-
-
What do I do if a Git mount fails due to an authentication error?
Check:
-
Access Token Validity: Confirm that your Git access token has not expired and has read permissions for the repository.
-
Repository Permissions: For a private repository, ensure that the username and password or token are correct and have read permissions.
-
Repository Address Format: Use the HTTPS protocol, such as
https://github.com/user/repo.git. The Git protocol is not supported. -
Branch/Commit Existence: Confirm that the specified branch name or commit ID exists in the repository.
-
-
What do I do if a service fails to start due to a mount path conflict?
A mount path conflict can be caused by the following reasons:
-
Duplicate mount path: In the same service, multiple storage configurations use the same mount path. Ensure that the
mount_pathfor each storage is unique. -
System directory conflict: The mount path cannot be a critical system directory, such as
/bin,/etc,/usr, or/lib. Use a path under/mntor/datainstead. -
Incorrect Path Format: The mount path must be an absolute path that starts with a forward slash (
/).
-
-
Can I use an FTP or SSH tool to connect to an instance to upload or download files?
No. EAS instances do not provide FTP or SSH access.
-
Can I mount an OSS bucket that is in a different region from my EAS service?
No. EAS cannot mount OSS buckets across regions. Use the cross-region replication feature of OSS to synchronize data to an OSS bucket in the same region as the EAS service.
-
If no storage is mounted, where are the files that I download to the instance stored?
Files are saved to the instance's system disk, which is ephemeral. Data on the system disk is lost when the instance is restarted or updated. To persist data, mount external storage.