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_KEYThe commands
Each command has its own page, with its syntax, its flags, and examples.
| Command | What it does |
|---|---|
mc files export add | Create an export |
mc files export access | Set which clients may mount an export |
mc files export quota | Set or clear the byte limit |
mc files export list | List every export, with its status and usage |
mc files export info | Show one export, including its access rules |
mc files export stats | Show bytes used against the limit |
mc files export cells | Show where each part of an export runs |
mc files export remove | Stop serving an export |
The commands take these arguments:
ALIASis themcalias of the deployment. Every command takes it.EXPORTis the export's name or its numeric ID. A value of only digits is read as an ID.listtakes noEXPORT, andstatscan 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
statsor., - 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:
| Status | Meaning |
|---|---|
serving | The export's node reports that it serves the export. |
pending | The export's node answered but does not yet hold the export. |
fenced | The node holds the export but refuses writes. See Ownership and fencing. |
unreachable | The export's node did not answer. |
removing | The 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
10GiBor1GB. The unit is not case-sensitive. k,m,g,t,p, andeare decimal units:1GBis 1,000,000,000 bytes. Add anifor binary units:1GiBis 1,073,741,824 bytes. A trailingbis 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.