Skip to main content
Aliases: filestorage, fs Manage file storage: shared NFS filesystems that instances and Kubernetes clusters on the same network can mount. Every command acts in the organization given by --org, or the one saved in your context. Commands that act on one file storage resource take its ID either as a positional argument or with --id. If you omit it, the CLI opens an interactive picker, so always pass it in scripts.

Subcommands

  • list — List file storage resources
  • classes — List file storage classes
  • get — Get file storage details
  • create — Create a new file storage resource
  • update — Update an existing file storage resource
  • delete — Delete a file storage resource
Snapshot policies (aliases: snapshot-policy, sp)

list

List file storage resources, optionally filtered by project or region. The table shows each resource’s ID, name, region, size in GiB, and remote ports. Remote Ports is the IP range of the NFS storage endpoints for each network attachment, ready to use as the remoteports mount option. It’s empty until an attachment has been given a range.

Flags

FlagDescription
Organization ID
Project ID
Region ID
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


classes

List the file storage classes you can create file storage in. A class sets the kind of storage and the region it lives in. Pass its ID as spec.storageClassId when you create a file storage resource. The table shows each class’s ID, name, region, supported protocols, and parallelism.

Flags

FlagDescription
Organization ID
Region ID (defaults to all regions)
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


get

Get details for a file storage resource, including its NFS settings, snapshot policies, and network attachments. Each attachment in status.attachments carries its mountSource, in <host>:<path> format, and its mountOptions.

Flags

FlagDescription
File storage ID. Can also be passed as a positional argument
Organization ID
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


create

Create a new file storage resource. Accepts input from a JSON file or stdin. With neither, the CLI prompts for the name, description, project, region, size (1 to 1013 GiB), NFS settings, networks to attach, and Default Snapshot Protection. It offers only regions that have a file storage class, and uses the first class it finds in the region you choose. To choose the class yourself or add snapshot policies, use a file.
Example payload:
storage.json

Flags

FlagDescription
Path to a JSON file
Read JSON from standard input
Preview actions and payload without persisting
Automatically confirm creation
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


update

Update an existing file storage resource. Accepts input from a JSON file or stdin. With neither, the CLI prompts for the name, description, size, NFS settings, networks, and Default Snapshot Protection, pre-filled from the resource as it stands. The prompts leave snapshot policies unchanged; manage them with the snapshot-policy commands. A payload takes metadata and the spec fields from create except organizationId, projectId, regionId, and storageClassId. It replaces the resource’s settings, with these exceptions for omitted fields: If your payload leaves out posixAcl or atimeUpdateIntervalSeconds while the resource has them set, the CLI prints a warning on stderr before sending it, including with --dry-run. The payload is still sent as written. To keep the current values, start from nscale filestorage get <storage-id> --json.

Flags

FlagDescription
File storage ID. Can also be passed as a positional argument
Organization ID
Path to a JSON file
Read JSON from standard input
Preview actions and payload without persisting
Automatically confirm update
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


delete

Delete a file storage resource.
Deleting file storage permanently removes all its data and snapshots. This can’t be undone.

Flags

Example


Snapshot policies

Snapshot policies take point-in-time snapshots of a file storage resource on a schedule and keep a set number of them. Each resource can have up to 4 policies. For how schedules and retention work, see Snapshot policies. The snapshot-policy commands edit the policies stored on the file storage resource. Each change reads the resource and sends it back with the updated policy list. The rest of the resource is left as it is, including Default Snapshot Protection. Default Snapshot Protection is managed by Nscale and doesn’t appear in these commands. create and update collect the policy through interactive prompts and don’t accept a JSON file, so they need a terminal. With --ci, they fail. To set policies in a script, send the full spec.snapshotPolicies list with update instead. The prompts ask for:

snapshot-policy list

List the snapshot policies on a file storage resource. The table shows each policy’s name, frequency, run time, number of snapshots kept, and provisioning status. With --json or -q, the output is the array of policies from spec.snapshotPolicies. Each policy has name, schedule, and retention fields, with no metadata wrapper.

Flags

FlagDescription
File storage ID. Can also be passed as a positional argument
Organization ID
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


snapshot-policy create

Add a snapshot policy to a file storage resource. The CLI prompts for the policy’s name, schedule, and retention, then asks you to confirm. It fails if the resource already has 4 policies. On success, the updated file storage resource is printed.

Flags

FlagDescription
File storage ID. Can also be passed as a positional argument
Organization ID
Preview actions and payload without persisting
Automatically confirm creation
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Example


snapshot-policy update

Change a snapshot policy’s name, schedule, or retention. The CLI prompts for each field, pre-filled from the policy as it stands, then asks you to confirm. If you omit --name, you pick the policy from a list. Policy names identify policies in the API, so renaming a policy replaces it with a new one. On success, the updated file storage resource is printed.

Flags

FlagDescription
File storage ID. Can also be passed as a positional argument
Organization ID
Name of the snapshot policy to update (prompts if omitted)
Preview actions and payload without persisting
Automatically confirm update
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Example


snapshot-policy delete

Remove a snapshot policy from a file storage resource. If you omit --name, you pick the policy from a list.

Flags

Example


File Storage (Console)

Create and manage file storage via the Console UI.