Make a volume
Makes a volume on a node of the region that keeps volumes, empty but for its file system, and copies it into the object store from then on. A plan's limits hold (403 drive_limit_reached); a project that its spend limit holds back, or whose account has used up what it includes and holds nothing, makes none (403). Takes an Idempotency-Key: the same key again gives the volume the first call made. Takes write.
https://api.glac.ai/v1/volumesAutorização
Parâmetros de cabeçalho
Corpo da requisiçãoJSONopcional
- size_bytesoptionalinteger | null
The most it holds: a whole number of 4 KiB blocks (a multiple of 4096), at least 16 MiB, at most what the account's plan lets one be (10 GiB on Free, 1 TiB on Paid, up to 16 TiB for an enterprise account by an operator's number). Not given: 64 GiB, or 5 GiB on Free (an even share of its 15 GiB together, so that three of no size fit). Only what is written is billed.
format: int64 · minimum: 16777216 - durabilityoptionalstandardoustrictounull
How it is kept (
volume.durability):standard(the default), orstrict, whose guest's fsync returns once the object store holds every write before it. Kept for good. A strict volume is mounted only by a sandbox made from a template built since strict volumes (409strict_unsupportedotherwise).default: "standard" - history_secondsoptionalinteger | null
How far back the volume can be restored, or forked, by a time (its window of versions, slice DB8: reports/storage/drives.md 4.7): 3600 to 86400 seconds (an hour to a day). Every window (30 seconds) a volume that was written gets a version that is the volume at one moment (its machine paused for the last of it, two seconds at the most), kept for this long; what they keep that the volume no longer needs is billed as a snapshot's is (
history.exclusive_bytes, on the meter of storage underdhist-<the volume's id without vol->). Null (or 0): none, the default; set to null, what it kept goes.format: int64 · maximum: 86400 · minimum: 0 - cache_bytesoptionalinteger | null
Its cache on its node's NVMe (
volume.cache_bytes): a whole number of 4 KiB blocks (a multiple of 4096) from 0 to its size (400invalid_fieldotherwise). Not given, or null: all of it. One smaller than the volume is served by its version from the start, so that a sandbox that mounts it holds it to its cache.format: int64 · minimum: 0
Returns
201
The volume.
- used_bytesintegerrequired
What it holds, logically: the 4 KiB blocks written to it and not discarded since (a guest's
fstrim, which its node asks for every minute, gives them back), its file system's own among them. What it is billed by (storage_gb_hours, $0.05 a GB-month); a fork too, by all it holds, what its snapshot holds among it: a fork of a 10 GB snapshot is billed as a volume of 10 GB, whatever it shares with the snapshot and its volume in the object store. As its node said last; while no node holds it, the last the control plane heard.format: int64 · minimum: 0 - homerequired
The region whose object store holds its copy: the region it was made in (
region), until it moves to the region it is mounted in (POST /v1/volumes/{id}/home, or by itself after an hour there). Null where its node copies nothing to an object store. Null of a volume of another kind than a Drive (kind). - home_moveobject | nullrequired
A move of its home to the region it is held in, while one is under way: when it was asked and why (
user:POST /v1/volumes/{id}/home;away: held there for an hour;back: held in its home's region again, taken from another region's store before its home moved there: what it wrote there is copied home, and its home stays), how many of its objects and bytes are copied so far and how many objects are left, and the error it stopped at last, where it stopped (it goes on by itself). Null where none is under way. Null of a volume of another kind than a Drive (kind). - cache_bytesinteger | nullrequired
Its cache on its node's NVMe: the most of it the node keeps there, its size where that is all of it (the default); the rest is in the object store alone, and a read of it fetches it (the guest waits for the store) and keeps it, while what was used least long ago goes once the store holds it (never what it does not hold yet, which may take a volume past its cache for as long as the store takes to have it). Under 64 MiB it is held at 64 MiB, what a guest's read brings with its read-ahead. Billed by the hour as the volume's NVMe cache, up to what it holds (
cache_gb_hoursofGET /v1/usage), beside what it holds (used_bytes,storage_gb_hours): all of it cached costs both, none costs the second alone. A database's caches a quarter of it, 1 GiB at the least. A fork has the cache of the volume it was made of. Null of a volume of another kind than a Drive (kind).format: int64 · minimum: 0 - history_secondsinteger | nullrequired
How far back the volume can be restored, or forked, by a time (its window of versions, slice DB8: reports/storage/drives.md 4.7): 3600 to 86400 seconds (an hour to a day). Every window (30 seconds) a volume that was written gets a version that is the volume at one moment (its machine paused for the last of it, two seconds at the most), kept for this long; what they keep that the volume no longer needs is billed as a snapshot's is (
history.exclusive_bytes, on the meter of storage underdhist-<the volume's id without vol->). Null (or 0): none, the default; set to null, what it kept goes. Null of a volume of another kind than a Drive (kind).format: int64 · maximum: 86400 · minimum: 3600 - kindstringrequired
drive: a volume as this section says it, a disk one sandbox has at a time, copied into the object store (every volume made for a project's key but a shared one).shared: a file system a node keeps, any number of sandboxes have at once (POST /v1/volumeswithshared: true), which is none of the rest: no lease, no home, no snapshots, forks or versions, no cache of its own.plain: one the operator made (a file system on one node, never copied). - durabilityoptionalstring | null
How it is kept, decided when it is made (
DriveCreate.durability).standard: a guest's fsync returns at once (the write is on its node), and a host that is lost loses at most the last second of writes.strict: a guest's fsync, and every flush of its file system, returns once the object store holds every write before it: nothing a guest synced is lost with its host, and each fsync waits for a request to the store (tens of milliseconds). Null of a volume of another kind than a Drive (kind).