Moving a Volume
Apart from the ownership marker, nothing about the serving host is written to the bucket. Moving a volume is a detach on one host and an attach on the other.
Planned move
Section titled “Planned move”-
On the old host, stop cleanly, then detach.
Terminal window sudo flexblock detach /dev/nvme1n1p1detachreleases ownership and clears the local cache. The volume’s data in the bucket is left intact. -
On the new host, install the same grant and make credentials available, then attach and start.
Terminal window sudo flexblock attach /dev/nvme0n1p2sudo flexblock start /dev/nvme0n1p2 --ublk-dev-id 0
The new host’s cache starts empty and warms on demand. It can be a different size and kind of device: only the volume’s geometry carries across.
If detach refuses
Section titled “If detach refuses”detach refuses while the cache holds dirty data or pending discards, or after an unclean stop (exit code 16), because that data exists nowhere else. The fix is to start the daemon, let it flush, and stop it cleanly; wait for flexblock_cache_dirty_slots and flexblock_discard_deletes_pending to reach 0 if you are watching metrics. Then run detach again.
detach --allow-dirty-loss discards that data instead. Prefer flushing.
Taking over from an unreachable host
Section titled “Taking over from an unreachable host”If the old host is gone and cannot detach, take ownership from the new host.
sudo flexblock attach /dev/nvme0n1p2 --take-ownershipsudo flexblock start /dev/nvme0n1p2 --ublk-dev-id 0--take-ownership replaces the old host’s ownership marker. What happens next:
- If the old daemon is somehow still running, it stops writing to the bucket within its 45-second lease, and stops without flushing at its next ownership check.
- The first
starton the new host waits 285 seconds before serving, so the old owner can no longer write by the time the new one does.
Handling the old cache afterward
Section titled “Handling the old cache afterward”The forced stop leaves the old host’s cache unclean and superseded, so nothing on it can be flushed. If the old host comes back:
detachrefuses the old cache with exit code 13. Give it up withdetach --allow-dirty-loss.- To reuse that host to serve the volume again, run
attach --take-ownership --overwrite, which lays out a fresh cache.