Skip to content

Destroying a Volume

flexblock wipe destroys a volume. It deletes every object under the prefix, the volume superblock, the ownership marker and the local cache.

  1. Stop the daemon. wipe refuses while a daemon is serving the volume.

  2. Preview what would be deleted.

    Terminal window
    sudo flexblock wipe /dev/nvme1n1p1 --dry-run
  3. Wipe, and answer the confirmation prompt.

    Terminal window
    sudo flexblock wipe /dev/nvme1n1p1

If you have no cache device for the volume to check ownership against, for example when cleaning up a dead volume’s prefix, pass --allow-unverified instead of a device. If the volume’s last host died without detaching, its ownership marker is still held and wipe refuses with exit code 13, so also pass --allow-foreign-ownership:

Terminal window
sudo flexblock wipe --allow-unverified --allow-foreign-ownership --dry-run
sudo flexblock wipe --allow-unverified --allow-foreign-ownership -y
  • wipe always prompts unless -y is given. With no terminal to prompt on, it refuses (exit code 2).
  • -y skips the prompt only. It does not override any safety refusal.
  • It refuses while a daemon is serving, and when another host owns the volume.
  • It deliberately accepts a cache device that was not cleanly stopped, since bringing it to a clean state would mean uploading data that is about to be deleted.
FlagMeaning
--allow-foreign-ownershipWipe although another host owns the volume.
--allow-unverifiedWipe with no device to check ownership against. Required when no device is given.
--dry-runPrint what would be deleted and exit.
-y, --yesSkip the confirmation prompt.
  • Deletes. Throttled or transient delete failures are retried while deletes keep making progress. On AWS S3 general-purpose buckets, deletes are paced to at most 3,500 keys per second. If deletes still fail, wipe exits non-zero and you can run it again.
  • The wait. After deleting, wipe waits 290 seconds (the 285-second take-over fence plus a short margin), counted from deleting the markers, for any uploads that may still land, and deletes whatever did. That way a volume created at the same prefix later never inherits stray objects.
  • Skipping the wait. The wait is skipped only when the volume was detached cleanly or the given device was cleanly stopped, with no take-over pending.
  • Giving up. If the ownership marker or volume superblock keeps coming back, a daemon somewhere is still writing. wipe gives up after three waits.