Skip to content

flexblock attach

flexblock attach <DEVICE> [flags]

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.

FlagDefaultDescription
--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.

Attach a volume created elsewhere with init:

Terminal window
sudo flexblock attach /dev/nvme1n1p1

Pick up a volume on a new host after it was detached from the old one:

Terminal window
sudo flexblock attach /dev/nvme0n1p2
sudo flexblock start /dev/nvme0n1p2 --ublk-dev-id 0

Take over from a host that is unreachable, reusing a cache device that was left unclean:

Terminal window
sudo flexblock attach /dev/nvme1n1p1 --take-ownership --overwrite