AIStor Files
Manage exports

Manage Exports

Manage the exports of a deployment with `mc files export`, and what its commands have in common.

You manage the exports of an AIStor-managed deployment with mc files export. AIStor stores each export, assigns it to a node, and sends that node its configuration. Run the commands from any host that reaches the deployment. You do not log in to a gateway node.

Before you start

Set an mc alias for the deployment, with an administrator's credentials:

mc alias set myaistor https://aistor.example.com:9000 ACCESS_KEY SECRET_KEY

The commands

Each command has its own page, with its syntax, its flags, and examples.

CommandWhat it does
mc files export addCreate an export
mc files export accessSet which clients may mount an export
mc files export quotaSet or clear the byte limit
mc files export listList every export, with its status and usage
mc files export infoShow one export, including its access rules
mc files export statsShow bytes used against the limit
mc files export cellsShow where each part of an export runs
mc files export removeStop serving an export

The commands take these arguments:

  • ALIAS is the mc alias of the deployment. Every command takes it.
  • EXPORT is the export's name or its numeric ID. A value of only digits is read as an ID. list takes no EXPORT, and stats can do without one. Each command's page shows its syntax.

ls and rm are short forms of list and remove.

Names and IDs

You choose an export's name. A name:

  • is unique in the deployment, and 1 to 255 bytes long,
  • is not all digits, and is not stats or .,
  • holds no .., no space, tab, or line break, and none of / \ ; = , # { } ".

AIStor assigns each export a numeric ID. The ID is permanent and never reused, because it selects the export's prefix in the bucket. IDs from 60000 up are reserved for entry exports.

Status

list, info, and stats show the status of each export:

StatusMeaning
servingThe export's node reports that it serves the export.
pendingThe export's node answered but does not yet hold the export.
fencedThe node holds the export but refuses writes. See Ownership and fencing.
unreachableThe export's node did not answer.
removingThe export is removed in AIStor, and its node has not yet taken the change.

When a read cannot reach every node, it still succeeds and names the nodes it missed.

Changes that wait for a node

A quota or access change still counts when its node does not answer. AIStor keeps the change and sends it when the node answers again. mc then names the node and exits non-zero. Until the node takes the change, info shows the settings AIStor will send.

When the node refuses a change while the command runs, AIStor restores the old setting, and mc prints the node's reason. When the node later refuses a change that was waiting for it, AIStor keeps the change, and info shows the node's reason on a Refusal line. For a remove, see mc files export remove.

Each change names the version of the export it read. If another change lands in between, AIStor refuses the second one. Read the export again with info and decide.

Sizes

add --size and quota take a size:

  • A size takes a unit, such as 10GiB or 1GB. The unit is not case-sensitive.
  • k, m, g, t, p, and e are decimal units: 1GB is 1,000,000,000 bytes. Add an i for binary units: 1GiB is 1,073,741,824 bytes. A trailing b is optional.
  • A bare number is bytes.
  • A size of zero is refused, because it is usually a typing error.

JSON output

Every command takes the global mc flag --json, and then prints its result as JSON. An error is printed as JSON as well.