Skip to content

flexblock init

flexblock init [flags]

init creates a new, empty volume at the bucket and prefix the grant names, by writing the volume superblock. It touches no device unless --attach is given, and leaves the volume unowned. With --attach it also sizes a cache on the local device and claims ownership in the same run. If the attach half fails, the volume still exists and a later attach finishes it.

init refuses a prefix that holds any key other than leftover access or conditional-write probes (exit code 18). Nothing overrides that check. --overwrite covers only the cache device given to --attach.

init needs a current grant.

FlagDefaultDescription
--attach <DEVICE>—Also attach to this cache device in the same run.
--chunk-size <1M|2M|4M|8M>2MUnit of caching and storage: one object and one cache slot each. Fixed for the volume’s life.
--compression <none|lz4|zstd|snappy>zstdAlgorithm for new objects. Changeable later with update.
--device-size <SIZE|max>maxSize to present, a multiple of the chunk size, at most the licensed size. Can only ever grow.
--dry-run—Print the plan and exit.
--logical-block-size <512|4096>4096Advertised block size. Fixed for the volume’s life. 512 admits sub-page guest I/O, served buffered.
--overwrite—With --attach, initialize over whatever the cache device holds. Requires --attach.
--s3-no-sse—S3 only: do not request SSE-S3, for stores that reject the header. Recorded on the volume.

Create a 2 TiB volume and attach the local cache partition in one run:

Terminal window
sudo flexblock init --device-size 2T --attach /dev/nvme1n1p1

Create the volume only, then attach separately (possibly on a different machine):

Terminal window
sudo flexblock init --device-size 2T
sudo flexblock attach /dev/nvme1n1p1

Preview the plan without changing anything:

Terminal window
sudo flexblock init --device-size 2T --attach /dev/nvme1n1p1 --dry-run