Keep a library bigger than your disk¶
pasture keeps your models within two limits that you set, and moves models away to stay within them. An archive folder, when you set one, keeps copies of the models that move away. What pasture never does lists the models that stay on disk, such as the ones you pin.
Set the budget and the reserve¶
You set two limits:
- The budget caps the disk space that models may use, such as 200 GB.
- The reserve is the free space to keep on the disk: 10% of the disk, up to 20 GB, unless you set it.
Once a minute, and before it brings a model back, pasture checks both limits. When either one is broken, it moves away the least recently used model, then checks again.
Set them with pasture budget and pasture reserve. Sizes use decimal units,
the way macOS reports disk space, so 1G is 1,000,000,000 bytes. On Linux,
df -H shows sizes in the same units.
When a new budget or reserve would move more than three models away,
pasture budget and pasture reserve list them and ask before they save it.
When no one can answer, as in a script, they list the models and go on.
See where each model is¶
pasture status prints each model, where it is, when you last used it, and what
keeps it where it is:
MODEL SIZE WHERE LAST USED
gpt-oss:20b 13.8 GB disk now
laguna-s-2.1:nvfp4 66.3 GB archive 41 days ago
my-coder:latest 8.9 GB disk 3 days ago
qwen3.8:27b-mxfp8 32.1 GB disk 2 hours ago pinned
Models use 54.8 GB of the 200.0 GB budget.
The disk has 301.3 GB free, and pasture keeps 50.0 GB free.
Models that move away are copied to /Volumes/T7/ollama-archive, which has 1.4 TB free.
Ollama 0.40.13 runs behind pasture.
This machine is not paired with a Cinchapi account. Run pasture pair to use its models from Cinchapi.
When pasture could not move a model away, the model's row says why. Without an
archive folder, a model built with ollama create shows:
my-coder:latest 8.9 GB disk 3 days ago stays: no archive folder is set; its registry does not serve it, as for a model built with ollama create
While a moved-away model comes back, its row says how far it has come, such as
coming back, 40% of 10.0 GB. pasture restore shows the same progress on
one line as it goes.
pasture status --json prints the same status as JSON, for scripts.
Notifications¶
A restore that is still running after five seconds posts a desktop
notification that names the model and its size, and another when the model is
back or could not come back. A shorter restore posts none. On a Mac pasture
posts them through osascript, so macOS lists them under Script Editor in
System Settings > Notifications, where you can turn them off. On Linux pasture
uses notify-send when the computer has a desktop.
Find moved-away models in your tools¶
A model that moved away stays in Ollama's model lists, /api/tags and
/v1/models, and in pasture's own list, /api/pasture/models, so a tool's
model picker still offers it. Asking a tool for the model's details through
/api/show or /v1/models/{model} does not bring it back.
Download a model¶
pasture add, like a pull from any app, makes room for the model before the
download starts. pasture reads
the model's size from its registry and moves the least recently used models away
first, so the download never pushes the models past the budget. When the
registry does not say what the pull downloads, pasture logs so, makes no room,
and lets the pull run as it would without pasture.
The archive folder¶
The archive folder holds full copies of moved-away models in the same layout as Ollama's models folder: each model's manifests, and the data files they name. A model comes back from the archive with a plain copy, which is fast and works offline. pasture deletes a model from Ollama's folder only after its copy is on the archive's disk. A copy stays in the archive after the model comes back, so the next move away copies only what changed. Data that no copy uses any longer leaves the archive. When pasture cannot read every copy in the archive, it keeps all the data and logs why.
Each moved-away model remembers which folder holds its copy. When you change the
archive folder or turn it off, models already in the old folder still come back
from there. Deleting a model with pasture remove, on disk or moved away,
removes its archive copy too.
pasture checks the archive's free space before it copies a model there. When the archive lacks the room, or the copy fails, the model moves away only if its registry serves the same manifest, and it comes back by download. pasture tries a model that could not move away again after an hour, or as soon as the model or the config changes.
Choose a disk for the archive¶
Use a disk formatted as APFS or as Mac OS Extended (Journaled), which is HFS+.
Both keep a journal, so an unplug or a power loss during a copy leaves the
archive whole. exFAT, the format most external SSDs ship with, keeps no journal.
On a disk that cannot hold links, as with exFAT on Linux or some network shares,
the archive keeps each manifest as a plain file, which Ollama reads the same
way. pasture archive notes when the folder is on such a disk.
When the archive's disk is unplugged¶
When the archive's disk is unplugged, models stay listed, and pasture never
creates the archive folder on another disk. A request for a model whose copy is
in the archive comes back by download if its registry serves the same manifest,
and otherwise fails with status 503 and a message that names the folder. Models
that move away meanwhile come back by download, when their registry serves the
same manifest. pasture status marks the archive as offline. Plug the disk back
in, and everything works again.