AIStor Files
Manage exports

mc files export cells

Show where each part of an export runs, and how healthy it is.

AIStor splits each export into cells. A cell is one part of the export's namespace, and one node runs it. mc files export cells shows one line per cell: the node AIStor gives it, whether that node runs it, whether that is its home node, and how healthy it is.

How AIStor places cells

AIStor decides which node runs each cell, and moves cells by itself:

WhenWhat AIStor does
You add an exportGives it about one cell per drive, a power of two from 2 to 16,384, spread over every node.
The cluster gains drivesRaises the cell count of every export to match, and gives the new cells to the nodes that run the fewest. The count never falls.
A pool is addedMoves cells onto the new nodes until every node runs within one cell of the others.
A node is lostGives its cells to the other nodes once it has been out of reach for 15 seconds. A node acts on this only while it reaches most of the cluster's nodes, so when the cluster splits into halves, no cells move.
A lost node comes backMoves its cells back once AIStor has reached the node without a break for 10 minutes.
A pool is decommissionedMoves every cell off the pool's nodes before the decommission finishes.

AIStor moves at most 4 cells at a time for balancing. To change that, set max_cell_moves, or set it to 0 to turn balancing off:

mc admin config set myaistor files max_cell_moves=8

Moves for a lost node or a decommission always run, and balancing waits for them. A file never changes cells, so a move does not change any file handle.

Syntax

mc files export cells ALIAS EXPORT

EXPORT is the export's name or its numeric ID.

Flags

cells has no flags of its own. It takes the global mc flags, such as --json.

Examples

Show the cells of an export:

mc files export cells myaistor carol
CELL  NODE                     HOME                     STATE        EPOCH  INODES     USED  BEHIND  NOTES
   0  node01.example.com:9000  yes                      serving          3   41022  1.1 GiB      0s  serving for 52h10m4s, renewed 2s ago
   1  node02.example.com:9000  yes                      serving          3   39871  1.0 GiB      2s  serving for 52h10m3s, renewed 1s ago
   2  node04.example.com:9000  node03.example.com:9000  serving          5   40310  1.0 GiB      1s  taken over, serving for 1m12s, renewed 3s ago, lock grace, waits 1m12s for 1 lost owner(s)
   3  node04.example.com:9000  node03.example.com:9000  not-serving      -       -        -       -  the node's gateway is waiting for the cell: lease acquire failed: lease held by a live owner

Not read: node03.example.com:9000: connection refused

Here node03 was lost. AIStor gave its two cells to node04. Cell 2 serves there again, and cell 3 waits until node03's lease runs out.

Show the cells as JSON:

mc files export cells myaistor carol --json

What the output shows

ColumnMeaning
CELLThe cell's number.
NODEThe node AIStor gives the cell. STATE tells whether the cell runs there.
HOMEyes when NODE is the cell's home node. Otherwise it shows the home node. AIStor moves the cells of a lost node to other nodes, and moves them back once AIStor has reached that node without a break for 10 minutes.
STATEserving when the node runs the cell. not-serving when the node answered and does not run it. unreported when the node could not be read.
EPOCHThe cell's lease epoch. It rises each time a node takes the cell.
INODESThe files and directories the cell holds.
USEDThe bytes the cell holds.
BEHINDHow long the cell's oldest change has waited to reach AIStor. A node lost now loses at most these changes, unless it comes back. A change a client synced with fsync is already in AIStor. A change made before the node last started counts from that start.
NOTESFor a serving cell, how long the node has served it, when it last renewed the cell's lease, and anything else to know, listed below. For a cell that does not serve, the node's reason.

NOTES can show these:

  • serving for TIME: how long the node has served the cell.
  • renewed TIME ago: when the node last renewed the cell's lease in AIStor. A time that keeps growing means the node cannot renew the lease, and the cell soon shows fenced.
  • fenced: the node answers no request for the cell, as when it lost the cell's lease, did not renew it in time, or is moving the cell to another node.
  • lease not held: the node does not hold the cell's lease right now.
  • taken over: the node took the cell from a node that did not hand it over, such as a lost node, or the same node after a crash.
  • paging in: after a takeover, the cell still reads its namespace from AIStor. It serves meanwhile. The first access to each part of it takes longer.
  • lock grace: the cell accepts only the locks that clients held before, for up to 90 seconds after it starts or is taken over.
  • ship failed: the cell's last attempt to send its changes to AIStor failed.
  • tier copy has a gap: AIStor's copy of the cell's changes has a gap. It closes once a snapshot covers the gap and the node has sent all later changes to AIStor.
  • waits TIME for N lost owner(s): a node that lost the cell may come back with changes it never sent to AIStor. TIME is how long the cell has waited for the first of them. The cell applies them when the node returns within 24 hours.
  • also on NODE: another node still reports the cell, such as the node it moved from, until that node lets it go.

Like list, cells names each node it could not read and still succeeds. A node whose gateway is too old to report its cells is named there too, and the cells the export gives it show unreported.