Skip to main content
Aliases: fs, filestorage 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 or name 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
Manual snapshots (aliases: snapshot, snapshots) 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 or name
Project ID or name
Region ID or name
Show at most N results (client-side; every result is still fetched). Cuts before -q. 0 for all
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 or name
Region ID or name (defaults to all regions)
Show at most N results (client-side; every result is still fetched). Cuts before -q. 0 for all
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 or name. Can also be passed as a positional argument
Organization ID or name
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. Provisioning is asynchronous: without --wait, the command returns as soon as the request is accepted.
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
Block until provisioning finishes. Without it, the command returns as soon as the request is accepted
How long polls before giving up. The operation keeps running server-side (default 30m0s)
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 file-storage get <storage-id> --json.

Flags

FlagDescription
File storage ID or name. Can also be passed as a positional argument
Organization ID or name
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. Teardown is asynchronous: without --wait, the command returns as soon as the request is accepted, and the file storage disappears some time later. Aliases: rm, remove
Deleting file storage permanently removes all its data and snapshots. This can’t be undone.

Flags

Examples


Manual snapshots

A manual snapshot is a point-in-time copy of a file storage resource that you take on demand, alongside the scheduled ones from snapshot policies. It captures the whole file storage, or one path within it. The snapshot commands take the file storage resource as the positional argument or --file-storage, except get and delete, which take the snapshot ID (or name) as the positional argument and the file storage with --file-storage. If you omit the file storage, you pick it from a list. A snapshot’s protected path and expiration time can’t be changed once it’s created. Once a snapshot expires, it’s no longer listed and get reports it as not found.

snapshot list

List the manual snapshots of a file storage resource. Expired snapshots aren’t listed. The table shows each snapshot’s ID, name, protected path, snapshot time, expiry (never if it doesn’t expire), and status.

Flags

FlagDescription
File storage ID or name. Can also be passed as a positional argument
Organization ID or name
Show at most N results (client-side; every result is still fetched). Cuts before -q. 0 for all
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


snapshot get

Get the details of a manual snapshot: its status, when it was captured (status.snapshotTime), and the path it captured.

Flags

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

Examples


snapshot create

Take a manual snapshot of a file storage resource. Pass --protected-path to snapshot one path within it instead of the whole file storage. Without --expires-at, the snapshot is kept until you delete it. With none of the snapshot flags (--name, --description, --protected-path, --expires-at, --no-expiry), the CLI prompts for the name, description, protected path, and expiry (never, in 1, 7, or 30 days, or at a time you enter). Pass any of them to skip the prompts. --name is then required unless the CLI can prompt for it. The snapshot is captured in the background: without --wait, the command returns as soon as the request is accepted.

Flags

FlagDescription
File storage ID or name. Can also be passed as a positional argument
Organization ID or name
Snapshot name
Snapshot description
Path within the file storage to snapshot, such as datasets/model (default: the whole file storage)
RFC 3339 time the snapshot expires. Can’t be combined with
Keep the snapshot until it’s deleted (the default)
Preview actions and payload without persisting
Automatically confirm creation
Block until capture finishes. Without it, the command returns as soon as the request is accepted
How long polls before giving up. The operation keeps running server-side (default 30m0s)
Emit the full JSON payload (mutually exclusive with -q)
jq filter for value extraction (see Query output with -q)

Examples


snapshot delete

Delete a manual snapshot. It’s removed in the background: without --wait, the command returns as soon as the request is accepted. Aliases: rm, remove

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. The file storage resource is the positional argument or --file-storage. Before v7.0.0 the flag was --id; passing --id now fails with an error that names --file-storage. 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 or name. Can also be passed as a positional argument
Organization ID or name
Show at most N results (client-side; every result is still fetched). Cuts before -q. 0 for all
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 or name. Can also be passed as a positional argument
Organization ID or name
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 or name. Can also be passed as a positional argument
Organization ID or name
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. Aliases: rm, remove

Flags

Example


File Storage (Console)

Create and manage file storage via the Console UI.