Storage-Users

  • The admin documentation for this service contains the full service description, configuration, and administration details. The content there is valid for both administrators and developers.

  • Anything that is relevant only for developers is described on this page.

Developer Readme

Here you can find the developer README.md for this service on the master branch. Please note that the README is intended for developers and may differ from the description in the admin documentation. Admin Docs provides information that has had specific, developer-only information removed, but it may contain additional administrative or configuration notes relevant to this service.

Developer Topics

CLI Commands

Delete Stale Nodes

Removes (or reverts) nodes that are stuck in postprocessing because their upload session is gone. The command checks all nodes in postprocessing state: if no other versions exist, the node is deleted; if other versions exist, the node is reverted to the previous version.

ocis storage-users uploads delete-stale-nodes [command options]

Options:

--spaceid value

Space ID to check for processing nodes; omit to check all spaces.

--dry-run

Only show what would be deleted without actually deleting (default: true).

--verbose

Enable verbose logging (default: false).

Removing a stale node does not reclaim the quota it consumed. Run the Recalculate Treesize command command afterwards to correct the reported quota usage of the space.

Recalculate Treesize

The treesize of a directory is maintained as a running counter updated on every change. A failed or incomplete update leaves the counter wrong and the reported quota usage of a space drifts from the data on disk. This command walks a space bottom-up, recalculates the treesize of every directory from the actual size of its children, and corrects the stored values.

ocis storage-users spaces recalculate-treesize [command options]

Options:

--space-id value

Space ID to recalculate; omit to process all spaces.

--dry-run

Only show which treesizes would be corrected without writing them (default: true).

--verbose

Enable verbose logging (default: false).

Examples:

# report incorrect treesizes of a single space without changing anything
ocis storage-users spaces recalculate-treesize --space-id 43972c79-f7ce-441b-9fe0-cf5170e4d61e

# correct them
ocis storage-users spaces recalculate-treesize --space-id 43972c79-f7ce-441b-9fe0-cf5170e4d61e --dry-run=false
The command reads the metadata of every node in the space and is I/O-intensive on large spaces. Prefer targeting a single space with --space-id over processing all spaces.