Updated on 2026-07-24 GMT+08:00

Dynamic Mounting of Notebook Storage

Function

This API is used to mount dynamic storage to a specified directory of a running notebook instance. After this API is called, the system mounts the specified storage instance to the notebook instance in Asynchronous mode. After the mounting is complete, you can read and write files of the storage instance in the container. If you do not have the permission to access the specified notebook instance or the notebook instance is not running, an error message is returned.

Supported storage types:

  • OBSFS: This high-performance object storage system offers cost-effective storage and fast high throughput. It efficiently handles high-performance computing (HPC) tasks but struggles with frequent small-file reads and writes. Frequent read and write operations on small files may freeze notebook file operations.

Constraints

No constraints

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v1/{project_id}/notebooks/{instance_id}/storage

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Definition: Notebook instance ID. The ID is in the format of a Universally Unique Identifier (UUID). For details about how to obtain the ID, see Querying Notebook Instances.

Constraints: N/A

Range: N/A

Default Value: N/A

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

category

Yes

String

Definition: Storage type for dynamic mounting.

Constraints: N/A

Range

  • OBSFS: Object Storage Service (OBS) - parallel file system (PFS)

Default Value: None

mount_path

Yes

String

Definition: Path mounted to the notebook instance.

Constraints: The value must be a subdirectory of the /data directory.

Range: The value can contain at most 256 characters and must be in the /data/ subdirectory of the notebook instance.

Default Value: None

uri

Yes

String

Definition: Storage path, for example, obs://modelarts/notebook/.

Constraints: Valid mount path in the parallel file system.

Range: The value can contain at most 256 characters.

Default Value: N/A

efs_id

No

String

Definition: SFS Turbo instance ID.

Constraints: This parameter is mandatory if category is set to EFS.

Value Range: The value is a valid UUID.

Default Value: None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

category

String

Definition: Storage type. The value can be OBSFS.

Range: N/A

id

String

Definition: ID of the dynamically mounted instance.

Range: N/A

mount_path

String

Definition: Path mounted to the notebook instance.

Range: N/A

status

String

Definition: Dynamic mounting status.

Range

  • MOUNTING: being mounted

  • MOUNT_FAILED: mounting failed

  • MOUNTED: mounted

  • UNMOUNTING: being unmounted

  • UNMOUNT_FAILED: unmounting failed

  • UNMOUNTED: unmounted

uri

String

Definition: Storage path.

Range: N/A

failure_reason

String

Definition: Mounting failure cause. This parameter is returned when the dynamic mounting status is MOUNT_FAILED.

Range: N/A

mount_type

String

Definition: Storage mount type.

Range: The value can be:

  • STATIC: Storage cannot be mounted or unmounted when the instance is running.

  • DYNAMIC: Storage can be mounted and unmounted when the instance is running.

efs_id

String

Definition: EFS storage instance ID.

Range: N/A

Status code: 201

Created

Example Requests

Dynamically mount a PFS file system. Mount the /dir/to/mount/ directory in the pfs-name PFS to the specified file directory /data/mnt/pfs/ in the instance.

POST /v1/{project_id}/notebooks/{instance_id}/storage

{
  "category" : "OBSFS",
  "mount_path" : "/data/mnt/pfs/",
  "uri" : "obs://pfs-name/dir/to/mount/"
}

Example Responses

Status code: 200

OK

{
  "id" : "91dd2d3f-2d92-475f-a375-04636af26cc9",
  "category" : "OBSFS",
  "mount_path" : "/data/mnt/pfs/",
  "uri" : "obs://pfs-name/dir/to/mount/",
  "status" : "MOUNTING"
}

Status Codes

Status Code

Description

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not found

Error Codes

See Error Codes.