flexblock attach
Synopsis
Section titled “Synopsis”flexblock attach <DEVICE> [flags]Description
Section titled “Description”attach takes local ownership of a volume that already exists in object storage. It sizes a cache on this host’s device (an NVMe partition, or a file for evaluation) from the volume superblock and writes the ownership marker. Nothing is bulk-copied: the cache starts empty and warms on demand.
The device must be cleanly stopped and must not hold anything attach would discard, such as a cache for a different volume, or one for this volume after another host has owned it. --overwrite overrides both. A cache still in step with this volume is preserved.
attach does not need a current grant.
| Flag | Default | Description |
|---|---|---|
--dry-run | — | Print what would happen and exit. |
--overwrite | — | Proceed on an unclean device, or one holding a cache attach would discard: one for a different volume, or for this volume after another host has owned it. A cache still in step with this volume is preserved. |
--take-ownership | — | Replace another host’s ownership marker with a compare-and-swap. |
Examples
Section titled “Examples”Attach a volume created elsewhere with init:
sudo flexblock attach /dev/nvme1n1p1Pick up a volume on a new host after it was detached from the old one:
sudo flexblock attach /dev/nvme0n1p2sudo flexblock start /dev/nvme0n1p2 --ublk-dev-id 0Take over from a host that is unreachable, reusing a cache device that was left unclean:
sudo flexblock attach /dev/nvme1n1p1 --take-ownership --overwrite