Aliases:filestorage, fsManage 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.
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.
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.
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.
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.
A class from the same region. List them with classes.
spec.storageType.NFS
rootSquash is required. posixAcl and atimeUpdateIntervalSeconds are optional and default to false and 0. See NFS settings for what each does. The CLI rejects an atime interval outside the accepted range before sending the request.
spec.attachments.networkIds
Optional. The networks the file storage is mounted from.
spec.defaultSnapshotProtectionEnabled
Optional. Omit it to turn on Default Snapshot Protection, or set false to leave it off.
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:
Field
When omitted
spec.storageType.NFS.posixAcl
Resets to false
spec.storageType.NFS.atimeUpdateIntervalSeconds
Resets to 0
spec.defaultSnapshotProtectionEnabled
Keeps the current setting
spec.snapshotPolicies
Keeps the current policies. Send [] to remove them all, or a list to replace them all.
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.
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:
Prompt
Shown for
Rules
Name
Every policy
Lowercase letters, numbers, and dashes; at most 19 characters; unique on the resource
Frequency
Every policy
Hourly, Daily, Weekly, or Monthly
Day of week
Weekly
Monday through Sunday
Day of month
Monthly
1 through 28, so the policy runs every month
Time of day (UTC)
Daily, weekly, monthly
24-hour HH:MM
Latest snapshots to keep
Every policy
At least 1. Older snapshots are deleted automatically.
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.
nscale filestorage snapshot-policy list <storage-id> [flags]
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.
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.