Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save razum2um/e0cdd36bc328e716b594650b19a18421 to your computer and use it in GitHub Desktop.
Save razum2um/e0cdd36bc328e716b594650b19a18421 to your computer and use it in GitHub Desktop.
recover veracrypt zfs pool after failed usb cable, without reboot
dmsetup table | grep veracrypt
veracrypt2: 0 3904923136 crypt aes-xts-plain64 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 256 8:34 256
dmsetup reload veracrypt2 --table "0 3904923136 error"
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
(?)zpool clear backup-usb
remove from veracrypt UI
echo "0 3904923136 zero" | dmsetup reload veracrypt2
dmsetup suspend --noflush veracrypt2
dmsetup resume veracrypt2
dmsetup remove veracrypt2
re-setup dm table from veracrypt UI
zpool clear backup-usb
scrub will start automatically
errors will be found
export pool
reimport
scrub again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment